Data generation method and device, storage medium and computing equipment

By introducing thinking chain technology into the pre-trained model, learning and applying different personality attributes, the problem of monotonous reply information in the rule-based dialogue reply generation technology is solved, and more flexible and personalized reply generation is achieved, improving the user experience.

CN119250041AActive Publication Date: 2025-01-03HANGZHOU NETZHIYI INNOVATION TECH CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202411776027.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-01-03
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

Rules-based dialogue reply generation technology lacks flexibility and personalization, resulting in the response data being monotonous and unable to meet the needs of complex scenarios.

Method used

A pre-trained model containing a thinking chain is adopted, and by learning the character attributes of different personas as prompt information, the model is guided to generate reply information of different personas, providing more flexible and personalized reply choices.

Benefits of technology

It realizes the diversity and personalization of reply information, meets the needs of complex scenarios, and improves user experience and comments and replies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119250041A_ABST
    Figure CN119250041A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data generation method and device, a storage medium and computing equipment. Comprising the following steps: in response to comment information to be replied, inputting the comment information into a pre-training model containing a thinking chain; wherein the thinking chain is located between an input layer and an output layer of the pre-training model, and the thinking chain is used for guiding the pre-training model to generate reply information made by different people aiming at the comment information by taking pre-learned people attributes of different people as prompt information of the pre-training model; and obtaining reply information which is output by the pre-training model and made for the comment information by different persons.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and more specifically, embodiments of the present disclosure relate to a data generation method, apparatus, storage medium, and computing device. Background Art

[0002] This section is intended to provide a background or context to the embodiments of the present disclosure. No description herein is admitted to be prior art by virtue of its inclusion in this section.

[0003] Data generation usually refers to the use of data generation technology to automatically generate response data corresponding to input data. Since data generation is highly timely, it is widely used in various businesses, scenarios or services such as machine customer service, comment replies, and automatic Q&A.

[0004] In related technologies, data generation generally uses rule-based dialogue response generation technology. This type of technology usually uses a retrieval method, specifically, a large amount of dialogue corpus can be saved in advance, and the response data related to the input data can be obtained by performing similarity retrieval on the input data and the dialogue corpus.

[0005] Although rule-based dialogue response generation technology can meet data generation needs to a certain extent, it lacks flexibility and personalization. For example, whether response data can be retrieved depends mainly on the richness of the dialogue corpus. On the other hand, for the same or similar input data, only fixed response data can be retrieved. Summary of the invention

[0006] In a first aspect of the embodiments of the present disclosure, a data generation method is provided. The method comprises: In response to the comment information to be replied, the comment information is input into a pre-trained model including a thought chain; wherein the thought chain is located between the input layer and the output layer of the pre-trained model, and the thought chain is used to use the pre-learned personality attributes of different personality settings as prompt information of the pre-trained model, and guide the pre-trained model to generate reply information made by different personality settings to the comment information; Obtain reply information made by different personas output by the pre-trained model in response to the comment information.

[0007] Optionally, the method further includes: In response to a triggering operation on target reply information in the reply information, the target reply information is published as a reply to the comment information.

[0008] Optionally, the pre-trained model including the thought chain is trained in the following manner: Acquire a training sample set; wherein the training sample set includes a plurality of sample pairs, wherein the sample pairs include dialogue corpus and pre-labeled personality attribute labels; the dialogue corpus includes comment samples and reply samples to the comment samples, and the personality attribute labels are used to characterize the personality of the person who posted the reply samples; Inputting the dialogue corpus and pre-labeled personality attribute labels in the training sample set into the pre-training model; During the training process of the pre-trained model generating corresponding reply samples based on the comment samples of the dialogue corpus, the thought chain is used to take the pre-annotated personality attribute labels as prompt information, so that the pre-trained model learns the mapping relationship between the personality attribute labels from the comment samples to the reply samples.

[0009] Optionally, the personality attribute includes several different personality sub-attributes.

[0010] Optionally, after inputting the comment information into the pre-trained model including the thought chain, the method further includes: In the process of the pre-trained model making inferences based on the comment information, the thought chain splits the personality attributes of different personalities learned in advance, and constructs a sub-attribute sequence corresponding to each personality attribute, which is constructed by the personality sub-attributes obtained by the splitting.

[0011] Optionally, the thought chain is used to use the pre-learned personality attributes of different personality settings as prompt information of the pre-trained model, and guide the pre-trained model to generate reply information made by different personality settings to the comment information, including: The thought chain uses the personality sub-attributes as prompt information in sequence according to the order of the personality sub-attributes in the sub-attribute sequence, guiding the pre-trained model to generate intermediate information for the comment information and in line with the personality sub-attributes; and merges each intermediate information into the final reply information in the output layer.

[0012] Optionally, after the pre-training model is trained, the method further includes: In response to the model fine-tuning operation for the target business segment, the pre-trained model that has been trained is fine-tuned based on the fine-tuning samples under the target business segment, so that the pre-trained model tends to generate response information that conforms to the target business segment; wherein the fine-tuning samples include response samples of positive feedback under the target business segment.

