Data processing method, device, equipment, computer-readable storage medium and product
By combining the thinking chain and prompt tuning methods, a generative adversarial network is constructed, which solves the problems of stiff text style and information loss when converting drug instructions, achieves efficient conversion of drug instructions into easy-to-understand text, and improves users' ability to understand drug usage and dosage. ability.
Patent Information
- Application Number
- CN202311229815.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-21
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2043-09-21
AI Technical Summary
Due to the strong professionalism of drug instructions, users cannot accurately determine the usage and dosage of the drug. When the existing technology is converted into easy-to-understand text, the converted text generated is stiff and the information in the original text is lost.
The Chain of Thought (CoT) technology and prompt tuning method are combined with a large language model to build a generative adversarial network. By alternately training the generative network and the discriminant network, a more realistic and easy-to-understand conversion text is generated, reducing knowledge loss and improving conversion accuracy.
It has realized the conversion of obscure drug instructions into easy-to-understand text, allowing users to more accurately understand the usage and dosage of the drug, and improving the quality and readability of the converted text.
Smart Images

Figure CN117272941B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to AI medical treatment in data processing, and in particular to a data processing method, apparatus, device, computer-readable storage medium and product. Background Art
[0002] Drug instructions on the market are highly professional and often include a large number of specialized terms. Drug instructions are relatively obscure and difficult to understand for users, resulting in users being unable to accurately determine the usage and dosage of the drug based on the drug instructions.
[0003] Therefore, how to convert obscure and highly professional drug instructions into easy-to-understand text for users to view has become an urgent problem to be solved. Summary of the invention
[0004] The present disclosure provides a data processing method, device, equipment, computer-readable storage medium and product for converting highly professional drug instructions into easy-to-understand text.
[0005] According to a first aspect of the present disclosure, there is provided a method for obtaining a preset training data set, wherein the training data set includes multiple sets of training data, the training data includes a drug instruction sheet, knowledge content associated with the drug instruction sheet extracted based on colloquial language, and a conversion text, the knowledge content is extracted from the drug instruction sheet using a thinking chain method, and the training data set is constructed based on a preset fine-tuning template;
[0006] Based on the training data set, the generative network and the discriminative network in the preset generative adversarial network are alternately trained until the generative adversarial network meets the preset target end condition, and the generative network is determined as a text conversion model.
[0007] According to a second aspect of the present disclosure, a data processing method is provided for constructing the generative adversarial network described in the first aspect, comprising:
[0008] Initialize two pre-set large language models respectively;
[0009] The two large language models are respectively determined as a generative network and a discriminative network, and the generative adversarial network is constructed based on the generative network and the discriminative network.
[0010] According to a third aspect of the present disclosure, there is provided a data processing method, comprising:
[0011] Obtaining a data processing request, wherein the data processing request includes a specification to be converted;
[0012] Inputting the instruction manual to be converted into a preset text conversion model to obtain a conversion text output by the text conversion model, wherein the conversion text is used to describe the instruction manual to be converted in colloquial language;
[0013] Among them, the text conversion model is based on the generative network in the generative adversarial network that meets the preset target end conditions described in the first aspect above.
[0014] According to a fourth aspect of the present disclosure, there is provided a data processing device, comprising:
[0015] An acquisition module, used to acquire a preset training data set, wherein the training data set includes multiple sets of training data, the training data includes drug instructions, knowledge content associated with the drug instructions extracted based on colloquial language, and conversion text, the knowledge content is extracted from the drug instructions using a thinking chain method, and the training data set is constructed based on a preset fine-tuning template;
[0016] A training module is used to alternately train a generative network and a discriminative network in a preset generative adversarial network based on the training data set until the generative adversarial network meets a preset target end condition, and determine the generative network as a text conversion model.
[0017] According to a fifth aspect of the present disclosure, a data processing device is provided, for constructing the generative adversarial network described in the fourth aspect, comprising:
[0018] An initialization module, used to respectively initialize two pre-set large language models;
[0019] A determination module is used to determine the two large language models as a generative network and a discriminative network respectively, and construct the generative adversarial network based on the generative network and the discriminative network.
[0020] According to a sixth aspect of the present disclosure, there is provided a data processing device, including:
[0021] A request acquisition module, used to acquire a data processing request, wherein the data processing request includes a specification to be converted;
[0022] An input module, used for inputting the specification to be converted into a preset text conversion model, obtaining a conversion text output by the text conversion model, wherein the conversion text is used for describing the specification to be converted in colloquial language;
[0023] Among them, the text conversion model is based on the generative network in the generative adversarial network that meets the preset target end conditions described in the fourth aspect above.
[0024] According to a seventh aspect of the present disclosure, there is provided an electronic device, including:
[0025] at least one processor; and
[0026] a memory communicatively connected to the at least one processor; wherein,
[0027] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in the first aspect or the second aspect above.
[0028] According to an eighth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method according to the first aspect or the second aspect above.
[0029] According to the ninth aspect of the present disclosure, a computer program product is provided, comprising: a computer program, wherein the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program so that the electronic device executes the method described in the first aspect or the second aspect.
[0030] According to the technology disclosed in the present invention, obscure and highly professional drug instructions can be converted into easy-to-understand text, so that users can view the usage and dosage in the drug instructions more intuitively.
[0031] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0033] Figure 1 A diagram of the system architecture on which the present disclosure is based;
[0034] Figure 2 A flowchart of a data processing method provided by an embodiment of the present disclosure;
[0035] Figure 3 A flowchart of a data processing method provided by another embodiment of the present disclosure;
[0036] Figure 4 A schematic diagram of alternating training provided in an embodiment of the present disclosure;
[0037] Figure 5 A flowchart of a data processing method provided by another embodiment of the present disclosure;
[0038] Figure 6 A flowchart of a data processing method provided by another embodiment of the present disclosure;
[0039] Figure 7 A flowchart of a data processing method provided by an embodiment of the present disclosure;
[0040] Figure 8 A flowchart of a data processing method provided by an embodiment of the present disclosure;
[0041] Fig. 9 A schematic diagram of the structure of a data processing device provided in an embodiment of the present disclosure;
[0042] Fig.10 A schematic diagram of the structure of a data processing device provided in an embodiment of the present disclosure;
[0043] Fig.11 A schematic diagram of the structure of a data processing device provided in an embodiment of the present disclosure;
[0044] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0045] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0046] In order to solve the problem that drug instructions are obscure and difficult to understand, resulting in users being unable to accurately determine the usage and dosage of the drug based on the drug instructions, the present disclosure provides a data processing method, device, equipment, computer-readable storage medium and product.
[0047] The data processing method, device, equipment, computer-readable storage medium and product provided by the present invention are applied to AI medical treatment in data processing to achieve the goal of converting obscure and highly professional medicine into
[0048] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0049] The drug instructions on the market are highly professional, but their terms are obscure and difficult for users to understand, resulting in users being unable to accurately determine the usage and dosage of the drug based on the drug instructions. In order to enable users to understand the content of the drug instructions to achieve accurate medication, the prior art generally constructs a training data set based on the drug instructions and its corresponding annotation information, where the annotation information can be an easy-to-understand conversion text obtained based on the drug instructions. Based on the training data set, a training operation of a language model such as Bert is performed to obtain a trained text conversion model. Thus, users can input the obscure drug instructions into the text conversion model, obtain the conversion text output by the text conversion model, and use the drug based on the conversion text. However, the conversion text output by the model trained using the above method has a relatively stiff style of speech and loses information in the original text.
[0050] In the process of solving the above technical problems, the inventors found through research that in order to improve the conversion accuracy of the text conversion model and make it output a more understandable conversion text, the chain of thought (CoT) technology and prompt tuning method can be combined to generate the optimal prompt to guide the large language model (LLM) to generate easy-to-understand words, while reducing the loss of knowledge in the original text. Secondly, in the model training stage, LLM and generative adversarial networks can be combined to gradually improve the text style effect generated by the model.
[0051] In order to enable readers to more deeply understand the implementation principle of the present disclosure, the following Figure 1-Figure 8 The embodiments of the present disclosure are further refined.
[0052] Figure 1 This is the system architecture diagram on which the present disclosure is based, such as Figure 1 As shown, the system architecture based on the present disclosure includes at least a data server 11 and a server 12. The server 12 is provided with a data processing device, which can be written in languages such as C / C++, Java, Shell or Python, and the data server 11 can be a cloud server or a server cluster, which stores a large amount of data.
[0053] Based on the above system architecture, the server 12 can obtain a training data set from the data server 11, and perform alternate training on the preset generative adversarial network 13 based on the training data set. Among them, the generative adversarial network 13 includes a generative network 14 and a discriminative network 15. In the process of alternate training of the generative adversarial network 13, the generative network 14 is used to generate a more realistic conversion text based on the drug instructions and knowledge content in the training data set, and the discriminative network 15 is used to more accurately determine whether the currently input text is a real drug instruction or a conversion text generated by the generative network 14. The two are continuously trained alternately until the generative network 14 can generate a sufficiently realistic conversion text that can deceive the discriminative network 15, and a trained generative adversarial network is obtained.
[0054] Figure 2 A flow chart of a data processing method provided by an embodiment of the present disclosure is shown in FIG. Figure 2 As shown, the method includes:
[0055] Step 201, obtaining a preset training data set, wherein the training data set includes multiple groups of training data, the training data includes drug instructions, knowledge content associated with the drug instructions extracted based on colloquial language, and converted text, the knowledge content is extracted from the drug instructions using a thinking chain method, and the training data set is constructed based on a preset fine-tuning template.
[0056] The execution subject of this embodiment is a data processing device, which can be coupled to a server. The server can be connected to a data server in communication. Thus, a training data set constructed by combining the thought chain and the prompttuning method can be obtained from the data server, and a model training operation is performed based on the training data set.
[0057] In this embodiment, since the contents of drug instructions are often obscure and difficult to understand, users cannot intuitively determine the usage and dosage of drugs based on the drug instructions. Therefore, a text conversion model can be constructed to convert the obscure drug instructions into easy-to-understand conversion text based on the text conversion model, so that users can use the drugs based on the conversion text.
[0058] Optionally, in order to realize the construction of a text conversion model, a preset training data set can be first obtained, wherein the training data set includes multiple groups of training data, the training data include drug instructions, knowledge content related to the drug instructions extracted based on colloquial language, and conversion text, the knowledge content is extracted from the drug instructions using a thinking chain method, and the training data set is constructed based on a preset fine-tuning template.
[0059] It should be noted that it is difficult for language models to directly convert all semantics into an equation because this is a more complex thinking process, but each part of the problem can be better reasoned through intermediate steps. Thinking chain prompts are to decompose a multi-step reasoning problem into many intermediate steps, assign more calculations, generate more knowledge content, and then splice these answers together to solve.
[0060] Taking practical application as an example, the content recorded in the drug instructions may be: The drug should be started at a low dose and gradually increased according to the blood sugar situation. Please follow the doctor's advice for details. Symptom A (when used alone) The initial dose is 0.5g once, twice a day, or 0.85g once a day, then increase by 0.5g per week or 0.85g every two weeks, until 2g per day. For those who need to further control blood sugar, the dose can be increased to 2.55g per day (0.85g once, 3 times a day). Please consult a doctor for details. Symptom B (when used in combination with other drugs) Combined with Class C drugs: Patients who still do not respond after using the maximum recommended dose of this drug for several weeks should consider gradually adding Class C drugs while maintaining the maximum dose treatment.
[0061] Based on the drug instructions, we can extract knowledge content in popular language through the way of thinking chain: ["Start with a small dose and gradually increase the dosage according to blood sugar conditions", "The initial dose is 0.5 grams, then take it twice a day. 0.85 grams is taken once a day", "Then increase by 0.5g per week or 0.85g every two weeks, until it reaches 2g per day. For those who need to further control blood sugar, the dose can be increased to 2.55g per day (0.85g at a time, 3 times a day)", "If there is no effect after using the drug at the maximum recommended dose for several weeks, you can maintain the maximum dose treatment while gradually adding Class C drugs"].
[0062] In addition, in order to enable the model to have more accurate conversion capabilities, conversion texts described in plain language can also be constructed based on the drug instructions: When you start using the target drug, you usually start with a relatively small amount and gradually increase it according to your blood sugar situation. Specifically, if the initial dose is 0.5g, take it twice a day, and take it once a day when the initial dose is 0.85g. This helps ensure that your body gradually adapts to the effects of the drug. If this dose does not have a good enough effect after a period of time (usually several weeks), doctors usually recommend increasing it to 3 times a day, 0.85g each time, up to 2.55 grams a day. This process requires the advice and supervision of a doctor because different people need different doses. If you are using other drugs at the same time, such as Class C drugs, and still do not see enough effects after using them for a period of time, your doctor may recommend gradually increasing the dosage of Class C drugs while continuing to use this drug. Such combination treatment helps to better manage disease A.
[0063] As described in the above example, using the thinking chain approach to extract knowledge content from drug instructions can improve model processing accuracy.
[0064] Step 202: Based on the training data set, the generative network and the discriminative network in the preset generative adversarial network are alternately trained until the generative adversarial network meets the preset target end condition, and the generative network is determined as a text conversion model.
[0065] In this embodiment, the existing text processing models such as BERT, encoder-decoder, etc. often have poor quality in the text conversion process, and the generated converted text has stiff language and loses the information in the original text, resulting in the user being unable to accurately use the medicine based on the converted text.
[0066] Therefore, in order to solve the problem of stiff style of generated speech, a large language model can be combined with a generative adversarial network. A generative adversarial network is constructed based on a large language model. The above training data set is used to alternately train the generative network and the discriminative network in the preset generative adversarial network until the generative adversarial network meets the preset target end condition, and the generative network is determined as a text conversion model. Among them, the target end condition includes but is not limited to any one of the following: the accuracy of the discrimination result output by the discriminative network is lower than the preset target accuracy threshold, the alternating training time of the generative adversarial network reaches the preset time threshold, and the number of alternating training times of the generative adversarial network reaches the preset number threshold.
[0067] Optionally, the target accuracy threshold can be set based on an empirical value, or can be customized by the user according to actual needs, and the present disclosure does not limit this. When the accuracy of the discrimination result output by the discriminant network is lower than the preset target accuracy threshold, it can be characterized that the converted text output by the generative network is sufficiently real, so it can be determined that the generative adversarial network training is completed. Subsequently, the generative network can be determined as a text conversion network, and a text conversion operation can be performed on the drug instructions to be converted input by the user based on the text conversion network.
[0068] The data processing method provided in this embodiment can avoid knowledge loss in drug instructions by combining thought chain and prompt tuning method to construct a training data set. In addition, model training based on the training data set can effectively guide the model to generate easy-to-understand conversion text. Furthermore, by constructing a generative adversarial network and alternately training the generative network and the discriminative network in the generative adversarial network, the generative network can be prompted to generate more accurate and easier-to-understand conversion text.
[0069] Further, based on any of the above embodiments, step 201 includes:
[0070] A data set to be processed and a preset fine-tuning template are obtained, wherein the data set to be processed includes a plurality of drug instructions, and the fine-tuning template includes a first sub-template for extracting knowledge content based on a thinking chain method and a second sub-template for extracting conversion text based on the drug instructions.
[0071] Based on the fine-tuning template, a content extraction operation is performed on each drug instruction sheet in the data set to be processed to obtain the training data set.
[0072] In this embodiment, in order to improve the accuracy of the text conversion model when performing text conversion, a fine-tuning template can be pre-built. The fine-tuning template is constructed by combining the thought chain and prompt tuning methods. The fine-tuning template includes a first sub-template for extracting knowledge content based on the thought chain method and a second sub-template for extracting conversion text based on the drug instructions.
[0073] Therefore, in order to construct a training data set, a data set to be processed and a preset fine-tuning template can be obtained, wherein the data set to be processed includes multiple drug instructions. Thus, a content extraction operation can be performed on each drug instruction in the data set to be processed based on the fine-tuning template to obtain a training data set.
[0074] Optionally, a preset text extraction model can be used to extract knowledge content and converted text based on the fine-tuning template. Alternatively, in order to further improve the accuracy of knowledge content and converted text, the knowledge content and converted text can be extracted manually based on the fine-tuning template. The present disclosure does not limit this.
[0075] The data processing method provided in this embodiment pre-builds a fine-tuning template by combining the thought chain and prompt tuning methods, and defines a first sub-template for extracting knowledge content based on the thought chain method and a second sub-template for extracting converted text based on the drug instructions in the fine-tuning template, thereby accurately constructing a training data set based on the fine-tuning template and avoiding the loss of knowledge in the original drug instructions.
[0076] Figure 3 A flowchart of a data processing method provided by another embodiment of the present disclosure is provided. Based on any of the above embodiments, Figure 3 As shown, step 303 includes:
[0077] Step 301: Train a preset generation network based on the training data set until the generation network meets a preset first end condition.
[0078] Step 302: Based on the conversion text in the training data set and the output text output by the generation network that meets the first end condition according to the drug instructions in the training data set, the discriminant network is trained until the discriminant network meets the preset second end condition.
[0079] Step 303: Detect whether the discrimination network meets a preset target end condition.
[0080] If the discriminant network does not meet the preset target end condition, the process returns to the step of training the preset generative network based on the training data set.
[0081] Step 304: If the discriminant network meets the target end condition, the generative network is determined as a text conversion model.
[0082] In this embodiment, after obtaining the training data set, the preset generative adversarial network can be subjected to model training operations based on the training data set so that it has the ability to convert drug instructions. In the process of alternating training of the generative adversarial network, the generative network is used to generate more realistic conversion texts, while the discriminant network is used to more accurately determine whether the currently input text is a real drug instruction or a conversion text generated by the generative network. The two are continuously trained alternately until the generative network can generate sufficiently realistic conversion texts that can deceive the discriminant network.
[0083] Optionally, the generative adversarial network includes a generative network and a discriminative network respectively. The preset generative network can be trained based on the training data set. When the training is performed until the generative network meets the preset first end condition, the discriminative network can be trained alternately based on the conversion text in the training data set and the output text output by the generative network that meets the first end condition according to the drug instructions in the training data set. The first end condition can be that the loss value of the generative network is lower than a preset loss value threshold, or the first end condition can be that the training time of the generative network reaches a preset time threshold, or the first end condition can be that the number of training times of the generative network reaches a preset number threshold.
[0084] Furthermore, when the discriminant network meets the preset second end condition, it can be determined whether the discriminant network meets the preset target end condition. The second end condition includes but is not limited to any one of the following: the accuracy of the discriminant result output by the discriminant network is lower than the preset first threshold, the training time of the discriminant network reaches the preset time threshold, and the number of iterative training of the discriminant network reaches the preset number threshold.
[0085] If the discriminant network meets the preset target end condition, the current output text of the representation generation network can deceive the discriminant network, that is, the generation network can currently generate relatively accurate conversion text. At this time, the generation network can be determined as a text conversion model. On the contrary, it can be determined that the conversion text generated by the current generation text is not accurate, and the user cannot understand the usage and dosage of the drug based on the conversion text output by the generation text. Therefore, the step of training the preset generation network based on the training data set can be returned to perform the next round of alternating training.
[0086] Figure 4 A schematic diagram of alternating training provided in an embodiment of the present disclosure, which is Figure 1 The specific training method of generating adversarial networks in , such as Figure 4 As shown, a training data set 41 is obtained, wherein the training data set 41 includes a drug instruction sheet 42 and an annotation expectation 43 generated based on the drug instruction sheet 42, wherein the annotation expectation 43 includes knowledge content and conversion text associated with the drug instruction sheet extracted based on colloquial language, and the knowledge content is extracted from the drug instruction sheet using a thinking chain method. Based on the training data set 41, the generative network 45 in the preset generative adversarial network 44 is trained until the generative network 45 meets the preset first end condition. Based on the drug instruction sheet 42 and the output text output by the generative network 45, the discriminant network 46 in the generative adversarial network 44 is trained until the discriminant network 46 meets the preset second end condition. Based on the above process, the generative adversarial network 44 is alternately trained until the generative adversarial network 44 meets the preset target end condition, and the generative network 45 in the generative adversarial network 44 is determined as a text conversion model.
[0087] The data processing method provided in this embodiment alternately trains the generation network and the discrimination network based on a preset first end condition and a second end condition. When it is detected that the discrimination network meets the preset target end condition, that is, the conversion text generated by the generation network is real enough to deceive the discrimination network, the generation network can be determined as a text conversion model. The text conversion model can accurately convert the obscure text in the drug instructions into easy-to-understand text, so that users can use the drug based on the easy-to-understand conversion text.
[0088] Figure 5 A flowchart of a data processing method provided by another embodiment of the present disclosure, based on any of the above embodiments, as Figure 5 As shown, step 301 includes:
[0089] Step 501: input the drug instructions and knowledge content in the training data set into the generation network to obtain the output text of the generation network.
[0090] Step 502: Perform data processing on the output text and the converted text in the training data set based on a preset loss function to determine the loss value of the generated network.
[0091] Step 503: Determine whether the generation network meets a preset first end condition based on the loss value or the current model training information of the generation model.
[0092] Step 504: If it is determined based on the loss value or the current model training information of the generative model that the generative network meets the preset first termination condition, the discriminant network is trained based on the converted text in the training data set and the output text output by the generative network.
[0093] Step 505: If it is determined based on the loss value or the current model training information of the generative model that the generative network does not meet the preset first termination condition, the parameters of the generative network are adjusted according to the loss value, and the step of inputting the drug instructions and knowledge content in the training data set into the generative network to obtain the output text of the generative network is returned to be executed.
[0094] In this embodiment, after the training data set is obtained, a training operation may be first performed on the generative network in the generative adversarial network based on the training data set.
[0095] Optionally, the drug instructions and knowledge content in the training data set can be input into the generation network to obtain the output text of the generation network. The output text can be the conversion result of the generation network converting the drug instructions into speech based on the drug instructions and knowledge content. The output text and the converted text in the training data set are processed based on a preset loss function to determine the loss value of the generation network.
[0096] Furthermore, it can be determined whether the generated network meets the preset first termination condition based on the loss value or the current model training information of the generated model. The first termination condition can be that the loss value of the generated network is lower than the preset loss value threshold, or the first termination condition can be that the training time of the generated network reaches the preset time threshold, or the first termination condition can be that the number of training times of the generated network reaches the preset number threshold.
[0097] If it is detected that the generated network meets the preset first end condition, it can be determined that the generated network currently has a certain text conversion capability and can convert obscure drug instructions into easy-to-understand conversion text. At this time, the training operation can be performed alternately on the discriminant text.
[0098] On the contrary, if it is detected that the generated network does not meet the preset first end condition, it can be determined that the generated network has not been trained, and the parameters of the generated network can be adjusted based on the loss value, and the step of inputting the drug instructions and knowledge content in the training data set into the generated network can be returned to execute until the generated network meets the first end condition.
[0099] The data processing method provided in this embodiment pre-sets the first end condition, so that when the generated network meets the first end condition, that is, when the generated network has a certain ability to convert the drug instructions, the training operation of the generated network is stopped and the discriminant network is trained alternately. The training efficiency of the model can be improved on the basis of ensuring the data processing capability of the generated network.
[0100] Figure 6 A flowchart of a data processing method provided by another embodiment of the present disclosure is provided. Based on any of the above embodiments, Figure 6 As shown, step 302 includes:
[0101] Step 601: Input the conversion text in the training data set and the output text generated by the generation network into the discriminant network to obtain the discrimination result output by the discriminant network, wherein the discrimination result includes the information source channel of the output text and the conversion text.
[0102] Step 602: Determine whether the generated network meets a preset second end condition based on the discrimination result or the current model training information of the discrimination model.
[0103] Step 603: If it is determined based on the discrimination result or the current model training information of the discrimination model that the generated network meets the preset second end condition, then detect whether the discrimination network meets the preset target end condition.
[0104] Step 604: If it is determined based on the discrimination result or the current model training information of the discrimination model that the generation network does not meet the preset second termination condition, the parameters of the discrimination network are adjusted based on the discrimination result, and the step of inputting the converted text in the training data set and the output text generated by the generation network into the discrimination network is returned to be executed.
[0105] In this embodiment, after the generative network completes a round of training, it can have the ability to convert the obscure text in the drug instructions into easy-to-understand converted text. At this time, the discriminative network can be trained alternately.
[0106] Optionally, the conversion text in the training data set and the output text generated by the generation network can be input into the discriminant network to obtain the discrimination result output by the discriminant network. After obtaining the input content, the discriminant network can discriminate the information source channel of the input content to determine whether the current input text is the accurate conversion text in the training data set or the output text generated by the generation network. That is, the authenticity of the output text output by the generation network is judged.
[0107] Furthermore, in order to implement the training operation of the discriminant network, a second end condition may be preset, wherein the second end condition includes but is not limited to any one of the following: the accuracy of the discriminant result output by the discriminant network is lower than a preset first threshold, the training time of the discriminant network reaches a preset time threshold, and the number of iterative training of the discriminant network reaches a preset number threshold.
[0108] Therefore, the discrimination result output by the discriminant network can be obtained, and the current model training information of the discriminant network can be determined, wherein the model training information includes but is not limited to the training duration and number of trainings of the discriminant network. Based on the discrimination result or the current model training information of the discriminant model, it is determined whether the generated network meets the preset second end condition.
[0109] Furthermore, if the second termination condition is met, the training operation of the discriminant network can be stopped at this time, and it can be further determined whether the discriminant network meets the preset target termination condition. The target termination condition includes but is not limited to any one of the following: the accuracy of the discrimination result output by the discriminant network is lower than the preset target accuracy threshold, the alternating training time of the generative adversarial network reaches the preset time threshold, and the alternating training times of the generative adversarial network reaches the preset times threshold.
[0110] If the discriminant network does not meet the second end condition, it is necessary to continue to iterate the training operation of the discriminant network. Therefore, the step of inputting the converted text in the training data set and the output text generated by the generating network into the discriminant network can be returned to execute until the discriminant network meets the second end condition.
[0111] The data processing method provided in this embodiment can further determine whether the training of the generative adversarial network is completed by presetting the second end condition when the discriminant network meets the second end condition, or can alternately train the generative model when the discriminant network meets the second end condition. It can improve the training efficiency of the model while ensuring the data processing capability of the generative network.
[0112] Optionally, based on any of the above embodiments, step 303 includes:
[0113] Determine the accuracy of the discrimination result output by the discrimination network.
[0114] If the accuracy is lower than a preset threshold, it is determined that the discriminant network meets the preset target end condition.
[0115] or,
[0116] If the number of times the generative adversarial network is alternately trained reaches a preset number threshold, it is determined that the discriminant network meets the preset target end condition.
[0117] or,
[0118] If the training duration of the alternating training of the generative adversarial network reaches a preset duration threshold, it is determined that the discriminant network meets the preset target end condition.
[0119] In this embodiment, during the alternating training of the generative adversarial network, the generative network is used to generate more realistic conversion texts, while the discriminative network is used to more accurately determine whether the currently input text is a real drug instruction sheet or a conversion text generated by the generative network. The two are continuously trained alternately until the generative network can generate sufficiently realistic conversion texts that can deceive the discriminative network.
[0120] Therefore, the preset target end condition may be that the accuracy of the discrimination result output by the discriminant network is lower than a preset threshold. The accuracy of the discrimination result output by the discriminant network is determined. If the accuracy is lower than the preset threshold, it indicates that the converted text currently generated by the generative network is sufficiently authentic and can deceive the discriminant network. At this time, it can be determined that the discriminant network meets the preset target end condition.
[0121] Alternatively, the target end condition may be that the number of times the generative adversarial network is alternately trained reaches a preset number threshold. For example, the number threshold may be 50 times. When it is detected that the generative adversarial network has been alternately trained 50 times, it may be determined that the discriminant network meets the preset target end condition, and the alternating training ends. The number threshold may be set by the user according to actual needs, and the present disclosure does not limit this.
[0122] Alternatively, the target end condition may be that the duration of the alternating training of the generative adversarial network reaches a preset duration threshold. The training duration of the alternating training of the generative adversarial network is determined in real time. When it reaches the preset duration threshold, it is determined that the discriminant network meets the preset target end condition, and the alternating training ends. Among them, the duration threshold can be set by the user according to actual needs, and the present disclosure does not limit this.
[0123] The data processing method provided in this embodiment pre-sets a variety of different target end conditions, so that different conditions can be used to perform model training operations according to different training needs.
[0124] Figure 7A schematic diagram of a data processing method provided in an embodiment of the present disclosure, which is used to construct a generative adversarial network as described in any of the above embodiments, such as Figure 7 The method shown includes:
[0125] Step 701: Initialize two pre-set large language models respectively.
[0126] Step 702: Determine the two large language models as a generative network and a discriminative network respectively, and construct the generative adversarial network based on the generative network and the discriminative network.
[0127] In this embodiment, a large language model refers to a language model containing hundreds of millions (or more) of parameters, which are trained on a large amount of basic text data. A large language model can be combined with a generative adversarial network, which continuously generates and discriminates during the training process, and the two models compete with each other to generate more understandable converted text.
[0128] Optionally, in order to realize the construction of the generative adversarial network, two preset large language models may be first obtained. The two large language models are initialized respectively. The two large language models are respectively determined as a generative network and a discriminative network. Then, the generative adversarial network may be constructed based on the generative network and the discriminative network.
[0129] The data processing method provided in this embodiment, by combining a large language model with a generative adversarial network, can respectively construct a generative network and a discriminative network based on the two initialized large language models, so that during the model training process, the generative network and the discriminative network in the generative adversarial network can be trained alternately, thereby enabling the generative network to generate more accurate and easier-to-understand converted text.
[0130] Figure 8 A flow chart of a data processing method provided by an embodiment of the present disclosure is shown in FIG. Figure 8 As shown, the method includes:
[0131] Step 801: Obtain a data processing request, wherein the data processing request includes a specification to be converted.
[0132] Step 802: input the instruction manual to be converted into a preset text conversion model to obtain a conversion text output by the text conversion model, wherein the conversion text is used to describe the instruction manual to be converted in colloquial language.
[0133] The text conversion model is a generative network in a generative adversarial network trained based on any one of the above embodiments.
[0134] The execution subject of this embodiment is a data processing device, which can be coupled to a server. The server can be connected to a terminal device for communication. Thus, the data processing request sent by the terminal device can be obtained, and the text conversion operation is performed on the instructions to be converted in the data processing request based on a preset text conversion model to obtain an easy-to-understand conversion text, so that the user can understand the content of the conversion instructions more intuitively.
[0135] In this embodiment, the text conversion model is obtained by training the generative adversarial network based on LLM by combining the thought chain and prompt tuning method. The text conversion model can be the generative network in the generative adversarial network in any of the above embodiments.
[0136] The data processing device can obtain a data processing request, wherein the data processing request includes the specification to be converted, input the specification to be converted into a preset text conversion model, obtain a conversion text output by the text conversion model, and the conversion text is used to describe the specification to be converted in colloquial language.
[0137] The data processing method provided in this embodiment trains the generative adversarial network based on LLM by combining the thought chain and prompt tuning method to obtain a text conversion model. Therefore, after obtaining the data processing request, the text conversion operation can be performed on the instructions to be converted in the data processing request based on the text conversion model to obtain an easy-to-understand conversion text, so that the user can understand the content of the conversion instructions more intuitively.
[0138] Fig. 9 A schematic diagram of the structure of a data processing device provided in an embodiment of the present disclosure, such as Fig. 9 As shown, the device includes: an acquisition module 91 and a training module 92. The acquisition module 91 is used to acquire a preset training data set, wherein the training data set includes multiple sets of training data, and the training data includes drug instructions, knowledge content associated with the drug instructions extracted based on colloquial language, and conversion text, wherein the knowledge content is extracted from the drug instructions using a thinking chain method, and the training data set is constructed based on a preset fine-tuning template. The training module 92 is used to alternately train the generative network and the discriminative network in the preset generative adversarial network based on the training data set until the generative adversarial network meets the preset target end condition, and the generative network is determined as a text conversion model.
[0139] Further, based on any of the above embodiments, the training module includes: a first training unit, used to train a preset generative network based on the training data set until the generative network meets a preset first end condition. A second training unit, used to train the discriminant network according to the output text output by the drug instructions in the training data set based on the conversion text in the training data set and the generative network that meets the first end condition, until the discriminant network meets the preset second end condition. A first processing unit, used to return to the step of training the preset generative network based on the training data set if the discriminant network does not meet the preset target end condition. A second processing unit, used to determine the generative network as a text conversion model if the discriminant network meets the target end condition.
[0140] Further, on the basis of any of the above embodiments, the first training unit includes: a first input subunit, which is used to input the drug instructions and knowledge content in the training data set into the generation network to obtain the output text of the generation network. A processing subunit, which is used to perform data processing on the output text and the conversion text in the training data set based on a preset loss function to determine the loss value of the generation network. A first processing subunit, which is used to train the discriminant network based on the conversion text in the training data set and the output text output by the generation network if it is determined based on the loss value or the current model training information of the generation model that the generation network meets the preset first end condition. A second processing subunit, which is used to adjust the parameters of the generation network according to the loss value if it is determined based on the loss value or the current model training information of the generation model that the generation network does not meet the preset first end condition, and return to execute the step of inputting the drug instructions and knowledge content in the training data set into the generation network to obtain the output text of the generation network.
[0141] Further, on the basis of any of the above embodiments, the second training unit includes: a second input subunit, which is used to input the conversion text in the training data set and the output text output by the generation network that meets the first end condition according to the drug instructions in the training data set into the discriminant network to obtain the discrimination result output by the discriminant network, and the discrimination result includes the output text and the information source channel of the conversion text. A third processing subunit is used to detect whether the discriminant network meets the preset target end condition if it is determined based on the discrimination result or the current model training information of the discriminant model that the generation network meets the preset second end condition. A fourth processing subunit is used to return to the step of inputting the conversion text in the training data set and the output text generated by the generation network into the discriminant network if it is determined based on the discrimination result or the current model training information of the discriminant model that the generation network does not meet the preset second end condition.
[0142] Further, on the basis of any of the above embodiments, the detection unit includes: a third determination subunit, which is used to determine the accuracy of the discrimination result output by the discriminant network. A determination subunit is used to determine that the discriminant network meets the preset target end condition if the accuracy is lower than a preset threshold. Alternatively, a determination subunit is used to determine that the discriminant network meets the preset target end condition if the number of times the generative adversarial network is alternately trained reaches a preset number threshold. Alternatively, a determination subunit is used to determine that the discriminant network meets the preset target end condition if the training duration of the alternate training of the generative adversarial network reaches a preset duration threshold.
[0143] Further, based on any of the above embodiments, the acquisition module includes: a data acquisition unit, used to acquire a data set to be processed and a preset fine-tuning template, wherein the data set to be processed includes multiple drug instructions, and the fine-tuning template includes a first sub-template for extracting knowledge content based on a thinking chain method and a second sub-template for extracting conversion text based on the drug instructions. A processing unit, used to perform a content extraction operation on each drug instruction in the data set to be processed based on the fine-tuning template to obtain the training data set.
[0144] Fig.10 A schematic diagram of the structure of a data processing device provided in an embodiment of the present disclosure, which is used to construct a generative adversarial network as described in any of the above embodiments, such as Fig.10As shown, the device includes: an initialization module 1001 and a determination module 1002. The initialization module 1001 is used to initialize two pre-set large language models respectively. The determination module 1002 is used to determine the two large language models as a generative network and a discriminative network respectively, and construct the generative adversarial network based on the generative network and the discriminative network.
[0145] Fig.11 A schematic diagram of the structure of a data processing device provided in an embodiment of the present disclosure, such as Fig.11 As shown, the device includes: a request acquisition module 1101 and an input module 1102. The request acquisition module 1101 is used to obtain a data processing request, wherein the data processing request includes the instructions to be converted. The input module 1102 is used to input the instructions to be converted into a preset text conversion model to obtain the converted text output by the text conversion model, and the converted text is used to describe the instructions to be converted in colloquial language. The text conversion model is a generative network in a generative adversarial network trained based on any of the above embodiments.
[0146] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0147] According to an embodiment of the present disclosure, the present disclosure further provides an electronic device, including:
[0148] at least one processor; and
[0149] a memory communicatively connected to the at least one processor; wherein,
[0150] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in any of the above embodiments.
[0151] According to an embodiment of the present disclosure, the present disclosure further provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the method according to any of the above embodiments.
[0152] According to an embodiment of the present disclosure, the present disclosure also provides a computer program product, which includes: a computer program, the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the solution provided by any of the above embodiments.
[0153] Fig.12A schematic diagram of the structure of an electronic device provided for an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0154] like Fig.12 As shown, the device 1200 includes a computing unit 1201, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1202 or a computer program loaded from a storage unit 1208 into a random access memory (RAM) 1203. In the RAM 1203, various programs and data required for the operation of the device 1200 can also be stored. The computing unit 1201, the ROM 1202, and the RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.
[0155] A number of components in the device 1200 are connected to the I / O interface 1205, including: an input unit 1206, such as a keyboard, a mouse, etc.; an output unit 1207, such as various types of displays, speakers, etc.; a storage unit 1208, such as a disk, an optical disk, etc.; and a communication unit 1209, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1209 allows the device 1200 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0156] The computing unit 1201 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1201 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1201 performs the various methods and processes described above, such as data processing methods. For example, in some embodiments, the data processing method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1208. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1200 via ROM 1202 and / or communication unit 1209. When the computer program is loaded into RAM 1203 and executed by the computing unit 1201, one or more steps of the data processing method described above may be performed. Alternatively, in other embodiments, the computing unit 1201 may be configured to perform the data processing method in any other appropriate manner (e.g., by means of firmware).
[0157] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0158] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0159] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer 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 of the foregoing.
[0160] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0161] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0162] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.
[0163] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0164] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A data processing method, comprising: Obtaining a data set to be processed and a preset fine-tuning template, wherein the data set to be processed includes a plurality of drug instructions, and the fine-tuning template includes a first sub-template for extracting knowledge content based on a thinking chain method and a second sub-template for extracting converted text based on the drug instructions; Based on the fine-tuning template, a content extraction operation is performed on each drug instruction sheet in the to-be-processed data set to obtain a training data set; wherein the training data set includes multiple sets of training data, and the training data includes drug instructions, knowledge content associated with the drug instructions extracted based on colloquial language, and conversion text, the knowledge content is extracted from the drug instructions using a thinking chain method, and the training data set is constructed based on a preset fine-tuning template; Based on the training data set, the generative network and the discriminative network in the preset generative adversarial network are alternately trained until the generative adversarial network meets the preset target end condition, and the generative network is determined as a text conversion model.
2. The method according to claim 1, wherein the generative network and the discriminative network in the preset generative adversarial network are alternately trained based on the training data set until the generative adversarial network meets the preset target end condition, comprising: Training a preset generation network based on the training data set until the generation network meets a preset first end condition; Based on the conversion text in the training data set and the output text output by the generation network that meets the first end condition according to the drug instructions in the training data set, the discriminant network is trained until the discriminant network meets the preset second end condition; If the discriminant network does not meet the preset target end condition, returning to execute the step of training the preset generating network based on the training data set; If the discriminant network meets the target end condition, the generative network is determined as a text conversion model.
3. The method according to claim 2, wherein the training of a preset generation network based on the training data set until the generation network meets a preset first end condition comprises: Inputting the drug instructions and knowledge content in the training data set into the generation network to obtain the output text of the generation network; Performing data processing on the output text and the converted text in the training data set based on a preset loss function to determine a loss value of the generating network; If it is determined based on the loss value or the current model training information of the generative network that the generative network meets the preset first end condition, the discriminant network is trained based on the conversion text in the training data set and the output text output by the generative network; If it is determined based on the loss value or the current model training information of the generated network that the generated network does not meet the preset first termination condition, the parameters of the generated network are adjusted according to the loss value, and the step of inputting the drug instructions and knowledge content in the training data set into the generated network to obtain the output text of the generated network is returned to be executed.
4. The method according to claim 2, wherein the generative network based on the converted text in the training data set and satisfying the first end condition trains the discriminant network according to the output text output by the drug instructions in the training data set until the discriminant network satisfies the preset second end condition, comprising: Inputting the converted text in the training data set and the output text output by the generating network that meets the first end condition according to the drug instructions in the training data set into the discriminant network, obtaining a discriminant result output by the discriminant network, wherein the discriminant result includes the information source channel of the output text and the converted text; If it is determined based on the discrimination result or the current model training information of the discrimination network that the generated network meets the preset second end condition, then detecting whether the discrimination network meets the preset target end condition; If it is determined based on the discrimination result or the current model training information of the discrimination network that the generation network does not meet the preset second termination condition, the parameters of the discrimination network are adjusted based on the discrimination result, and the step of inputting the converted text in the training data set and the output text generated by the generation network into the discrimination network is returned to be executed.
5. According to the method of claim 4, the step of detecting whether the discriminant network meets a preset target end condition comprises: Determining the accuracy of the discrimination result output by the discrimination network; If the accuracy rate is lower than a preset threshold, it is determined that the discriminant network meets the preset target end condition; or, If the number of times the generative adversarial network is alternately trained reaches a preset number threshold, it is determined that the discriminant network meets the preset target end condition; or, If the training duration of the alternating training of the generative adversarial network reaches a preset duration threshold, it is determined that the discriminant network meets the preset target end condition.
6. A data processing method for constructing a generative adversarial network in the data processing method according to any one of claims 1 to 5, comprising: Initialize two pre-set large language models respectively; The two large language models are respectively determined as a generative network and a discriminative network, and the generative adversarial network is constructed based on the generative network and the discriminative network.
7. A data processing method, comprising: Obtaining a data processing request, wherein the data processing request includes a specification to be converted; Inputting the instruction manual to be converted into a preset text conversion model to obtain a conversion text output by the text conversion model, wherein the conversion text is used to describe the instruction manual to be converted in colloquial language; Wherein, the text conversion model is a generative network in a generative adversarial network that meets a preset target end condition in the data processing method described in any one of claims 1-5.
8. A data processing device, comprising: An acquisition module, used to acquire a preset training data set, wherein the training data set includes multiple sets of training data, the training data includes drug instructions, knowledge content associated with the drug instructions extracted based on colloquial language, and conversion text, the knowledge content is extracted from the drug instructions using a thinking chain method, and the training data set is constructed based on a preset fine-tuning template; A training module, used for alternately training a generative network and a discriminative network in a preset generative adversarial network based on the training data set until the generative adversarial network meets a preset target end condition, and determining the generative network as a text conversion model; The acquisition module comprises: A data acquisition unit, used to acquire a data set to be processed and a preset fine-tuning template, wherein the data set to be processed includes a plurality of drug instructions, and the fine-tuning template includes a first sub-template for extracting knowledge content based on a thinking chain method and a second sub-template for extracting conversion text based on the drug instructions; A processing unit is used to perform a content extraction operation on each drug instruction sheet in the to-be-processed data set based on the fine-tuning template to obtain the training data set.
9. The apparatus according to claim 8, wherein the training module comprises: A first training unit, used for training a preset generation network based on the training data set until the generation network meets a preset first end condition; A second training unit, configured to train the discriminant network based on the converted text in the training data set and the output text output by the generating network, until the discriminant network meets a preset second end condition; A first processing unit, configured to return to executing the step of training the preset generating network based on the training data set if the discriminant network does not meet the preset target end condition; The second processing unit is used to determine the generation network as a text conversion model if the discriminant network meets the target end condition.
10. The apparatus according to claim 9, wherein the first training unit comprises: A first input subunit, used to input the drug instructions and knowledge content in the training data set into the generation network to obtain the output text of the generation network; A processing subunit, configured to perform data processing on the output text and the converted text in the training data set based on a preset loss function to determine a loss value of the generating network; A first processing subunit is configured to train the discriminant network based on the conversion text in the training data set and the output text output by the generative network if it is determined based on the loss value or the current model training information of the generative network that the generative network meets a preset first end condition; The second processing sub-unit is used to adjust the parameters of the generating network according to the loss value, and return to the step of inputting the drug instructions and knowledge content in the training data set into the generating network to obtain the output text of the generating network, if it is determined based on the loss value or the current model training information of the generating network that the generating network does not meet the preset first end condition.
11. The apparatus according to claim 9, wherein the second training unit comprises: A second input subunit is used to input the conversion text in the training data set and the output text generated by the generation network into the discriminant network to obtain the discrimination result output by the discriminant network, wherein the discrimination result includes the information source channel of the output text and the conversion text; A third processing subunit is configured to detect whether the discriminant network satisfies a preset target end condition if it is determined based on the discriminant result or the current model training information of the discriminant network that the generated network satisfies a preset second end condition; The fourth processing sub-unit is used to return to the step of inputting the converted text in the training data set and the output text generated by the generating network into the discriminant network if it is determined based on the discriminant result or the current model training information of the discriminant network that the generating network does not meet the preset second termination condition.
12. The apparatus according to claim 9, wherein the second training unit further comprises: A third determination subunit is used to determine the accuracy of the discrimination result output by the discrimination network; A determination subunit, configured to determine whether the discriminant network meets a preset target end condition if the accuracy rate is lower than a preset threshold; or, A determination subunit, configured to determine that the discriminant network meets a preset target end condition if the number of times the generative adversarial network is alternately trained reaches a preset number threshold; or, The determination subunit is used to determine whether the discriminant network meets the preset target end condition if the training duration of the alternating training of the generative adversarial network reaches a preset duration threshold.
13. A data processing device, used to construct a generative adversarial network in the data processing device of any one of claims 8 to 12, comprising: An initialization module, used to respectively initialize two pre-set large language models; A determination module is used to determine the two large language models as a generative network and a discriminative network respectively, and construct the generative adversarial network based on the generative network and the discriminative network.
14. A data processing device, comprising: A request acquisition module, used to acquire a data processing request, wherein the data processing request includes a specification to be converted; An input module, used for inputting the specification to be converted into a preset text conversion model, obtaining a conversion text output by the text conversion model, wherein the conversion text is used for describing the specification to be converted in colloquial language; Wherein, the text conversion model is a generative network in a generative adversarial network that meets a preset target end condition in the data processing device described in any one of claims 8-12.
15. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5 or 6 or 7.
16. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-5 or 6 or 7.
17. A computer program product, comprising a computer program, which implements the steps of the method according to any one of claims 1 to 5 or 6 or 7 when executed by a processor.
