WO2024255677A1 - Procédé de génération de données de dialogue et dispositif associé - Google Patents
Procédé de génération de données de dialogue et dispositif associé Download PDFInfo
- Publication number
- WO2024255677A1 WO2024255677A1 PCT/CN2024/097727 CN2024097727W WO2024255677A1 WO 2024255677 A1 WO2024255677 A1 WO 2024255677A1 CN 2024097727 W CN2024097727 W CN 2024097727W WO 2024255677 A1 WO2024255677 A1 WO 2024255677A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- user
- items
- dialogue
- rules
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/332—Query formulation
- G06F16/3329—Natural language query formulation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9535—Search customisation based on user profiles and personalisation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Definitions
- the embodiments of the present application relate to the field of artificial intelligence (AI) technology, and in particular to a method for generating dialogue data and related equipment.
- AI artificial intelligence
- AI-generated content In AI-generated content (AIGC), the conversational model (language big model) with item recommendation function has demonstrated strong natural language understanding and communication capabilities.
- the model can recommend items to users by having conversations with them, thereby meeting users' item recommendation needs.
- conversation data for model training through crowdsourcing projects.
- the staff in the crowdsourcing project can play the role of users and conversation models respectively, and generate conversation data between users and conversation models according to the information provided by the preset knowledge graph.
- the relevant content in the conversation data and the items recommended to users by the conversation model are extracted by the staff from the knowledge graph.
- the conversation data can be used to train the recommendation model, and the trained recommendation model can learn the interests and preferences of users, so as to recommend items to users.
- the entire process of generating dialogue data needs to be the responsibility of the crowdsourcing project staff, which takes a lot of time, that is, the labor cost is too high.
- the embodiments of the present application provide a method for generating conversation data and related devices thereof, which can effectively improve the efficiency of generating conversation data and reduce the cost of generating conversation data.
- a first aspect of an embodiment of the present application provides a method for generating conversation data, the method comprising:
- User data may generally include user attributes and items that the user is interested in.
- the user attributes may include the user's name, the user's gender, and the user's age, etc.
- the items that the user is interested in may include items that the user has clicked on, items that the user has browsed, items that the user has commented on, etc.
- a series of processing can be performed on the user data to obtain items that can be recommended to the user.
- the items that can be recommended to the user include not only the items that the user is interested in in the user data, but also other items associated with the items that the user is interested in.
- the preset data generation rules can be updated using the user data and the items that can be recommended to the user, thereby obtaining new data generation rules. It should be noted that the new data generation rules not only constrain the format of the dialogue data between the user and the dialogue model, but also constrain the content of the dialogue data between the user and the dialogue model.
- the dialogue data between the user and the dialogue model can be generated according to the new data generation rules.
- the dialogue data between the user and the dialogue model usually includes multiple rounds of interaction, which include multiple rounds of ordinary dialogue and multiple rounds of question and answer.
- Each round of ordinary dialogue includes a non-question sentence of the user and a reply of the dialogue model (or, each round of ordinary dialogue includes a non-question sentence of the dialogue model and a reply of the user), and each round of question and answer includes a question of the user and an answer of the dialogue model (or, each round of question and answer includes a question of the dialogue model and an answer of the user).
- the user data may be obtained first.
- the user data includes the user's attributes and the items that the user is interested in.
- the user data may be processed to obtain recommended items.
- the recommended items include items that the user is interested in and items related to the items that the user is interested in.
- the preset data generation rules may be updated using the user data and the recommended items to obtain new data generation rules.
- the new data generation rules may be used to generate dialogue data between the user and the dialogue model.
- the dialogue data includes items recommended to the user by the dialogue model.
- the items recommended to the user by the dialogue model come from the recommended items.
- the above process provides a dialogue data generation framework, which can be used to collect
- the data generation rules preset in the user data set are used to obtain new data generation rules, and the new data generation rules are used to obtain the conversation data between the user and the conversation model. It can be seen that the framework can automatically generate conversation data, and the entire generation process of conversation data does not require human intervention, which can effectively improve the generation efficiency of conversation data and reduce the generation cost of conversation data.
- the method further includes: determining non-recommended items based on user data; updating preset data generation rules based on user data and recommended items, and obtaining new data generation rules includes: updating preset data generation rules based on user data, recommended items, and non-recommended items, and obtaining new data generation rules.
- updating preset data generation rules includes: updating preset data generation rules based on user data, recommended items, and non-recommended items, and obtaining new data generation rules.
- the new data generation rules can make the dialogue data between the user and the dialogue model include the following multiple contents: the user accepts the items recommended by the dialogue model and the user rejects the items recommended by the dialogue model, so that the dialogue data finally generated can be more in line with reality.
- determining the recommendable items based on user data includes: extracting features from the user data and multiple candidate items to obtain features of the user data and multiple candidate items; calculating the features of the user data and multiple candidate items to obtain the degree of matching between the user data and the multiple candidate items; and determining the candidate items whose degree of matching is greater than or equal to a first threshold as recommendable items.
- multiple candidate items may be first obtained, so that the features of the user data and the multiple candidate items may be extracted respectively, thereby obtaining the features of the user data and the multiple candidate items accordingly.
- a series of calculations may be performed on the features of the user data and the multiple candidate items to obtain the degree of matching between the user data and the multiple candidate items, that is, the degree of matching between the user data and the first candidate item, the degree of matching between the user data and the second candidate item, ..., the degree of matching between the user data and the last candidate item.
- the candidate items whose degree of matching is greater than or equal to the first threshold may be determined as items that can be recommended to the user among the multiple candidate items. In this way, the items that the user is interested in and the items related to the items that the user is interested in can be accurately obtained as items that can be recommended to the user.
- determining the unrecommended items based on the user data includes: determining the candidate items with a matching degree less than or equal to a second threshold as unrecommended items, where the second threshold is less than the first threshold.
- the candidate items with a matching degree less than or equal to the second threshold can be determined as unrecommended items from among the multiple candidate items. In this way, items that the user is not interested in can be accurately obtained as items that cannot be recommended to the user.
- the preset data generation rules include rules that do not need to be supplemented and rules to be supplemented. Based on user data, recommended items and non-recommended items, the preset data generation rules are updated to obtain new data generation rules, including: filling user data, recommended items and non-recommended items into the rules to be supplemented, obtaining supplemented rules, the rules that do not need to be supplemented and the supplemented rules constitute new data generation rules, the rules that do not need to be supplemented are used to set the format of dialogue data, and the supplemented rules are used to set the content of dialogue data.
- the preset data generation rules may include two parts, one part is the rules that do not need to be supplemented, and the other part is the rules to be supplemented, and the rules to be supplemented have slots that can be filled with content. Then, user data, recommended items and non-recommended items can be filled into the slots of the rules to be supplemented, thereby obtaining supplemented rules.
- the rules that do not need to be supplemented and the supplemented rules constitute new data generation rules, wherein the rules that do not need to be supplemented are used to set the format of dialogue data between the user and the dialogue model, and the supplemented rules are used to set the content of dialogue data between the user and the dialogue model.
- the dialogue data obtained based on the new data generation rules has a certain format, and its content includes not only the content of the chat between the user and the dialogue model, but also the content of the user accepting the items recommended by the dialogue model, and even the content of the user rejecting the items recommended by the dialogue model, so that the final generated dialogue data is closer to reality.
- the method further includes: obtaining target dialogue data from the dialogue data, where the target dialogue data satisfies at least one of the following: all texts contained in the target dialogue data are in a preset text set; the description of the object contained in the target dialogue data conforms to the real description; the object contained in the target dialogue data is a real object; the richness of the content contained in the target dialogue data is greater than or equal to a third threshold.
- obtaining target dialogue data from the dialogue data where the target dialogue data satisfies at least one of the following: all texts contained in the target dialogue data are in a preset text set; the description of the object contained in the target dialogue data conforms to the real description; the object contained in the target dialogue data is a real object; the richness of the content contained in the target dialogue data is greater than or equal to a third threshold.
- the method further includes: training the dialogue model based on the target dialogue data to obtain a trained dialogue model.
- the dialogue model can be trained using the target dialogue data. Conduct training to obtain a trained dialogue model, that is, a dialogue model with the function of item recommendation.
- the second aspect of an embodiment of the present application provides a data processing method, which is implemented through the trained dialogue model involved in the first aspect.
- the method includes: obtaining a user's question, which is used to describe the user's item recommendation needs; inputting the user's question into the trained dialogue model to obtain an answer corresponding to the question, and the answer is used to describe the item recommendation results for the user.
- a third aspect of an embodiment of the present application provides a conversation data generating device, which includes: an acquisition module for acquiring user data, the user data including user attributes and items of interest to the user; a determination module for determining recommendable items based on the user data, the recommendable items including items of interest to the user and items associated with the items of interest to the user; an update module for updating preset data generation rules based on the user data and the recommendable items to obtain new data generation rules; and a generation module for generating conversation data between a user and a conversation model based on the new data generation rules, the conversation data including items recommended to the user by the conversation model, and the items recommended to the user by the conversation model are from the recommendable items.
- user data can be obtained first, and the user data includes the attributes of the user and the items that the user is interested in. Then, the user data can be processed to obtain recommended items, and the recommended items include items that the user is interested in and items associated with the items that the user is interested in. Then, the preset data generation rules can be updated using the user data and the recommended items to obtain new data generation rules. Finally, the dialogue data between the user and the dialogue model can be generated according to the new data generation rules, and the dialogue data includes the items recommended to the user by the dialogue model, and the items recommended to the user by the dialogue model come from the recommended items.
- the above process provides a dialogue data generation framework, which can use the data generation rules preset by the collected user data set to obtain new data generation rules, and use the new data generation rules to obtain the dialogue data between the user and the dialogue model. It can be seen that the framework can automatically generate dialogue data, and the entire generation process of dialogue data does not require manual intervention, which can effectively improve the generation efficiency of dialogue data and reduce the generation cost of dialogue data.
- the determination module is further used to determine non-recommended items based on user data; the update module is used to update preset data generation rules based on user data, recommendable items and non-recommended items to obtain new data generation rules.
- the determination module is used to: extract features from user data and multiple candidate items to obtain features of the user data and features of the multiple candidate items; calculate the features of the user data and features of the multiple candidate items to obtain a matching degree between the user data and the multiple candidate items; and determine a candidate item having a matching degree greater than or equal to a first threshold as a recommendable item.
- the determination module is used to determine candidate items whose matching degree is less than or equal to a second threshold as non-recommended items, where the second threshold is less than the first threshold.
- the preset data generation rules include rules that do not need to be supplemented and rules to be supplemented
- the update module is used to: fill the user data, recommended items and non-recommended items into the rules to be supplemented to obtain the supplemented rules.
- the rules that do not need to be supplemented and the supplemented rules constitute new data generation rules.
- the rules that do not need to be supplemented are used to set the format of the dialogue data, and the supplemented rules are used to set the content of the dialogue data.
- the device also includes: a screening module, used to obtain target conversation data from the conversation data, and the target conversation data satisfies at least one of the following: all texts contained in the target conversation data are located in a preset text set; the description of the object contained in the target conversation data conforms to the real description; the object contained in the target conversation data is a real object; the richness of the content contained in the target conversation data is greater than or equal to a third threshold.
- a screening module used to obtain target conversation data from the conversation data, and the target conversation data satisfies at least one of the following: all texts contained in the target conversation data are located in a preset text set; the description of the object contained in the target conversation data conforms to the real description; the object contained in the target conversation data is a real object; the richness of the content contained in the target conversation data is greater than or equal to a third threshold.
- the device further includes: a training module, configured to train the dialogue model based on target dialogue data to obtain a trained dialogue model.
- the fourth aspect of an embodiment of the present application provides a data processing device, which includes the trained dialogue model involved in the third aspect, and the device includes: an acquisition module, used to obtain a user's question, and the user's question is used to describe the user's item recommendation needs; a processing module, used to input the user's question into the trained dialogue model to obtain an answer corresponding to the question, and the answer is used to describe the item recommendation result for the user.
- a fifth aspect of an embodiment of the present application provides a conversation data generating device, which includes a memory and a processor; the memory stores code, and the processor is configured to execute the code.
- the conversation data generating device performs the method described in the first aspect or any possible implementation method of the first aspect.
- a sixth aspect of an embodiment of the present application provides a data processing device, which includes a memory and a processor; the memory stores code, and the processor is configured to execute the code.
- the data processing device executes the method described in the second aspect or any possible implementation method of the second aspect.
- a seventh aspect of an embodiment of the present application provides a circuit system, which includes a processing circuit, and the processing circuit is configured to execute a method as described in the first aspect, any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect.
- An eighth aspect of an embodiment of the present application provides a chip system, which includes a processor for calling a computer program or computer instructions stored in a memory so that the processor executes a method as described in the first aspect, any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect.
- the processor is coupled to the memory through an interface.
- the chip system also includes a memory, in which a computer program or computer instructions are stored.
- a ninth aspect of an embodiment of the present application provides a computer storage medium storing a computer program, which, when executed by a computer, enables the computer to implement the method described in the first aspect, any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect.
- the tenth aspect of the embodiments of the present application provides a computer program product, which stores instructions, which, when executed by a computer, enable the computer to implement the method described in the first aspect, any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect.
- the user data when it is necessary to generate the dialogue data between the user and the dialogue model, the user data may be obtained first, and the user data includes the attributes of the user and the items that the user is interested in. Then, the user data may be processed to obtain the recommended items, and the recommended items include the items that the user is interested in and the items associated with the items that the user is interested in. Then, the preset data generation rules may be updated using the user data and the recommended items, so as to obtain new data generation rules. Finally, the dialogue data between the user and the dialogue model may be generated according to the new data generation rules, and the dialogue data includes the items recommended to the user by the dialogue model, and the items recommended to the user by the dialogue model are from the recommended items.
- the above process provides a dialogue data generation framework, which may obtain new data generation rules using the data generation rules preset by the collected user data set, and obtain the dialogue data between the user and the dialogue model using the new data generation rules. It can be seen that the framework can automatically generate dialogue data, and the entire generation process of dialogue data does not require manual intervention, which can effectively improve the generation efficiency of dialogue data and reduce the generation cost of dialogue data.
- FIG1 is a schematic diagram of a structure of an artificial intelligence main framework
- FIG2a is a schematic diagram of a structure of a data processing system provided in an embodiment of the present application.
- FIG2b is another schematic diagram of the structure of the data processing system provided in an embodiment of the present application.
- FIG2c is a schematic diagram of a data processing related device provided in an embodiment of the present application.
- FIG3 is a schematic diagram of the architecture of the system 100 provided in an embodiment of the present application.
- FIG4 is a schematic diagram of a structure of a dialogue data generation architecture provided in an embodiment of the present application.
- FIG5 is a flow chart of a method for generating conversation data according to an embodiment of the present application.
- FIG6 is a schematic diagram of a user data conversion process provided by an embodiment of the present application.
- FIG7 is a schematic diagram of a process for obtaining recommendable items according to an embodiment of the present application.
- FIG8 is a schematic diagram of a process for obtaining data generation rules provided in an embodiment of the present application.
- FIG9 is a schematic diagram of a process for acquiring conversation data provided in an embodiment of the present application.
- FIG10 is a schematic diagram of a process for acquiring conversation data provided in an embodiment of the present application.
- FIG11 is a schematic diagram of a scoring result provided in an embodiment of the present application.
- FIG12 is another schematic diagram of the scoring results provided in an embodiment of the present application.
- FIG13 is another schematic diagram of the scoring results provided in an embodiment of the present application.
- FIG14 is another schematic diagram of the scoring results provided in an embodiment of the present application.
- FIG15 is a flow chart of a data processing method provided in an embodiment of the present application.
- FIG16 is a schematic diagram of the structure of a conversation data generating device provided in an embodiment of the present application.
- FIG17 is a schematic diagram of a structure of a data processing device provided in an embodiment of the present application.
- FIG18 is a schematic diagram of a structure of an execution device provided in an embodiment of the present application.
- FIG19 is a schematic diagram of a structure of a training device provided in an embodiment of the present application.
- FIG. 20 is a schematic diagram of the structure of a chip provided in an embodiment of the present application.
- the embodiments of the present application provide a method for generating conversation data and related devices thereof, which can effectively improve the efficiency of generating conversation data and reduce the cost of generating conversation data.
- the conversational model with item recommendation function (also called the language large model with item recommendation function) demonstrates strong natural language understanding and communication capabilities.
- the model can recommend items to users by having conversations with them, thereby meeting users' item recommendation needs.
- conversation data for model training through crowdsourcing projects.
- the staff in the crowdsourcing project can play the role of users and conversation models respectively, and generate conversation data between users and conversation models according to the information provided by the preset knowledge graph.
- the relevant content in the conversation data and the items recommended to users by the conversation model are extracted by the staff from the knowledge graph.
- the conversation data can be used to train the recommendation model, and the trained recommendation model can learn the interests and preferences of users, so as to recommend items to users.
- AI technology is a technical discipline that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence. AI technology obtains the best results by sensing the environment, acquiring knowledge and using knowledge.
- artificial intelligence technology is a branch of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence.
- Using artificial intelligence for data processing is a common application of artificial intelligence.
- the data on the upper layer of the infrastructure is used to represent the data sources in the field of artificial intelligence.
- the data involves graphics, images, voice, text, and IoT data of traditional devices, including business data of existing systems and perception data such as force, displacement, liquid level, temperature, and humidity.
- Data processing usually includes data training, machine learning, deep learning, search, reasoning, decision-making and other methods.
- Reasoning refers to the process of simulating human intelligent reasoning in computers or intelligent systems, using formalized information to perform machine thinking and solve problems based on reasoning control strategies. Typical functions are search and matching.
- Decision-making refers to the process of making decisions after intelligent information is reasoned, usually providing functions such as classification, sorting, and prediction.
- Smart products and industry applications refer to the products and applications of artificial intelligence systems in various fields. They are the encapsulation of the overall artificial intelligence solution, which productizes intelligent information decision-making and realizes practical applications. Its application areas mainly include: smart terminals, smart transportation, smart medical care, autonomous driving, smart cities, etc.
- FIG2a is a schematic diagram of a data processing system provided in an embodiment of the present application, wherein the data processing system includes a user device and a data processing device.
- the user device includes an intelligent terminal such as a mobile phone, a personal computer or an information processing center.
- the user device is the initiator of data processing, and as the initiator of a data processing request, a user usually initiates a request through the user device.
- the above-mentioned data processing device can be a device or server with data processing function such as a cloud server, a network server, an application server and a management server.
- the data processing device receives data processing requests from the intelligent terminal through an interactive interface, and then performs data processing in the form of machine learning, deep learning, search, reasoning, decision-making, etc. through the memory for storing data and the processor for data processing.
- the memory in the data processing device can be a general term, including local storage and databases for storing historical data.
- the database can be on the data processing device or on other network servers.
- the user device can receive the user's instructions. For example, the user device can obtain the question input/selected by the user, and then initiate a request to the data processing device, so that the data processing device performs a series of processing on the question from the user device, thereby obtaining the processing result of the question.
- the user device can obtain the question input by the user (for example, the question can describe the user's item recommendation needs), and then the user device can initiate a data processing request to the data processing device, so that the data processing device performs a series of processing on the question based on the data processing request, thereby obtaining the processing result of the question, that is, the corresponding answer (for example, the answer can describe the item recommendation result for the user, that is, the item recommended to the user).
- the question can describe the user's item recommendation needs
- the data processing device may execute the data processing method of the embodiment of the present application.
- Figure 2b is another structural diagram of the data processing system provided in an embodiment of the present application.
- the user device directly serves as a data processing device.
- the user device can directly obtain input from the user and directly process it by the hardware of the user device itself.
- the specific process is similar to that of Figure 2a. Please refer to the above description and will not be repeated here.
- the user device can receive instructions from the user. For example, the user device can obtain a question input by the user (for example, the question can describe the user's item recommendation needs), and then the user device can perform a series of processing on the question to obtain a processing result of the question, that is, a corresponding answer (for example, the answer can describe the item recommendation result for the user, that is, the item recommended to the user).
- a question input by the user for example, the question can describe the user's item recommendation needs
- the user device can perform a series of processing on the question to obtain a processing result of the question, that is, a corresponding answer (for example, the answer can describe the item recommendation result for the user, that is, the item recommended to the user).
- the user equipment itself can execute the data processing method of the embodiment of the present application.
- FIG. 2c is a schematic diagram of a data processing related device provided in an embodiment of the present application.
- the user device in the above Figures 2a and 2b can specifically be the local device 301 or the local device 302 in Figure 2c
- the data processing device in Figure 2a can specifically be the execution device 210 in Figure 2c
- the data storage system 250 can store the data to be processed of the execution device 210
- the data storage system 250 can be integrated on the execution device 210, and can also be set on the cloud or other network servers.
- the processors in Figures 2a and 2b can perform data training/machine learning/deep learning through a neural network model or other models (for example, a model based on a support vector machine), and use the model finally trained or learned by the data to execute data processing applications on the image, thereby obtaining corresponding processing results.
- a neural network model or other models for example, a model based on a support vector machine
- FIG3 is a schematic diagram of the architecture of the system 100 provided in an embodiment of the present application.
- the execution device 110 configures the input/output
- the input/output (I/O) interface 112 is used for data interaction with external devices.
- the user can input data to the I/O interface 112 through the client device 140.
- the input data may include: various tasks to be scheduled, callable resources and other parameters in the embodiment of the present application.
- the execution device 110 When the execution device 110 preprocesses the input data, or when the computing module 111 of the execution device 110 performs calculation and other related processing (such as implementing the functions of the neural network model in the present application), the execution device 110 can call the data, code, etc. in the data storage system 150 for corresponding processing, and can also store the data, instructions, etc. obtained by the corresponding processing in the data storage system 150.
- the I/O interface 112 returns the processing result to the client device 140 so as to provide it to the user.
- the training device 120 can generate corresponding target models (e.g., the trained dialogue model provided in the embodiment of the present application)/rules based on different training data for different goals or different tasks, and the corresponding target models/rules can be used to achieve the above goals or complete the above tasks, thereby providing the user with the desired results.
- the training data can be stored in the database 130 and come from the training samples collected by the data collection device 160.
- the user can manually give input data, and the manual giving can be operated through the interface provided by the I/O interface 112.
- the client device 140 can automatically send input data to the I/O interface 112. If the client device 140 is required to automatically send input data and needs to obtain the user's authorization, the user can set the corresponding authority in the client device 140.
- the user can view the results output by the execution device 110 on the client device 140, and the specific presentation form can be a specific method such as display, sound, action, etc.
- the client device 140 can also be used as a data acquisition terminal to collect the input data of the input I/O interface 112 and the output results of the output I/O interface 112 as shown in the figure as new sample data, and store them in the database 130.
- the I/O interface 112 directly stores the input data of the input I/O interface 112 and the output results of the output I/O interface 112 as new sample data in the database 130.
- FIG3 is only a schematic diagram of a system architecture provided by an embodiment of the present application, and the positional relationship between the devices, components, modules, etc. shown in the figure does not constitute any limitation.
- the data storage system 150 is an external memory relative to the execution device 110. In other cases, the data storage system 150 can also be placed in the execution device 110.
- a neural network can be obtained by training according to the training device 120.
- the embodiment of the present application also provides a chip, which includes a neural network processor NPU.
- the chip can be set in the execution device 110 as shown in Figure 3 to complete the calculation work of the calculation module 111.
- the chip can also be set in the training device 120 as shown in Figure 3 to complete the training work of the training device 120 and output the target model/rule.
- Neural network processor NPU is mounted on the main central processing unit (CPU) (host CPU) as a coprocessor, and the main CPU assigns tasks.
- the core part of NPU is the operation circuit, and the controller controls the operation circuit to extract data from the memory (weight memory or input memory) and perform operations.
- the arithmetic circuit includes multiple processing units (process engines, PEs) internally.
- the arithmetic circuit is a two-dimensional systolic array.
- the arithmetic circuit can also be a one-dimensional systolic array or other electronic circuits capable of performing mathematical operations such as multiplication and addition.
- the arithmetic circuit is a general-purpose matrix processor.
- the operation circuit takes the corresponding data of matrix B from the weight memory and caches it on each PE in the operation circuit.
- the operation circuit takes the matrix A data from the input memory and performs matrix operations with matrix B.
- the partial results or final results of the matrix are stored in the accumulator.
- the vector calculation unit can further process the output of the operation circuit, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc.
- the vector calculation unit can be used for network calculations of non-convolutional/non-FC layers in neural networks, such as pooling, batch normalization, local response normalization, etc.
- the vector computation unit can store the processed output vector to a unified buffer.
- the vector computation unit can apply a nonlinear function to the output of the computation circuit, such as a vector of accumulated values, to generate an activation value.
- the vector computation unit generates a normalized value, a merged value, or both.
- the processed output vector can be used as an activation input to the computation circuit, such as for use in a subsequent layer in a neural network.
- the unified memory is used to store input data and output data.
- the weight data is directly transferred from the external memory to the input memory and/or the unified memory through the direct memory access controller (DMAC), the weight data in the external memory is stored in the weight memory, and the data in the unified memory is stored in the external memory.
- DMAC direct memory access controller
- the bus interface unit (BIU) is used to enable interaction between the main CPU, DMAC and instruction fetch memory through the bus.
- An instruction fetch buffer connected to the controller, used to store instructions used by the controller
- the controller is used to call the instructions cached in the memory to control the working process of the computing accelerator.
- the unified memory, input memory, weight memory and instruction fetch memory are all on-chip memories
- the external memory is a memory outside the NPU, which can be a double data rate synchronous dynamic random access memory (DDR SDRAM), a high bandwidth memory (HBM) or other readable and writable memory.
- DDR SDRAM double data rate synchronous dynamic random access memory
- HBM high bandwidth memory
- a neural network may be composed of neural units, and a neural unit may refer to an operation unit with xs and intercept 1 as input, and the output of the operation unit may be:
- n is a natural number greater than 1
- Ws is the weight of xs
- b is the bias of the neural unit.
- f is the activation function of the neural unit, which is used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into the output signal.
- the output signal of the activation function can be used as the input of the next convolutional layer.
- the activation function can be a sigmoid function.
- a neural network is a network formed by connecting many of the above-mentioned single neural units together, that is, the output of one neural unit can be the input of another neural unit.
- the input of each neural unit can be connected to the local receptive field of the previous layer to extract the characteristics of the local receptive field.
- the local receptive field can be an area composed of several neural units.
- space is used here because the classified object is not a single thing, but a class of things, and space refers to the collection of all individuals of this class of things.
- W is a weight vector, and each value in the vector represents the weight value of a neuron in the neural network of this layer.
- the vector W determines the spatial transformation from the input space to the output space described above, that is, the weight W of each layer controls how to transform the space.
- the purpose of training a neural network is to finally obtain the weight matrix of all layers of the trained neural network (the weight matrix formed by many layers of vectors W). Therefore, the training process of a neural network is essentially about learning how to control spatial transformations, or more specifically, learning the weight matrix.
- Neural networks can use the error back propagation (BP) algorithm to correct the size of the parameters in the initial neural network model during the training process, so that the reconstruction error loss of the neural network model becomes smaller and smaller. Specifically, the forward transmission of the input signal to the output will generate error loss, and the error loss information is back-propagated to update the parameters in the initial neural network model, so that the error loss converges.
- the back propagation algorithm is a back propagation movement dominated by error loss, which aims to obtain the optimal parameters of the neural network model, such as the weight matrix.
- the method provided in the present application is described below from the training side of the neural network and the application side of the neural network.
- the dialogue data generation method provided in the embodiment of the present application can generate dialogue data between a user and a dialogue model, and use the dialogue data as training data to train the dialogue model, thereby obtaining a trained dialogue model.
- the processing of data sequences is involved, which can be specifically applied to data training, machine learning, deep learning and other methods, and the training data (for example, the dialogue data in the dialogue data generation method provided in the embodiment of the present application) is symbolized and formalized for intelligent information modeling, extraction, preprocessing, training, etc., and finally a trained neural network (for example, the trained dialogue model in the dialogue data generation method provided in the embodiment of the present application) is obtained; and the data processing method provided in the embodiment of the present application can use the above-mentioned trained neural network to input input data (for example, the question in the data processing method provided in the embodiment of the present application) into the trained neural network to obtain output data (for example, the answer in the data processing method provided in the embodiment of the present application).
- the dialogue data generation method and the data processing method provided in the embodiment of the present application are inventions based on the same concept, and can also be understood as two parts in a system, or two stages of an overall process: such as the model training stage and the model application stage.
- FIG 4 is a structural diagram of the conversation data generation architecture provided in the embodiment of the present application.
- the architecture includes: obtaining user data in non-text form and converting it into user data in text form. Next, new data generation rules can be generated based on the user data in text form combined with preset data generation rules. Then, the new data generation rules can be used to obtain conversation data. Finally, the target conversation data is filtered out from the conversation data, and the target conversation data can be used as training data to train the final model.
- the workflow is further introduced below in conjunction with Figure 5.
- Figure 5 is a flow diagram of the conversation data generation method provided in the embodiment of the present application. As shown in Figure 5, the method includes:
- 501 Obtain user data, where the user data includes user attributes and items that the user is interested in.
- User data may be collected first.
- User data may generally include user attributes (for example, user's name, user's gender, user's age, etc.) and items of user interest (preference) (for example, items that the user has clicked on, items that the user has browsed, items that the user has commented on, etc.).
- user data can be obtained in the following ways:
- the user data that can be directly collected is in non-text form, so the collected non-text user data can be converted into text form to facilitate subsequent processing.
- the user's attributes are generally located in the user's personal information. Therefore, the user's personal information can be collected first (the user's personal information is usually an image or a table, etc.). At this time, the user's attributes are presented in non-text forms such as image form or table form. Then, the user's attributes presented in non-text form can be converted into user attributes presented in text form from the user's personal information.
- the items that users are interested in are generally located in the user's comments, browsing history, or click history. Therefore, the user's comments, the user's browsing history, or the user's click history can be collected first (the user's comments, the user's browsing history, or the user's click history is usually a table, etc.), and at this time, the items that users are interested in are presented in a non-text form such as a table. Then, the items that users are interested in presented in a non-text form can be converted from the user's comments, the user's browsing history, or the user's click history into items that users are interested in presented in a text form.
- Figure 6 is a schematic diagram of the user data conversion process provided in an embodiment of the present application
- the user's profile image, user comments, user browsing history, and user click history can be collected first.
- the user's profile image presents the following user attribute information: (1) User: Li XX; (2) Age: 22; (3) Location: Shenzhen; (4) Interests: movies and music, etc. Then, the following user attribute information in text form can be identified from the user's profile image: Li XX, a 22-year-old male user living in Shenzhen, whose interests and hobbies are watching movies and listening to music, etc.
- the user's comments include the following user's movie review information: (1) Movie 1 is the most interesting movie I have ever seen; (2) Movies 2 and 3 are boring, and their plots and performances are not outstanding, etc.
- the user's browsing/clicking records include the following user's movie browsing information/movie clicking information: (1) Movies watched: Movie 1 and Movie 4, etc.; (2) Movies you want to watch: Movie 5, Movie 6, Movie 7, etc.; (3) Movies you have browsed: Movie 8, Movie 9, etc.
- the following user movie preference information in text form can be extracted from the user's comments and the user's viewing/clicking records: User Zhang XX likes the following movies: Movie 5, Movie 6, Movie 7, Movie 8, Movie 9, etc., and user Zhang XX has watched the following movies: Movie 1 and Movie 4.
- the user data can be input into the item sampling model (which is a trained neural network model) to perform a series of processing on the user data through the item sampling model, thereby obtaining items that can be recommended to the user.
- the items that can be recommended to the user can be presented in the form of an item list, which includes not only the items that the user is interested in in the user data, but also the remaining items associated with the items that the user is interested in.
- the item sampling model After a series of processing of the user data by the item sampling model, not only the recommended items but also the items that cannot be recommended to the user (that is, the items that the user is not interested in) can be obtained. It should be noted that the items that cannot be recommended to the user can also be presented in the form of an item list.
- the item sampling model can obtain items that can be recommended to users and items that cannot be recommended to users in the following ways:
- a preset candidate item pool may be obtained first.
- the candidate item pool includes multiple candidate items. Therefore, the user data and the multiple candidate items may be input into the item sampling model, so that the item sampling model performs feature extraction (e.g., convolution operation, etc.) on the user data and the multiple candidate items respectively, thereby obtaining features of the user data and features of the multiple candidate items accordingly.
- feature extraction e.g., convolution operation, etc.
- the item sampling model can calculate the features of the user data and the features of the multiple candidate items, thereby obtaining the matching degree between the user data and the multiple candidate items, including the matching degree between the user data and the first candidate item, the matching degree between the user data and the second candidate item, ..., the matching degree between the user data and the last candidate item.
- the item sampling model can determine the candidate items with a matching degree greater than or equal to the first threshold (the size of the first threshold can be set according to actual needs and is not limited here) among the multiple candidate items as items that can be recommended to the user. It should be noted that among the multiple candidate items, some of the candidate items are the same as the items that the user is interested in contained in the user data, so the matching degree between this part of the candidate items and the user data is the largest (significantly greater than the first threshold), and can be determined as items that can be recommended to the user.
- the candidate items are associated with the items that the user is interested in contained in the user data, so the matching degree between this part of the candidate items and the user data is relatively large (greater than or equal to the first threshold), and can be determined as items that can be recommended to the user. It can be seen that the items that can be recommended to the user include not only the items that the user is interested in in the user data, but also the items associated with the items that the user is interested in.
- the item sampling model can determine the candidate items with a matching degree less than or equal to the second threshold (the second threshold is less than the first threshold, and the size of the second threshold can be set according to actual needs and is not limited here) among the multiple candidate items as items that cannot be recommended to the user. It should be noted that among the multiple candidate items, some of the candidate items are completely irrelevant to the items that the user is interested in and included in the user data. Therefore, the matching degree between this part of the candidate items and the user data is relatively small (less than or equal to the second threshold), and they can be determined as items that cannot be recommended to the user, that is, items that the user is not interested in.
- FIG. 7 is a schematic diagram of the acquisition process of the recommended items provided in the embodiment of the present application, and FIG7 is obtained on the basis of FIG6)
- the candidate movie pool can be obtained, and the candidate movie pool includes 50 candidate movies including movie 1, movie 2, movie 3, ..., movie 50.
- a recommended movie list and a non-recommended movie list can be obtained, and the recommended movie list includes: movie 1, movie 4, movie 5, ..., movie 20, and the non-recommended movie list includes: movie 2, movie 3, movie 21, ... movie 50.
- the preset data generation rules are updated to obtain new data generation rules.
- the preset data generation rules can be updated using the user data and the items that can be recommended to the user, thereby obtaining new data generation rules.
- the items that can be recommended to the user and the items that cannot be recommended to the user update the preset data generation rules (also called preset data generation instructions) to obtain new data generation rules (also called new data generation instructions).
- new data generation rules can be obtained in the following ways:
- the preset data generation rules may include two parts, one part is the rules that do not need to be supplemented (i.e., complete rules), and the other part is the rules to be supplemented (i.e., incomplete rules), and the rules to be supplemented have slots that can be filled with content. Then, user data, recommended items, and non-recommended items can be filled into the slots of the rules to be supplemented, thereby obtaining the supplemented rules.
- the rules that do not need to be supplemented and the supplemented rules constitute new data generation rules, wherein the rules that do not need to be supplemented are used to set the format of the dialogue data between the user and the dialogue model (for example, the number of question and answer rounds of the dialogue data, the way to start the dialogue data (i.e., the dialogue data is started in the form of small talk), the language style of the dialogue data, the behavioral norms of the user and the dialogue model in the dialogue data, the dialogue data must contain descriptions of items, etc.), and the supplemented rules are used to set the content of the dialogue data between the user and the dialogue model (for example, the dialogue data must consider the user's personal information, the dialogue data must present the user's recommendation needs, the range of recommended items that the dialogue model must meet in the dialogue data, etc.).
- the rules that do not need to be supplemented are used to set the format of the dialogue data between the user and the dialogue model (for example, the number of question and answer rounds of the dialogue data, the way to start the dialogue data (
- FIG8 is a schematic diagram of the acquisition process of the data generation rules provided in the embodiment of the present application, and FIG8 is obtained by drawing on the basis of FIG7)
- 13 preset data generation instructions can be obtained, among which data generation instruction (5), data generation instruction (6), data generation instruction (7), and data generation instruction (10) are all incomplete rules, and the remaining data generation instructions are all complete rules.
- the preset data generation instructions can be used to supplement the incomplete rules with user attribute information, user preference information, the recommended movie list, and the non-recommended movie list, thereby obtaining 13 new data generation instructions:
- the dialogue data must contain 10 rounds of questions and answers, but not more than 20 rounds.
- the dialogue model can only recommend one movie to the user in each round and cannot recommend movies to the user outside the recommended movie list.
- the conversation model In the conversation data, the conversation model must explore the user’s taste and interest in movies and adjust the recommendation strategy based on user feedback.
- the user is a 22-year-old male user living in Shenzhen. His hobbies include watching movies and listening to music, etc.
- the user’s favorite movies are: Movie 1, Movie 4, Movie 5, Movie 6, Movie 7, Movie 8, Movie 9, and so on.
- the movies that the user dislikes are: Movie 2 and Movie 3.
- the new data generation rules can be input into the dialogue model (neural network model to be trained), so the dialogue model can generate dialogue data between the user and the dialogue model according to the new data generation rules.
- the dialogue data between the user and the dialogue model usually includes multiple rounds of interaction, which include multiple rounds of ordinary dialogue and multiple rounds of question and answer.
- Each round of ordinary dialogue includes a non-question sentence of the user and a reply of the dialogue model (or, each round of ordinary dialogue includes a non-question sentence of the dialogue model and a reply of the user), and each round of question and answer includes a question of the user and an answer of the dialogue model (or, each round of question and answer includes a question of the dialogue model and an answer of the user).
- the user's question can be to ask the dialogue model to recommend items to the user, and the dialogue model's answer can be the item recommended by the dialogue model to the user.
- the items recommended by the dialogue model to the user come from recommended items (this can simulate the user accepting the recommendation) or from unrecommended items (this can simulate the user rejecting the recommendation).
- the user's words can be the chat initiated by the user to the dialogue model, and the dialogue model's reply can be the dialogue model's response to the user's chat, and so on.
- the content of the final generated dialogue data includes not only the content of the chat between the user and the dialogue model, but also the content of the user accepting the items recommended by the dialogue model, and even the content of the user rejecting the items recommended by the dialogue model, so that the final generated dialogue data is closer to reality.
- FIG. 9 is a schematic diagram of a process of acquiring dialogue data provided in an embodiment of the present application, and FIG. 9 is drawn on the basis of FIG. 8
- the 13 new data generation instructions can be input into the dialogue model, so that the dialogue model generates the following dialogue data (including 10 rounds of interaction):
- Dialogue model How about ⁇ Movie 4>? It's a classic [science fiction] movie.
- Dialogue Model How about Movie 21? It's a suspenseful thriller with a great cast.
- Dialogue model ⁇ Movie 15> How is this movie? It is a science fiction movie set in a spaceship.
- Dialogue Model The main characters are [G] and [J], ⁇ They travel to a new planet in a spaceship. But they wake up from hibernation 90 years early and have to find a way to survive together ⁇ .
- Dialogue Model Great! My other recommendation is Movie 1. It's a [dystopian] movie about a [teenage death-defying competition].
- Dialogue Model How about ⁇ Movie 35>? This is another [dystopian] movie about ⁇ a society where people are divided into factions based on their personality traits ⁇ .
- Dialogue Model How about ⁇ Movie 30>, which is ⁇ a story about a thief who pretends to be a warlord ⁇ .
- the target dialogue data is used to train the dialogue model to obtain a trained dialogue model.
- the dialogue data can be input into the data screening model (trained neural network model) to screen out several rounds of interaction from the multiple rounds of interaction contained in the dialogue data. These several rounds of interaction are the target dialogue data.
- the target dialogue data satisfies at least one of the following: (1) All the texts contained in the target dialogue data are in a preset text set (all the texts contained in the preset text set are non-violation texts, which can also be understood as non-discriminatory, non-prejudiced and non-insulting texts). (2) The description of the object contained in the target dialogue data is consistent with the real description. (3) The objects contained in the target dialogue data are all real objects.
- the richness of the content contained in the target dialogue data is greater than or equal to a third threshold (the size of the third threshold can be set according to actual needs and is not limited here), wherein the richness of the content contained in the target dialogue data can be calculated based on information such as the number of interaction rounds of the target dialogue data, the length of the target dialogue data, and the number of objects contained in the target dialogue data.
- Figure 10 is a schematic diagram of the process of obtaining dialogue data provided by an embodiment of the present application, and Figure 10 is drawn on the basis of Figure 9), after obtaining the dialogue data, the dialogue data can be input into the data screening model.
- the data screening model includes a violation detection module, an entity authenticity detection module, a description authenticity detection module, and a richness detection module, wherein, in the multiple rounds of interactions contained in the dialogue data, the violation detection module can eliminate interactions containing illegal information such as discrimination, prejudice, and insults, the entity authenticity detection module can (with the help of a knowledge graph or information library that records various information such as real movies, real entities, and the relationship between real movies and real entities, etc.) eliminate interactions containing unreal information such as unreal movies and unreal entities (directors, actors, plots), the description authenticity detection module can (with the help of a public search platform that records the real description (introduction) of each movie, etc.) eliminate interactions containing unreal information such as unreal movie descriptions, and the richness detection module can (based on the richness (based on the distinctiveness of questions and answers, questions and answers) The degree of distinction, the degree of difference ... The insufficient interactions are eliminated, and the remaining interactions constitute the target dialogue data.
- the violation detection module can eliminate interactions containing illegal information such
- the target dialogue data can be used as training data to train the dialogue model to obtain a trained dialogue model (trained neural network model), that is, a dialogue model with an item recommendation function.
- a trained dialogue model trained neural network model
- step 505 is optional. In actual applications, step 505 may not be performed, but the dialogue data obtained in step 504 may be directly used as training data to train the dialogue model and obtain a trained dialogue model.
- the conversation data generated by the embodiment of the present application can be compared with the conversation data obtained (manually annotated) by the staff of the crowdsourcing project.
- the comparison results are shown in Table 1:
- the conversation data generated by the embodiment of the present application and the conversation data obtained (manually annotated) by the staff of the crowdsourcing project can be scored by four evaluators on four additional indicators, namely role consistency, fluency, informativeness and interestingness (the scores of these four indicators are all between 1 and 5 points, where 1 is the worst and 5 is the best), and the scoring results are shown in Figures 11 to 14 (Figure 11 is a schematic diagram of the scoring results provided by the embodiment of the present application, Figure 12 is another schematic diagram of the scoring results provided by the embodiment of the present application, Figure 13 is another schematic diagram of the scoring results provided by the embodiment of the present application, and Figure 14 is another schematic diagram of the scoring results provided by the embodiment of the present application).
- the user data when it is necessary to generate the dialogue data between the user and the dialogue model, the user data may be obtained first, and the user data includes the attributes of the user and the items that the user is interested in. Then, the user data may be processed to obtain the recommended items, and the recommended items include the items that the user is interested in and the items associated with the items that the user is interested in. Then, the preset data generation rules may be updated using the user data and the recommended items, so as to obtain new data generation rules. Finally, the dialogue data between the user and the dialogue model may be generated according to the new data generation rules, and the dialogue data includes the items recommended to the user by the dialogue model, and the items recommended to the user by the dialogue model are from the recommended items.
- a neural network model (item collection model, dialogue model and data screening model) is used to replace the manually generated dialogue data. Since the neural network model itself has powerful learning and understanding capabilities, it can accurately generate high-quality dialogue data according to data generation rules, which is beneficial to subsequent data cleaning and evaluation, and can enable the dialogue model obtained by subsequent training to have better performance.
- FIG. 15 is a flow chart of the data processing method provided in the embodiment of the present application. As shown in FIG. 15 , the method includes:
- the user's question can be input into the trained dialogue model in the embodiment shown in Figure 5, so as to process the user through the trained dialogue model to obtain an answer corresponding to the question.
- the answer is used to describe the item recommendation result for the user, that is, the item recommended to the user.
- FIG16 is a structural diagram of the conversation data generation device provided in the embodiment of the present application. As shown in FIG16, the device includes:
- the acquisition module 1601 is used to acquire user data, where the user data includes user attributes and items that the user is interested in;
- a determination module 1602 configured to determine recommendable items based on user data, wherein the recommendable items include items that the user is interested in, and items associated with the items that the user is interested in;
- the generation module 1604 is used to generate dialogue data between the user and the dialogue model based on the new data generation rule, where the dialogue data includes items recommended by the dialogue model to the user, and the items recommended by the dialogue model to the user are from the recommendable items.
- the user data when it is necessary to generate the dialogue data between the user and the dialogue model, the user data may be obtained first, and the user data includes the attributes of the user and the items that the user is interested in. Then, the user data may be processed to obtain the recommended items, and the recommended items include the items that the user is interested in and the items associated with the items that the user is interested in. Then, the preset data generation rules may be updated using the user data and the recommended items, so as to obtain new data generation rules. Finally, the dialogue data between the user and the dialogue model may be generated according to the new data generation rules, and the dialogue data includes the items recommended to the user by the dialogue model, and the items recommended to the user by the dialogue model are from the recommended items.
- the above process provides a dialogue data generation framework, which may obtain new data generation rules using the data generation rules preset by the collected user data set, and obtain the dialogue data between the user and the dialogue model using the new data generation rules. It can be seen that the framework can automatically generate dialogue data, and the entire generation process of dialogue data does not require manual intervention, which can effectively improve the generation efficiency of dialogue data and reduce the generation cost of dialogue data.
- the determination module is further used to determine non-recommended items based on user data; the update module is used to update preset data generation rules based on user data, recommendable items and non-recommended items to obtain new data generation rules.
- the determination module is used to: extract features from user data and multiple candidate items to obtain features of the user data and features of the multiple candidate items; calculate the features of the user data and features of the multiple candidate items to obtain a matching degree between the user data and the multiple candidate items; and determine a candidate item having a matching degree greater than or equal to a first threshold as a recommendable item.
- the determination module is used to determine candidate items whose matching degree is less than or equal to a second threshold as non-recommended items, where the second threshold is less than the first threshold.
- the preset data generation rules include rules that do not need to be supplemented and rules to be supplemented
- the update module is used to: fill the user data, recommended items and non-recommended items into the rules to be supplemented to obtain the supplemented rules.
- the rules that do not need to be supplemented and the supplemented rules constitute new data generation rules.
- the rules that do not need to be supplemented are used to set the format of the dialogue data, and the supplemented rules are used to set the content of the dialogue data.
- the device also includes: a screening module, used to obtain target conversation data from the conversation data, and the target conversation data satisfies at least one of the following: all texts contained in the target conversation data are located in a preset text set; the description of the object contained in the target conversation data conforms to the real description; the object contained in the target conversation data is a real object; the richness of the content contained in the target conversation data is greater than or equal to a third threshold.
- a screening module used to obtain target conversation data from the conversation data, and the target conversation data satisfies at least one of the following: all texts contained in the target conversation data are located in a preset text set; the description of the object contained in the target conversation data conforms to the real description; the object contained in the target conversation data is a real object; the richness of the content contained in the target conversation data is greater than or equal to a third threshold.
- the device further includes: a training module, configured to train the dialogue model based on target dialogue data to obtain a trained dialogue model.
- FIG. 17 is a schematic diagram of a structure of a data processing device provided in an embodiment of the present application. As shown in FIG. 17 , the device includes:
- the acquisition module 1701 is used to acquire the user's question, which is used to describe the user's item recommendation needs.
- the processing module 1702 is used to input the user's question into the trained dialogue model to obtain an answer corresponding to the question, and the answer is used to describe the item recommendation result for the user.
- FIG18 is a schematic diagram of the structure of the execution device provided by the present application.
- the execution device 1800 can be specifically a mobile phone, a tablet, a laptop, a smart wearable device, a server, etc., which is not limited here.
- the execution device 1800 can be deployed with the data processing device described in the corresponding embodiment of FIG17 to implement FIG15. The function of data processing in the corresponding embodiment.
- the execution device 1800 includes: a receiver 1801, a transmitter 1802, a processor 1803 and a memory 1804 (wherein the number of processors 1803 in the execution device 1800 can be one or more, and one processor is taken as an example in FIG18), wherein the processor 1803 may include an application processor 18031 and a communication processor 18032.
- the receiver 1801, the transmitter 1802, the processor 1803 and the memory 1804 may be connected via a bus or other means.
- the memory 1804 may include a read-only memory and a random access memory, and provides instructions and data to the processor 1803. A portion of the memory 1804 may also include a non-volatile random access memory (NVRAM).
- NVRAM non-volatile random access memory
- the memory 1804 stores processor and operation instructions, executable modules or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.
- the processor 1803 controls the operation of the execution device.
- the various components of the execution device are coupled together through a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus, and a status signal bus, etc.
- the bus system includes not only a data bus but also a power bus, a control bus, and a status signal bus, etc.
- various buses are referred to as bus systems in the figure.
- the method disclosed in the above embodiment of the present application can be applied to the processor 1803, or implemented by the processor 1803.
- the processor 1803 can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 1803 or the instruction in the form of software.
- the above processor 1803 can be a general processor, a digital signal processor (digital signal processing, DSP), a microprocessor or a microcontroller, and can further include an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
- the processor 1803 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application.
- the general processor can be a microprocessor or the processor can also be any conventional processor, etc.
- the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to be executed, or a combination of hardware and software modules in the decoding processor can be executed.
- the software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc.
- the storage medium is located in the memory 1804, and the processor 1803 reads the information in the memory 1804 and completes the steps of the above method in combination with its hardware.
- the receiver 1801 can be used to receive input digital or character information and generate signal input related to the relevant settings and function control of the execution device.
- the transmitter 1802 can be used to output digital or character information through the first interface; the transmitter 1802 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; the transmitter 1802 can also include a display device such as a display screen.
- the processor 1803 is used to obtain an answer corresponding to the user's question through the trained dialogue model in the corresponding embodiment of Figure 15.
- FIG. 19 is a structural schematic diagram of the training device provided by the embodiment of the present application.
- the training device 1900 is implemented by one or more servers.
- the training device 1900 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1919 (for example, one or more processors) and a memory 1932, and one or more storage media 1930 (for example, one or more mass storage devices) storing application programs 1942 or data 1944.
- the memory 1932 and the storage medium 1930 can be short-term storage or permanent storage.
- the program stored in the storage medium 1930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the training device. Furthermore, the central processor 1919 can be configured to communicate with the storage medium 1930 to execute a series of instruction operations in the storage medium 1930 on the training device 1900.
- the training device 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input and output interfaces 1958; or, one or more operating systems 1941, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
- the training device can execute the dialogue data generation method in the embodiment corresponding to Figure 5 to obtain dialogue data between the user and the dialogue model, and then train the dialogue model based on the dialogue data to obtain a trained dialogue model.
- An embodiment of the present application also relates to a computer storage medium, in which a program for signal processing is stored.
- the program When the program is run on a computer, the computer executes the steps executed by the aforementioned execution device, or the computer executes the steps executed by the aforementioned training device.
- An embodiment of the present application also relates to a computer program product, which stores instructions, which, when executed by a computer, enable the computer to execute the steps executed by the aforementioned execution device, or enable the computer to execute the steps executed by the aforementioned training device.
- the execution device, training device or terminal device provided in the embodiments of the present application may specifically be a chip, and the chip includes: a processing unit and a communication unit, wherein the processing unit may be, for example, a processor, and the communication unit may be, for example, an input/output interface, a pin or a circuit, etc.
- the processing unit may execute the computer execution instructions stored in the storage unit so that the chip in the execution device executes the data processing method described in the above embodiment, or so that the chip in the training device executes the data processing method described in the above embodiment.
- the storage unit is a storage unit in the chip, such as a register, a cache, etc.
- the storage unit may also be a storage unit located outside the chip in the wireless access device end, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.
- ROM read-only memory
- RAM random access memory
- FIG. 20 is a schematic diagram of the structure of a chip provided in an embodiment of the present application.
- the chip can be expressed as a neural network processor NPU 2000.
- NPU 2000 is mounted on the host CPU (Host CPU) as a coprocessor, and tasks are assigned by the Host CPU.
- the core part of the NPU is the operation circuit 2003, which is controlled by the controller 2004 to extract matrix data from the memory and perform multiplication operations.
- the operation circuit 2003 includes multiple processing units (Process Engine, PE) inside.
- the operation circuit 2003 is a two-dimensional systolic array.
- the operation circuit 2003 can also be a one-dimensional systolic array or other electronic circuits that can perform mathematical operations such as multiplication and addition.
- the operation circuit 2003 is a general-purpose matrix processor.
- the operation circuit takes the corresponding data of matrix B from the weight memory 2002 and caches it on each PE in the operation circuit.
- the operation circuit takes the matrix A data from the input memory 2001 and performs matrix operation with matrix B.
- the partial result or final result of the matrix is stored in the accumulator 2008.
- the unified memory 2006 is used to store input data and output data.
- the weight data is directly transferred to the weight memory 2002 through the direct memory access controller (DMAC) 2005.
- the input data is also transferred to the unified memory 2006 through the DMAC.
- DMAC direct memory access controller
- BIU stands for Bus Interface Unit, that is, bus interface unit 2013, which is used for the interaction between AXI bus and DMAC and instruction fetch buffer (IFB) 2009.
- IFB instruction fetch buffer
- the bus interface unit 2013 (Bus Interface Unit, BIU for short) is used for the instruction fetch memory 2009 to obtain instructions from the external memory, and is also used for the storage unit access controller 2005 to obtain the original data of the input matrix A or the weight matrix B from the external memory.
- DMAC is mainly used to transfer input data in the external memory DDR to the unified memory 2006 or to transfer weight data to the weight memory 2002 or to transfer input data to the input memory 2001.
- the vector calculation unit 2007 includes multiple operation processing units, and when necessary, further processes the output of the operation circuit 2003, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. It is mainly used for non-convolutional/fully connected layer network calculations in neural networks, such as Batch Normalization, pixel-level summation, upsampling of the predicted label plane, etc.
- the vector calculation unit 2007 can store the processed output vector to the unified memory 2006.
- the vector calculation unit 2007 can apply a linear function; or a nonlinear function to the output of the operation circuit 2003, such as linear interpolation of the predicted label plane extracted by the convolution layer, and then, for example, a vector of accumulated values to generate an activation value.
- the vector calculation unit 2007 generates a normalized value, a pixel-level summed value, or both.
- the processed output vector can be used as an activation input to the operation circuit 2003, for example, for use in a subsequent layer in a neural network.
- An instruction fetch buffer 2009 connected to the controller 2004, for storing instructions used by the controller 2004;
- the unified memory 2006, the input memory 2001, the weight memory 2002 and the instruction fetch memory 2009 are all on-chip memories.
- the external memory is private to the NPU hardware architecture.
- the processor mentioned in any of the above places may be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the above program.
- the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
- the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
- the technicians in the relevant field can clearly understand that the present application can be implemented by software. It can be implemented by hardware, and of course it can also be implemented by dedicated hardware including dedicated integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. In general, all functions performed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures used to implement the same function can also be various, such as analog circuits, digital circuits or dedicated circuits. However, for this application, software program implementation is a better implementation method in most cases.
- the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, U disk, mobile hard disk, ROM, RAM, disk or optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, training equipment, or network equipment, etc.) to execute the methods described in each embodiment of the present application.
- a readable storage medium such as a computer floppy disk, U disk, mobile hard disk, ROM, RAM, disk or optical disk, etc.
- all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof.
- all or part of the embodiments may be implemented in the form of a computer program product.
- the computer program product includes one or more computer instructions.
- the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
- the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
- the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center.
- the computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations.
- the available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
- a magnetic medium e.g., a floppy disk, a hard disk, a tape
- an optical medium e.g., a DVD
- a semiconductor medium e.g., a solid-state drive (SSD)
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Artificial Intelligence (AREA)
- Human Computer Interaction (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
La présente demande divulgue un procédé de génération de données de dialogue et un dispositif associé, qui peuvent améliorer efficacement l'efficacité de génération de données de dialogue et réduire le coût de génération de données de dialogue. Le procédé de la présente demande comprend les étapes suivantes : lorsque des données de dialogue entre un utilisateur et un modèle de dialogue doivent être générées, acquérir des données d'utilisateur, les données d'utilisateur comprenant des attributs de l'utilisateur et des articles qui intéressent l'utilisateur ; traiter les données d'utilisateur pour obtenir des articles recommandables, les articles recommandables comprenant les articles qui intéressent l'utilisateur et des articles associés aux articles qui intéressent l'utilisateur ; mettre à jour une règle de génération de données préréglée sur la base des données d'utilisateur et des articles recommandables, de façon à obtenir une nouvelle règle de génération de données ; et générer les données de dialogue entre l'utilisateur et le modèle de dialogue selon la nouvelle règle de génération de données, les données de dialogue comprenant des articles recommandés par le modèle de dialogue à l'utilisateur, et les articles recommandés par le modèle de dialogue à l'utilisateur provenant des articles recommandables.
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310724012.8A CN116910201A (zh) | 2023-06-16 | 2023-06-16 | 一种对话数据生成方法及其相关设备 |
| CN202310724012.8 | 2023-06-16 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024255677A1 true WO2024255677A1 (fr) | 2024-12-19 |
Family
ID=88363815
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2024/097727 Pending WO2024255677A1 (fr) | 2023-06-16 | 2024-06-06 | Procédé de génération de données de dialogue et dispositif associé |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN116910201A (fr) |
| WO (1) | WO2024255677A1 (fr) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116910201A (zh) * | 2023-06-16 | 2023-10-20 | 华为技术有限公司 | 一种对话数据生成方法及其相关设备 |
| CN117786414B (zh) * | 2024-02-23 | 2024-05-10 | 云南联合视觉科技有限公司 | 一种构建医学指令数据集的方法 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7720720B1 (en) * | 2004-08-05 | 2010-05-18 | Versata Development Group, Inc. | System and method for generating effective recommendations |
| CN111026932A (zh) * | 2019-12-20 | 2020-04-17 | 北京百度网讯科技有限公司 | 人机对话交互方法、装置、电子设备和存储介质 |
| WO2022198983A1 (fr) * | 2021-03-23 | 2022-09-29 | 苏州大学 | Procédé et appareil de recommandation de conversation, dispositif électronique et support de stockage |
| WO2023065859A1 (fr) * | 2021-10-20 | 2023-04-27 | 华为技术有限公司 | Procédé et appareil de recommandation d'article, et support de stockage |
| CN116108267A (zh) * | 2022-12-19 | 2023-05-12 | 华为技术有限公司 | 一种推荐方法及相关设备 |
| CN116910201A (zh) * | 2023-06-16 | 2023-10-20 | 华为技术有限公司 | 一种对话数据生成方法及其相关设备 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108009287A (zh) * | 2017-12-25 | 2018-05-08 | 北京中关村科金技术有限公司 | 一种基于对话系统的回答数据生成方法以及相关装置 |
| KR102445365B1 (ko) * | 2018-03-19 | 2022-09-20 | 현대자동차주식회사 | 대화 시스템, 이를 포함하는 차량 및 대화 처리 방법 |
| CN111737444B (zh) * | 2020-08-17 | 2020-11-20 | 腾讯科技(深圳)有限公司 | 对话生成方法、装置及电子设备 |
-
2023
- 2023-06-16 CN CN202310724012.8A patent/CN116910201A/zh active Pending
-
2024
- 2024-06-06 WO PCT/CN2024/097727 patent/WO2024255677A1/fr active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7720720B1 (en) * | 2004-08-05 | 2010-05-18 | Versata Development Group, Inc. | System and method for generating effective recommendations |
| CN111026932A (zh) * | 2019-12-20 | 2020-04-17 | 北京百度网讯科技有限公司 | 人机对话交互方法、装置、电子设备和存储介质 |
| WO2022198983A1 (fr) * | 2021-03-23 | 2022-09-29 | 苏州大学 | Procédé et appareil de recommandation de conversation, dispositif électronique et support de stockage |
| WO2023065859A1 (fr) * | 2021-10-20 | 2023-04-27 | 华为技术有限公司 | Procédé et appareil de recommandation d'article, et support de stockage |
| CN116108267A (zh) * | 2022-12-19 | 2023-05-12 | 华为技术有限公司 | 一种推荐方法及相关设备 |
| CN116910201A (zh) * | 2023-06-16 | 2023-10-20 | 华为技术有限公司 | 一种对话数据生成方法及其相关设备 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN116910201A (zh) | 2023-10-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111931062B (zh) | 一种信息推荐模型的训练方法和相关装置 | |
| CN110263324B (zh) | 文本处理方法、模型训练方法和装置 | |
| US20190303768A1 (en) | Community Question Answering-Based Article Recommendation Method, System, and User Device | |
| WO2025002350A1 (fr) | Procédé de traitement de données et appareil associé | |
| CN115510313A (zh) | 信息推荐方法、装置、存储介质及计算机设备 | |
| WO2023284716A1 (fr) | Procédé de recherche de réseau neuronal et dispositif associé | |
| WO2025001486A1 (fr) | Procédé et appareil de recommandation | |
| US20250225398A1 (en) | Data processing method and related apparatus | |
| WO2024255677A1 (fr) | Procédé de génération de données de dialogue et dispositif associé | |
| WO2024255755A1 (fr) | Procédé de traitement de données et dispositif associé | |
| WO2021136058A1 (fr) | Procédé et dispositif de traitement vidéo | |
| WO2025040048A1 (fr) | Procédé et appareil de traitement de données | |
| WO2024239983A1 (fr) | Procédé et appareil de génération pouvant être commandée | |
| WO2025016416A1 (fr) | Procédé de traitement de données et appareil associé | |
| WO2025026210A1 (fr) | Procédé et appareil de traitement de données | |
| CN112529149A (zh) | 一种数据处理方法及相关装置 | |
| WO2024002167A1 (fr) | Procédé de prédiction d'opération et appareil associé | |
| WO2023051678A1 (fr) | Procédé de recommandation et dispositif associé | |
| WO2024255781A1 (fr) | Procédé de traitement de données et appareil correspondant | |
| WO2024230757A1 (fr) | Procédé de traitement de données et appareil associé | |
| CN116204709A (zh) | 一种数据处理方法及相关装置 | |
| WO2024160186A1 (fr) | Procédé d'entraînement de modèle et dispositif associé | |
| WO2025021142A1 (fr) | Procédé de détection d'objets et dispositif associé | |
| CN119848227A (zh) | 查询意图理解和搜索结果生成 | |
| WO2025016352A1 (fr) | Procédé d'évaluation de vidéo et ses dispositifs associés |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 24822628 Country of ref document: EP Kind code of ref document: A1 |