[0013] Optionally, in response to the comment information to be replied, inputting the comment information into a pre-trained model including a thought chain includes: In response to the comment information to be replied in the target business section, obtaining a target pre-trained model including a thought chain obtained by fine-tuning the target business section; The review information is input into the target pre-trained model.

[0014] Optionally, the personality attributes include at least one of emotion, attitude, occupation, and personality.

[0015] Optionally, the pre-trained model includes a large language model.

[0016] In a second aspect of the embodiments of the present disclosure, a data generating device is provided, the device comprising: A response unit, in response to the comment information to be replied, inputs the comment information into a pre-trained model including a thought chain; wherein the thought chain is located between the input layer and the output layer of the pre-trained model, and the thought chain is used to use the pre-learned personality attributes of different personality settings as prompt information of the pre-trained model, and guide the pre-trained model to generate reply information made by different personality settings to the comment information; The generating unit obtains the reply information made by different personas output by the pre-training model to the comment information.

[0017] Optionally, the device further comprises: The reply unit, in response to a triggering operation on target reply information in the reply information, publishes the target reply information as a reply to the comment information.

[0018] Optionally, the pre-trained model including the thought chain is obtained by training through a training unit; The training unit further comprises: The acquisition subunit acquires a training sample set; wherein the training sample set includes a plurality of sample pairs, wherein the sample pairs include dialogue corpus and pre-labeled personality attribute labels; the dialogue corpus includes comment samples and reply samples to the comment samples, and the personality attribute labels are used to characterize the personality of the person who publishes the reply samples; An input subunit, inputting the dialogue corpus and pre-labeled personality attribute labels in the training sample set into the pre-training model; The training subunit uses the thought chain to use the pre-labeled personality attribute labels as prompt information during the training process of the pre-training model generating corresponding reply samples based on the comment samples of the dialogue corpus, so that the pre-training model learns the mapping relationship between the personality attribute labels between the comment samples and the reply samples.

[0019] Optionally, the personality attribute includes several different personality sub-attributes.

[0020] Optionally, after the response unit, it further includes: The processing sub-unit, in the process of the pre-trained model making inferences based on the comment information, the thinking chain splits the personality attributes of different personalities learned in advance, and constructs a sub-attribute sequence corresponding to each personality attribute, which is constructed by the personality sub-attributes obtained by the splitting.

[0021] Optionally, the thought chain is used to use the pre-learned personality attributes of different personality settings as prompt information of the pre-trained model, and guide the pre-trained model to generate reply information made by different personality settings to the comment information, including: The thought chain uses the personality sub-attributes as prompt information in sequence according to the order of the personality sub-attributes in the sub-attribute sequence, guiding the pre-trained model to generate intermediate information for the comment information and in line with the personality sub-attributes; and merges each intermediate information into the final reply information in the output layer.

[0022] Optionally, after the training unit, the method further includes: A fine-tuning unit, in response to a model fine-tuning operation for a target business segment, performs fine-tuning on the pre-trained model after training based on fine-tuning samples under the target business segment, so that the pre-trained model tends to generate response information that conforms to the target business segment; wherein the fine-tuning samples include response samples of positive feedback under the target business segment.

[0023] Optionally, the response unit includes: In response to the comment information to be replied in the target business section, a target pre-training model including a thought chain obtained by fine-tuning the target business section is obtained, and the comment information is input into the target pre-training model.

[0024] Optionally, the personality attributes include at least one of emotion, attitude, occupation, and personality.

[0025] Optionally, the pre-trained model includes a large language model.

[0026] In a third aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, comprising: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the data generating method as described in any of the preceding items.

[0027] In a fourth aspect of the embodiments of the present disclosure, there is provided a computing device, comprising: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the executable instructions to implement the data generation method as described in any of the preceding items.

[0028] According to the data generation scheme provided by the embodiment of the present disclosure, the thought chain technology is applied to the pre-trained model for generating reply information, and the personality attributes of different personalities are learned through the thought chain, and the personality attributes of different personalities are used as prompt information of the pre-trained model, thereby guiding the pre-trained model to simulate the reply information made by users with different personalities to the comment information. Since the generated reply information carries the personalized characteristics of different personalities, more flexible reply options can be provided, so that the reply information is no longer monotonous. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The above and other purposes, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which: Figure 1 The system architecture diagram of the data generation system provided by the present disclosure is schematically shown; Figure 2 The data generation method provided by the present disclosure is schematically shown; Figure 3 The schematic diagram of the fine-tuning process provided by the present disclosure is schematically shown; Figure 4 The medium schematic diagram provided by the present disclosure is schematically shown; Figure 5 The data generation device provided by the present disclosure is schematically shown; Figure 6 The schematic diagram of the computing device provided by the present disclosure is schematically shown.

[0030] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION

[0031] The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0032] Those skilled in the art will appreciate that the embodiments of the present disclosure may be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0033] According to an embodiment of the present disclosure, a data generation method, a computer-readable storage medium, an apparatus, and a computing device are proposed.

[0034] It should be understood herein that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction rather than having any limiting meaning.

[0035] The principle and spirit of the present disclosure are explained in detail below with reference to several representative embodiments of the present disclosure.

[0036] The data involved in the present disclosure may be data authorized by the user or fully authorized by all parties. The collection, dissemination, and use of the data shall comply with the requirements of relevant national laws and regulations. The implementation methods / examples of the present disclosure may be combined with each other. SUMMARY OF THE INVENTION The present disclosure aims to provide a data generation scheme, which applies the thought chain technology to a pre-trained model for generating reply information, learns the personality attributes of different personalities through the thought chain, and uses the personality attributes of different personalities as prompt information of the pre-trained model, thereby guiding the pre-trained model to simulate the reply information made by users with different personalities to the comment information. Since the generated reply information carries the personalized characteristics of different personalities, more flexible reply options can be provided, so that the reply information is no longer monotonous.

[0038] After introducing the basic principles of the present disclosure, various non-limiting embodiments of the present disclosure are described in detail below.

[0039] Application Scenario Overview First reference Figure 1 A system architecture diagram of a data generation system is shown. In the system architecture diagram, various network nodes can communicate information with the help of the network, and then complete the interaction and data processing. The system architecture diagram may include an operation server 12 that communicates data with one or more clients 11 via a network 13, and a database 14 that can be integrated with the operation server 12 or independent of the operation server 12.

[0040] The operation server 12 may store a pre-trained model including a thought chain. The pre-trained model may enable the operation server 12 to have data generation capability, which may specifically refer to automatically generating reply information made by different personalities to the comment information to be replied with the help of the pre-trained model.

[0041] The operation server 12 may include various service platforms that need to be automatically replied. The service platform may include but is not limited to a social platform, a shopping platform, a multimedia platform, and the like. Taking a social platform as an example, different users can interact socially in the social platform. For example, to comment on the content shared by other users, the data generation method provided in this specification may be used to generate a reply message. Taking a shopping platform as an example, in the shopping platform, buyers can consult the merchant's customer service for goods or after-sales consultations, and when the manual customer service is busy or not online, the data generation method provided in this specification may be used to generate a reply message. Taking a multimedia platform as an example, the multimedia platform may include but is not limited to a song listening platform, a short video platform, a long video platform, an e-book platform, and the like. After listening to or watching a multimedia object in a multimedia platform, the user can post a comment on the multimedia object based on actual feelings, and the data generation method provided in this specification may be used to generate a reply message.

[0042] In the system architecture diagram, each network 13 may include a wired or wireless telecommunication device, through which the network device on which the client 11 is based may exchange data. For example, each network 13 may include a local area network ("LAN"), a wide area network ("WAN"), an intranet, the Internet, a mobile phone network, a virtual private network (VPN), a cellular or other mobile communication network, Bluetooth, NFC, or any combination thereof. In the discussion of the exemplary embodiments, it should be understood that the terms "data" and "information" may be used interchangeably herein to refer to text, images, audio, video, or any other form of information that may exist in a computer-based environment.

[0043] The network device on which each client 11 is based may include a device having a communication module capable of sending and receiving data via the network 13. For example, the network device on which each client 11 is based may include a server, a desktop computer, a laptop computer, a tablet computer, a smart phone, a handheld computer, a personal digital assistant (“PDA”), or any other wired or wireless processor-driven device.

[0044] exist Figure 1 In the depicted exemplary embodiment, the network device on which the client 11 is based can be operated by the user who posts the comment and the counterparty user who may need to reply to the comment.

[0045] A user (including an individual or an organization) may use an application such as a web browser application or a stand-alone application to view, download, upload, or otherwise access files or web pages via the network 13 .

[0046] The web browser application or the stand-alone application can interact with a web server (or other server, such as a social platform, shopping platform, multimedia platform, etc.) connected to the network 13 to complete comments or replies.

[0047] The data / relationships that need to be read or the processing that needs to be performed in the interactive process may need to be obtained from the connected database 14 , and the data / relationships that need to be written or the processing results that need to be written in the interactive process may need to be written into the connected database 14 .

[0048] Figure 1 In the embodiment, the computing device 15 may be in an integrated or separate relationship with the operation server 12. In the latter case, it may be connected through an internal network or a dedicated network, or may be connected through an encrypted public network. In particular, when it is an integrated relationship, a connection in the form of an internal bus with higher efficiency and faster transmission speed may be adopted. The computing device 15, when it is an integrated relationship or a separate relationship, may access the database 14 directly (not shown in the figure) or through the operation server 12.

[0049] The computing device 15 can be properly programmed to control the implementation of the method in this specification through such instructions. In particular, when it is an integrated relationship, the transaction processed by the computing device 15 can be regarded as the processing of the operation server 12 without special distinction.

[0050] Exemplary Methods Combine the following Figure 1 The application scenario shown is shown in Figure 2 To describe the method of data generation according to the exemplary embodiment of the present disclosure. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principle of the present disclosure, and the embodiments of the present disclosure are not limited in this respect. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.

[0051] like Figure 2 As shown, the data generation method can be applied to the aforementioned operation server and can include the following steps: Step 210: In response to the comment information to be replied, the comment information is input into a pre-trained model including a thought chain; wherein the thought chain is located between the input layer and the output layer of the pre-trained model, and the thought chain is used to use the pre-learned personality attributes of different personalities as prompt information of the pre-trained model, and guide the pre-trained model to generate reply information made by different personalities in response to the comment information.

[0052] In this specification, the pre-trained model may include a large language model (LLM). A large language model refers to a natural language processing model based on deep learning. The large language model learns the structure, grammar, semantics and other knowledge of a language by training on a large amount of text data, and can be applied to businesses that require data generation.

[0053] In this manual, based on the pre-trained model, the mind chain technology is used to further improve the performance of the pre-trained model in complex data generation tasks.

[0054] The Chain-of-thought (CoT) is an improved prompting strategy, which can intervene in the training of the pre-trained model and help the pre-trained model learn various personalized reply information with distinctive personal characteristics during the training process.

[0055] In order to more comprehensively introduce the pre-training model including the thought chain, the training process of the pre-training model will be further introduced below.

[0056] In an exemplary embodiment, the pre-trained model including the thought chain can be trained in the following manner: Acquire a training sample set; wherein the training sample set includes a plurality of sample pairs, wherein the sample pairs include dialogue corpus and pre-labeled personality attribute labels; the dialogue corpus includes comment samples and reply samples to the comment samples, and the personality attribute labels are used to characterize the personality of the person who posted the reply samples; Inputting the dialogue corpus and pre-labeled personality attribute labels in the training sample set into the pre-training model; During the training process of the pre-trained model generating corresponding reply samples based on the comment samples of the dialogue corpus, the thought chain is used to take the pre-annotated personality attribute labels as prompt information, so that the pre-trained model learns the mapping relationship between the personality attribute labels from the comment samples to the reply samples.

[0057] The above training process can be simply described as two stages: building a training sample set and training the model based on the training sample set.

[0058] The construction of the above training sample set requires the collection of different types of original data such as books, magazines, novels, scripts (such as movie scripts, TV drama scripts, drama scripts, etc.) from the Internet or databases; However, various dialogue corpora are extracted from the original data, and corresponding personality attribute labels are pre-labeled for the dialogue corpora.

[0059] In this specification, in order to extract various dialogue corpora from raw data, a grammatical analysis technique can be used to analyze the subject-predicate-object structure of each sentence in the raw data, as well as the part of speech of each word in the sentence (such as verb, noun, pronoun or adjective, etc.); then, based on the subject-predicate-object structure and part of speech of the sentence, a dialogue corpus containing dialogue content is extracted. The dialogue corpus may include at least one round of comment samples and a reply sample to the comment samples.

[0060] In addition, the corresponding personality attribute tags are pre-labeled for the dialogue data. Specifically, the dialogue data can be segmented and POS tagged to obtain the part of speech of each word; then, the personality attributes are extracted according to the part of speech and word meaning. The personality attributes may include but are not limited to at least one of emotion, attitude, occupation, personality, etc.

[0061] Taking the manager persona as an example, the persona attributes can be: Be energetic, decisive, never indecisive, calm, good at communication, promote people based on their talents, and assign people to the right positions.

[0062] After the training sample set is constructed, the dialogue corpus and pre-labeled personality attribute labels in the training sample set may be input into the pre-training model.

[0063] For example, to associate the personality attributes with the reply information, you can use To represent the complete text input; where Expresses good communication skills. Indicates the personality attribute label corresponding to the dialogue corpus; in addition, you can also use The model parameters are The pre-trained model is thus inputted into the pre-trained model by inputting the dialogue corpus and the pre-annotated person attribute labels in the training sample set into the pre-trained model to realize the Generate the corresponding response sample The process can be expressed as:

[0064] in, Indicates that based on the review sample Rewritten prompt information, for example: “You’re playing a manager.

[0065] Given below are some classic dialogues H for managers.

[0066] If the question I ask is related to an event in the conversation, please respond based on the context of the conversation.

[0067] If I ask a question that is beyond the scope of the conversation, please respond in a consistent tone.

[0068] Please answer my question using classical Chinese similar to the quotation.

[0069] Please keep your answer as brief as possible.

[0070] Please don’t answer that you are AI or that you are a voice model. Please always remember that you are playing the role of a manager.

[0071] Please show the spirit of this manager, who can make decisions promptly no matter what happens, and never hesitate. He is calm and good at communication. But he only promotes people based on their talents and assigns them to the right positions. " In the above prompt, "Please show the manager's enterprising spirit, and be able to make decisions promptly no matter what happens, and never be indecisive. Be calm and good at communication. But only the talented can be promoted and people can be assigned to the right positions." The "The following are some classic dialogues of managers H" here corresponds to the dialogue material of the manager character.

[0072] The pre-training model starts model training based on the dialogue corpus and pre-labeled personality attribute labels in the input training sample set.

[0073] Specifically, in order to enable the pre-trained model to fully learn the attributes of different personalities, the thinking chain can be introduced Come connect and , where i is a positive integer less than n and greater than 1. Each These are all character sub-attributes obtained by splitting the character attribute labels.

[0074] Taking the above-mentioned personality attribute of "Please show the manager's enterprising spirit, be able to make decisions promptly no matter what happens, and never be indecisive. Be calm and good at communication. But only select people based on their talents and know how to assign them to the right positions" as an example, we can break it down into the following three attributes: : "Please show the hardworking spirit of this manager, who can make decisions promptly no matter what happens, and never hesitate." →

[0075] “A calm and communicative person.” →

[0076] “But we should select people based on their talents and assign them to the right positions.” →

[0077] Based on this, the review sample can be Convert to reply message The process can be broken down into: ,in The reasoning prompt process representing the chain of thought.

[0078] Since the thought chain is a discrete prompt learning method, the independent and identically distributed personality attribute thought chains will be sampled sequentially, and a single personality attribute will not be replaced after sampling, ensuring that each personality attribute will be learned by the pre-trained model.

[0079] Through the above embodiment, the thought chain is used to take the pre-labeled personality attribute labels as prompt information, so that the pre-trained model can learn the mapping relationship between different personality attribute labels from comment samples to reply samples.

[0080] After adjusting the training process of the pre-trained model through the thought chain and guiding the pre-trained model to learn the mapping relationship between different personality attribute labels in comment samples and reply samples, the trained pre-trained model containing the thought chain can be used to generate data.

[0081] In actual applications, after obtaining a newly generated comment information, the operation server can respond to a data generation request initiated by the user or automatically trigger a data generation process, thereby executing the aforementioned step 210, and in response to the comment information to be replied, input the comment information into a pre-trained model containing a thought chain.

[0082] The pre-trained model can perform reasoning based on the input comment information, and combine the prompt information containing different personality attributes provided by the thinking chain to generate reply information made by different personalities to the comment information.

[0083] In an exemplary embodiment, since each personality attribute may include several different personality sub-attributes, after the comment information is input into the pre-trained model including the thought chain, the following may also be included: In the process of the pre-trained model making inferences based on the comment information, the thought chain splits the personality attributes of different personality attributes learned in advance, and constructs a sub-attribute sequence corresponding to each personality attribute and constructed from the personality sub-attributes obtained by the splitting. The sub-attribute sequence can refer to the one shown in the above embodiment. .

[0084] Accordingly, the thought chain is used to use the pre-learned personality attributes of different personality settings as prompt information of the pre-trained model, and guide the pre-trained model to generate reply information made by different personality settings to the comment information, and may further include: The thought chain uses the personality sub-attributes as prompt information in sequence according to the order of the personality sub-attributes in the sub-attribute sequence, guiding the pre-trained model to generate intermediate information for the comment information and in line with the personality sub-attributes; and merges each intermediate information into the final reply information in the output layer.

[0085] In the above embodiment, For example: : Please show the enterprising spirit of this manager, who can make decisions promptly no matter what happens and never hesitate.

[0086] : A calm and communicative personality.

[0087] : But we should select people based on their talents and appoint people to the right positions.

[0088] The thought chain can be , , As a prompt, guide the pre-trained model to generate The intermediate information 1 produced by this character sub-attribute is consistent with The intermediate information 2 made by this character sub-attribute and the This character sub-attribute generates intermediate information 3; in this way, the three intermediate information can be fused into the final reply information in the output layer of the pre-trained model, for example, intermediate information 1, intermediate information 2 and intermediate information 3 can be spliced ​​into one reply information. For another example, intermediate information 1, intermediate information 2 and intermediate information 3 can be used as prompt information again, and a reply information is generated by the pre-trained model. It should be noted that this process does not require the participation of the thinking chain.

[0089] Step 220: Obtain reply information made to the comment information by different personas output by the pre-trained model.

[0090] Since there are different personalities with different attributes, the pre-trained model can generate reply information for each persona in response to the comment information; that is, a variety of reply information to choose from can be obtained.

[0091] After obtaining the reply information of different numbers of people, the user can select a satisfactory target reply information to publish. For example, the user can click one of the target reply information from the displayed reply information. After receiving the trigger operation for the target reply information, the operation server can also include: In response to a triggering operation on target reply information in the reply information, the target reply information is published as a reply to the comment information.

[0092] Through the above embodiment, a variety of reply messages with different personalities can be provided to the user for selection, which can help the user quickly complete the reply to the comment message.

[0093] On the other hand, since each reply message corresponds to a different persona, the flexibility of user reply messages is improved, and the reply messages can be made more personalized, thereby helping users to better play the role of a specific persona, better integrate into discussions, and increase participation in comment replies and user experience.

[0094] On the other hand, by personalizing reply information, a community atmosphere with more colorful discussions can be created, which can attract more users to join, improve user stickiness, activity and retention, and thus increase the value of the business platform.

[0095] In actual applications, business platforms usually divide business sections based on different businesses. For example, social platforms can be divided into news sections, game sections, entertainment sections, and so on.

[0096] Since there are certain differences in the discussion contents of different business sectors, in order to make the reply information generated by the pre-trained model more suitable for the business sector, after the pre-trained model training introduced in the above embodiment is completed, the model can be further fine-tuned.

[0097] In an exemplary embodiment, the aforementioned method embodiment may further include: In response to the model fine-tuning operation for the target business segment, the pre-trained model that has been trained is fine-tuned based on the fine-tuning samples under the target business segment, so that the pre-trained model tends to generate response information that conforms to the target business segment; wherein the fine-tuning samples include response samples of positive feedback under the target business segment.

[0098] In this embodiment, the historical comment information and historical reply information generated under each business section, as well as the interactive data of the historical reply information, can be collected; the interactive data includes positive feedback data (such as the number of approvals, the number of thumbs-up, etc.) and negative feedback data (such as the number of disapproval, the number of thumbs-down, etc.). A large amount of historical comment information and historical reply information are input as fine-tuning samples of the business section into the pre-trained model for fine-tuning. Through multiple iterations, the pre-trained model can tend to generate positive feedback reply information.

[0099] In another exemplary embodiment, the model can also be fine-tuned by using the interactive data of real-time reply information in the target business segment. Figure 3 shown.

[0100] like Figure 3 As described, based on the pre-trained model completed by the thinking chain training, the interactive data of the target reply information generated and published by the pre-trained model in the target business segment is actively collected; and the target reply information generated by the pre-trained model is evaluated according to the preset threshold to see whether it meets expectations. For example, when the positive feedback data or negative feedback data of the target reply information reaches a preset threshold, such as 5, evaluation data can be generated, and the feedback model can be further used to fine-tune the pre-trained model according to the evaluation data, so that the reply information generated by the pre-trained model can be further made to fit the real reply information in the target business segment through multiple iterations.

[0101] In this embodiment, the feedback model refers to the process of adjusting and optimizing the model output by analyzing the user's comments (such as likes, dislikes, comments, etc.) on the model's generation. This feedback mechanism is to improve the quality and relevance of the model-generated content, so that the model can better respond to user needs in the future and generate more expected replies or comments.

[0102] Suppose on a news website, the pre-trained model automatically generates reply information corresponding to the comment information: Other users can like or dislike the reply message.

[0103] By analyzing these likes and dislikes, the pre-trained model can learn that a certain tone (such as more formal or more humorous) is likely to be more popular.

[0104] The feedback model adjusts the generation strategy based on this data, such as adjusting the use of certain vocabulary or optimizing the content structure.

[0105] Over time, the pre-trained model learns through feedback to improve the relevance, accuracy, and engagingness of responses.

[0106] In general, the feedback model can be a closed-loop optimization process, which aims to continuously adjust and improve the output of the pre-trained model through user feedback so that it better meets user expectations, thereby improving the generation quality of the pre-trained model.

[0107] Exemplary Media After introducing the method of the exemplary embodiment of the present disclosure, next, refer to Figure 4 A medium according to an exemplary embodiment of the present disclosure is described.

[0108] In this exemplary embodiment, the above method can be implemented by a program product, such as a portable compact disk read-only memory (CD-ROM) and including program code, and can be run on a device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, apparatus, or device.

[0109] The program product may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0110] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0111] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RE, etc., or any suitable combination of the foregoing.

[0112] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as C or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user computing device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0113] In summary, the present disclosure may provide a computer-readable storage medium. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device may be enabled to execute the aforementioned data generation method embodiment.

[0114] Exemplary Devices After introducing the medium of the exemplary embodiment of the present disclosure, next, reference is made to Figure 5 A device according to an exemplary embodiment of the present disclosure is described.

[0115] Figure 5 A block diagram of a data generating device according to an embodiment of the present disclosure is schematically shown, corresponding to the aforementioned Figure 2 In the method embodiment shown, the data generating device may include: The response unit 510, in response to the comment information to be replied, inputs the comment information into a pre-trained model including a thought chain; wherein the thought chain is located between the input layer and the output layer of the pre-trained model, and the thought chain is used to use the pre-learned personality attributes of different personality settings as prompt information of the pre-trained model, and guide the pre-trained model to generate reply information made by different personality settings to the comment information; The generating unit 520 obtains the reply information made by different personas output by the pre-training model to the comment information.

[0116] Optionally, the device further comprises: The reply unit 530, in response to a triggering operation on target reply information in the reply information, publishes the target reply information as a reply to the comment information.

[0117] Optionally, the pre-trained model including the thought chain is obtained through training by the training unit 500; The training unit 500 further comprises: The acquisition subunit 501 acquires a training sample set; wherein the training sample set includes a plurality of sample pairs, wherein the sample pairs include dialogue data and pre-labeled personality attribute labels; the dialogue data includes comment samples and reply samples to the comment samples, and the personality attribute labels are used to characterize the personality of the person who posted the reply sample; An input subunit 503 inputs the dialogue corpus and pre-labeled personality attribute labels in the training sample set into the pre-training model; The training subunit 505 uses the thought chain to use the pre-labeled personality attribute labels as prompt information during the training process of the pre-training model generating corresponding reply samples based on the comment samples of the dialogue corpus, so that the pre-training model learns the mapping relationship between the personality attribute labels from the comment samples to the reply samples.

[0118] Optionally, the personality attribute includes several different personality sub-attributes.

[0119] Optionally, after the responding unit 510, the method further includes: Processing subunit 509, during the process of the pre-trained model making inferences based on the comment information, the thought chain splits the personality attributes of different personalities learned in advance, and constructs a sub-attribute sequence corresponding to each personality attribute, which is constructed by the personality sub-attributes obtained by the splitting.

[0120] Optionally, the thought chain is used to use the pre-learned personality attributes of different personality settings as prompt information of the pre-trained model, and guide the pre-trained model to generate reply information made by different personality settings to the comment information, including: The thought chain uses the personality sub-attributes as prompt information in sequence according to the order of the personality sub-attributes in the sub-attribute sequence, guiding the pre-trained model to generate intermediate information for the comment information and in line with the personality sub-attributes; and merges each intermediate information into the final reply information in the output layer.

[0121] Optionally, after the training unit 500, the method further includes: The fine-tuning unit 507, in response to the model fine-tuning operation for the target business segment, fine-tunes the pre-trained model that has been trained based on the fine-tuning samples under the target business segment, so that the pre-trained model tends to generate response information that conforms to the target business segment; wherein the fine-tuning samples include response samples of positive feedback under the target business segment.

[0122] Optionally, the response unit 510 includes responding to the comment information to be replied in the target business segment, obtaining a target pre-trained model containing a thought chain obtained by fine-tuning the target business segment, and inputting the comment information into the target pre-trained model.

[0123] Optionally, the personality attributes include at least one of emotion, attitude, occupation, and personality.

[0124] Optionally, the pre-trained model includes a large language model.

[0125] Exemplary Computing Devices After introducing the method, medium and apparatus of the exemplary embodiments of the present disclosure, next, reference is made to Figure 6 A computing device according to an exemplary embodiment of the present disclosure is described.

[0126] Figure 6 The computing device 1500 shown is merely an example and should not bring any limitation to the functionality and scope of use of the embodiments of the present disclosure.

[0127] like Figure 6 As shown, computing device 1500 is in the form of a general computing device. Components of computing device 1500 may include, but are not limited to: at least one processing unit 1501, at least one storage unit 1502, and a bus 1503 connecting different system components (including processing unit 1501 and storage unit 1502).

[0128] The bus 1503 includes a data bus, a control bus, and an address bus.

[0129] The storage unit 1502 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 15021 and / or a cache memory 15022 , and may further include a readable medium in the form of a non-volatile memory, such as a read-only memory (ROM) 15023 .

[0130] The storage unit 1502 may also include a program / utility 15025 having a set (at least one) of program modules 15024, such program modules 15024 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0131] Computing device 1500 may also communicate with one or more external devices 1504 (eg, keyboards, pointing devices, etc.).

[0132] Such communication may be performed via input / output (I / O) interface 1505. In addition, computing device 1500 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via network adapter 1506. Figure 6 As shown, network adapter 1506 communicates with other modules of computing device 1500 via bus 1503. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with computing device 1500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0133] Through Figure 6 The computing device 1500 shown can implement the aforementioned data generation method. More specifically, the storage unit 1502 stores instructions executable by the processing unit 1501. When the processing unit 1501 executes the instructions, the aforementioned data generation method is implemented.

[0134] It should be noted that, although several units / modules or sub-units / modules of the data generation device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to an embodiment of the present disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.

[0135] In addition, although the operations of the disclosed method are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0136] Although the spirit and principle of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present disclosure is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims.

Claims

1. A data generation method, comprising: In response to the comment information to be replied, the comment information is input into a pre-trained model including a thought chain; wherein the thought chain is located between the input layer and the output layer of the pre-trained model, and the thought chain is used to use the pre-learned personality attributes of different personality settings as prompt information of the pre-trained model, and guide the pre-trained model to generate reply information made by different personality settings to the comment information; Obtain reply information made by different personas output by the pre-trained model in response to the comment information.

2. The method according to claim 1, further comprising: In response to a triggering operation on target reply information in the reply information, the target reply information is published as a reply to the comment information.

3. According to the method of claim 1, the pre-trained model containing the thought chain is trained by the following method: Get a training sample set; where, The training sample set includes a number of sample pairs, each of which includes a dialogue corpus and a pre-labeled personality attribute label; the dialogue corpus includes a comment sample and a reply sample to the comment sample, and the personality attribute label is used to characterize the personality of the person who posted the reply sample; Inputting the dialogue corpus and pre-labeled personality attribute labels in the training sample set into the pre-training model; During the training process of the pre-trained model generating corresponding reply samples based on the comment samples of the dialogue corpus, the thought chain is used to take the pre-annotated personality attribute labels as prompt information, so that the pre-trained model learns the mapping relationship between the personality attribute labels from the comment samples to the reply samples. 4 . The method according to claim 1 , wherein the personality attribute comprises a plurality of different personality sub-attributes.

5. The method according to claim 4, after inputting the comment information into the pre-trained model containing the thought chain, further comprises: In the process of the pre-trained model making inferences based on the comment information, the thought chain splits the personality attributes of different personalities learned in advance, and constructs a sub-attribute sequence corresponding to each personality attribute, which is constructed by the personality sub-attributes obtained by the splitting.

6. According to the method of claim 5, the thought chain is used to use the pre-learned personality attributes of different personality settings as prompt information of the pre-trained model, and guide the pre-trained model to generate reply information made by different personality settings to the comment information, including: The thought chain uses the personality sub-attributes as prompt information in sequence according to the order of the personality sub-attributes in the sub-attribute sequence, guiding the pre-trained model to generate intermediate information for the comment information and in line with the personality sub-attributes; and merges each intermediate information into the final reply information in the output layer.

7. The method according to claim 3, after the pre-training model training is completed, further comprising: In response to the model fine-tuning operation for the target business segment, the pre-trained model that has been trained is fine-tuned based on the fine-tuning samples under the target business segment, so that the pre-trained model tends to generate response information that conforms to the target business segment; wherein the fine-tuning samples include response samples of positive feedback under the target business segment.

8. The method according to claim 7, wherein in response to the comment information to be replied, the comment information is input into a pre-trained model containing a thought chain, comprising: In response to the comment information to be replied in the target business section, obtaining a target pre-trained model including a thought chain obtained by fine-tuning the target business section; The review information is input into the target pre-trained model.

9. According to the method of claim 1, the personality attributes include at least one of emotion, attitude, occupation, and personality.

10. The method according to claim 1, wherein the pre-trained model comprises a large language model.

11. A data generating device, comprising: A response unit, in response to the comment information to be replied, inputs the comment information into a pre-trained model including a thought chain; wherein the thought chain is located between an input layer and an output layer of the pre-trained model, and the thought chain is used to use the pre-learned personality attributes of different personality settings as prompt information of the pre-trained model, and guide the pre-trained model to generate reply information made by different personality settings to the comment information; The generating unit obtains the reply information made by different personas output by the pre-training model to the comment information.

12. The device according to claim 11, further comprising: The reply unit, in response to a triggering operation on target reply information in the reply information, publishes the target reply information as a reply to the comment information.

13. The device according to claim 11, wherein the pre-trained model including the thought chain is obtained by training through a training unit; The training unit further comprises: The acquisition subunit acquires a training sample set; wherein the training sample set includes a plurality of sample pairs, wherein the sample pairs include dialogue corpus and pre-labeled personality attribute labels; the dialogue corpus includes comment samples and reply samples to the comment samples, and the personality attribute labels are used to characterize the personality of the person who publishes the reply samples; An input subunit, inputting the dialogue corpus and pre-labeled personality attribute labels in the training sample set into the pre-training model; The training subunit uses the thought chain to use the pre-labeled personality attribute labels as prompt information during the training process of the pre-training model generating corresponding reply samples based on the comment samples of the dialogue corpus, so that the pre-training model learns the mapping relationship between the personality attribute labels between the comment samples and the reply samples. The apparatus according to claim 11 , wherein the personality attribute comprises a plurality of different personality sub-attributes.

15. The device according to claim 14, further comprising after the response unit: The processing sub-unit, in the process of the pre-trained model making inferences based on the comment information, the thinking chain splits the personality attributes of different personalities learned in advance, and constructs a sub-attribute sequence corresponding to each personality attribute, which is constructed by the personality sub-attributes obtained by the splitting.

16. The device according to claim 15, wherein the thought chain is used to use the pre-learned personality attributes of different personality settings as prompt information of the pre-trained model to guide the pre-trained model to generate reply information made by different personality settings to the comment information, including: The thought chain uses the personality sub-attributes as prompt information in sequence according to the order of the personality sub-attributes in the sub-attribute sequence, guiding the pre-trained model to generate intermediate information for the comment information and in line with the personality sub-attributes; and merges each intermediate information into the final reply information in the output layer.

17. The apparatus according to claim 13, further comprising, after the training unit: A fine-tuning unit, in response to a model fine-tuning operation for a target business segment, performs fine-tuning on the pre-trained model after training based on fine-tuning samples under the target business segment, so that the pre-trained model tends to generate response information that conforms to the target business segment; wherein the fine-tuning samples include response samples of positive feedback under the target business segment.

18. The device according to claim 17, wherein the response unit comprises: In response to the comment information to be replied in the target business section, a target pre-training model including a thought chain obtained by fine-tuning the target business section is obtained, and the comment information is input into the target pre-training model.

19. The device according to claim 11, wherein the personality attributes include at least one of emotion, attitude, occupation, and personality.

20. The apparatus of claim 11, wherein the pre-trained model comprises a large language model.

21. A computer-readable storage medium, comprising: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the data generating method according to any one of claims 1 to 10.

22. A computing device comprising: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the executable instructions to implement the data generation method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • NPC interaction method and device and storage medium

    CN117122927A

  • Emotion support dialogue generation method, system and device based on thinking chain reasoning

    CN117932041A

  • Large language model human setting privatization method and related device

    CN118228829A

  • Information output method and device, electronic equipment and storage medium

    CN118260389A

  • Training sample generation method and device, electronic equipment and storage medium

    CN118673334A