Data processing method and device based on large model

By introducing original and extended units into the software units of the large model, combining role allocation and simple interaction functions, the problem of low data processing flexibility in the existing technology is solved, flexible parameter input and result verification is realized, and data is improved Accuracy and success rate of processing.

CN119168085AActive Publication Date: 2024-12-20BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411120587.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-12-20
Estimated Expiration
2044-08-15

AI Technical Summary

Technical Problem

The existing technology has low flexibility when calling large language models for data processing, and the prompt word templates have strict requirements on formats, which makes it difficult to modify parameters and replace formats, and it is difficult to meet different functional needs.

Method used

By introducing original units and expansion units into the software units of the large model, the identification of the expansion units is used to control the data processing process, combining preset role allocation functions and simple interaction functions, directly input parameters for data processing, avoiding format restrictions, and If necessary, perform results checksum key extraction.

Benefits of technology

It improves the flexibility of the data processing process, facilitates the upgrade and update of the original unit, enhances the flexibility of parameter input, and improves the accuracy and success rate of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119168085A_ABST
    Figure CN119168085A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data processing method and device based on a large model, and relates to the technical field of artificial intelligence, aiming at each function, a software unit for realizing the function by calling a large language model is configured, part of or all original units are in one-to-one correspondence with expansion units, and the expansion units are in one-to-one correspondence with the software unit. The original unit and the corresponding expansion unit realize the same function and different input parameters, and in the process of realizing the target function, the input parameters are acquired; for an original unit in the target software unit, calling the original unit to carry out data processing under the condition that the identifier of the target extension unit is not obtained; under the condition that the identifier of the target extension unit is obtained, calling the target extension unit to carry out data processing; and obtaining a data processing result. By applying the scheme provided by the embodiment of the invention, data processing can be performed through the large language model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a data processing method and device based on a large model. Background Art

[0002] With the development of artificial intelligence, the technology of processing through generative large language models is becoming more and more widely used. Since large language models have strong data processing and data analysis capabilities, they are playing an increasingly important role in the data processing process.

[0003] To do this, it is necessary to implement a method that can process data by calling a large language model. Summary of the invention

[0004] The purpose of the embodiment of the present invention is to provide a data processing method and device based on a large model to realize data processing through a large language model. The specific technical solution is as follows: In a first aspect of an embodiment of the present invention, a data processing method based on a large model is first provided. For each function, a software unit is configured to implement the function by calling a large language model. The software unit includes an original unit and an extension unit. Some or all of the original units correspond to the extension units one by one. The original unit and the corresponding extension unit implement the same function, but different parameters are passed in. In the process of implementing the target function, the method includes: Get input parameters; Calling the target software unit corresponding to the target function, and performing data processing on the input parameter through the target large language model corresponding to the target function, wherein, for the original unit in the target software unit, if the identifier of the target extension unit is not obtained, calling the original unit for data processing; if the identifier of the target extension unit is obtained, calling the target extension unit for data processing, the target extension unit corresponds to the original unit; Obtain data processing results.

[0005] In one embodiment of the present invention, before calling the target software unit corresponding to the target function and performing data processing on the input parameter by using the target large language model corresponding to the target function, the method further includes: The preset role allocation function is called to allocate the different semantic contents contained in the input parameters to different roles in the prompt words to be input into the target large language model.

[0006] In one embodiment of the present invention, the input parameters are input by calling a simple interactive function, which does not include a data output format for limiting the large language model and / or does not include input and output examples. In this case, the input parameters are directly input into the target large language model, and the input and output examples include: sample prompt words input into the large language model and sample output results obtained after the large language model processes the sample prompt words.

[0007] In one embodiment of the present invention, for each function, the software unit corresponding to the function includes a production result verification unit, and after the input parameter is processed by the target large language model corresponding to the target function, it also includes: Obtaining an output result after a target large language model corresponding to a target function processes the input parameters; Calling the production result verification unit corresponding to the target function to detect whether the output result conforms to the target format; If not, the input parameters are processed again using the target large language model corresponding to the target function, and the step of obtaining the output result after the input parameters are processed by the target large language model corresponding to the target function is returned to execute.

[0008] In one embodiment of the present invention, for each function, the software unit corresponding to the function includes a result post-processing unit, which, after the input parameter is processed by the target large language model corresponding to the target function, further includes: Obtaining an output result after a target large language model corresponding to a target function processes the input parameters; Calling the target large language model generation result post-processing unit corresponding to the target function to analyze the output result and extract key content in the output result, wherein the key content is the content contained in the output result that best represents the meaning of the output result; If the extraction fails, the input parameters are processed again using the target large language model corresponding to the target function, and the step of obtaining the output result of the input parameters processed by the target large language model corresponding to the target function is returned to be executed.

[0009] In a second aspect of an embodiment of the present invention, a data processing device based on a large model is further provided. For each function, a software unit is configured to implement the function by calling the large language model. The software unit includes an original unit and an extension unit. Some or all of the original units correspond to the extension units one by one. The original unit and the corresponding extension unit implement the same function, but different parameters are passed in. In the process of implementing the target function, the device includes: Parameter acquisition module, used to obtain input parameters; A first data processing module is used to call the target software unit corresponding to the target function, and perform data processing on the input parameter through the target large language model corresponding to the target function, wherein, for the original unit in the target software unit, if the identifier of the target extension unit is not obtained, the original unit is called for data processing; if the identifier of the target extension unit is obtained, the target extension unit is called for data processing, and the target extension unit corresponds to the original unit; The result acquisition module is used to obtain the data processing results.

[0010] In one embodiment of the present invention, the device further comprises: The classification module is used to call a preset role allocation function to allocate the different semantic contents contained in the input parameters to different roles in the prompt words to be input into the target large language model.

[0011] In one embodiment of the present invention, the input parameters are input by calling a simple interactive function, which does not include a data output format for limiting the large language model and / or does not include input and output examples. In this case, the input parameters are directly input into the target large language model, and the input and output examples include: sample prompt words input into the large language model and sample output results obtained after the large language model processes the sample prompt words.

[0012] In one embodiment of the present invention, for each function, the software unit corresponding to the function includes a production result verification unit, and the device further includes: A first result obtaining module is used to obtain an output result after the target large language model corresponding to the target function processes the input parameter; A format detection module, used to call the production result verification unit corresponding to the target function to detect whether the output result conforms to the target format; The second data processing module is used to re-process the input parameters through the target large language model corresponding to the target function if the format detection module determines that the output result does not conform to the target format, and return to trigger the execution of the first result acquisition module.

[0013] In one embodiment of the present invention, for each function, the software unit corresponding to the function includes a result post-processing unit, and the device further includes: A second result obtaining module is used to obtain an output result after the target large language model corresponding to the target function processes the input parameter; A key point extraction module, used for calling the target large language model corresponding to the target function to generate a result post-processing unit, analyzing the output result, and extracting key points in the output result, wherein the key points are the contents contained in the output result that best represent the meaning of the output result; The third data processing module is used to re-call the target software unit corresponding to the target function if the extraction in the key extraction module fails, and perform data processing on the input parameters through the target large language model corresponding to the target function.

[0014] In a third aspect of an embodiment of the present invention, there is further provided an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; The processor is used to implement any method step described in the first aspect when executing a program stored in the memory.

[0015] In a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.

[0016] In yet another aspect of the embodiments of the present invention, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute any one of the method steps described in the first aspect.

[0017] The data processing method based on the big model provided by the embodiment of the present invention is configured with a software unit for each function to implement the function by calling the big language model. The software unit is divided into an original unit and an extended unit, and the extended unit corresponds to all or part of the original unit. The target big language model is implemented by calling the target software unit to perform data processing on the input parameters.

[0018] Furthermore, during the data processing process, the identification of the target extension unit can be used to control whether the original unit or the extension unit is used to implement its corresponding function. This allows for flexible control of the software units used in the data processing process, improves the flexibility of the program, and facilitates the upgrade and update of the original unit. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.

[0020] Figure 1 A schematic flow chart of a first large model-based data processing method provided in an embodiment of the present invention; Figure 2 A schematic flow chart of a second large model-based data processing method provided in an embodiment of the present invention; Figure 3 A schematic flow chart of a third large model-based data processing method provided in an embodiment of the present invention; Figure 4 A schematic flow chart of a fourth large model-based data processing method provided in an embodiment of the present invention; Figure 5 A schematic flow chart of a fifth large model-based data processing method provided in an embodiment of the present invention; Figure 6 A schematic flow chart of a sixth data processing method based on a large model provided in an embodiment of the present invention; Figure 7 A schematic diagram of the structure of a data processing device based on a large model provided by an embodiment of the present invention; Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field based on this application belong to the scope of protection of the present invention.

[0022] In order to implement data processing through a large language model, an embodiment of the present invention provides a data processing method and device based on a large model.

[0023] In order to facilitate users to use large language models in related technologies, the complete program that calls the large language model to process the data is often encapsulated. Users only need to call the encapsulated fixed program and pass in fixed parameters. Then the program will automatically call the large language model based on the passed in parameters to process the data and obtain the output results.

[0024] The packaged program can realize different functions, and each function corresponds to a software unit used to realize the function. In order to ensure the stability of the packaged program, the parameters passed into each software unit will be restricted, and the parameters passed in must meet the restrictions, resulting in low flexibility in the data processing process.

[0025] In order to realize data processing through a large language model and solve the problems existing in related technologies, a software unit is configured for each function by calling a large language model to realize the function. The above software unit includes an original unit and an extended unit. Some or all of the original units correspond to the extended units one by one. The original unit and the corresponding extended unit implement the same processing, but the parameters passed in are different.

[0026] Among them, for each function, the configured original unit may include an input parameter passing unit for obtaining input parameters, a prompt word generating unit for combining the input parameters with a preset prompt word template to obtain a prompt word, a large model interface calling unit for calling the interface of the large language model to input the prompt word into the large language model for data processing, etc.

[0027] For any original unit, an extension unit corresponding to the original unit can be configured. The extension unit can be updated or expanded on the basis of the original unit. The functions implemented by the two are the same. For example, the extension unit corresponding to the original input parameter input unit still implements the function of obtaining the input parameters. The extension unit corresponding to the original prompt word generation unit still implements the function of combining the input parameters with the preset prompt word template to obtain the prompt word. The original large model interface calling unit still implements the function of calling the interface of the large language model to input the prompt word into the large language model for data processing.

[0028] The difference between the two is the parameters passed in. For example, two parameters need to be passed in the original unit, and three parameters need to be passed in the corresponding extended unit. Alternatively, two mandatory parameters and two optional parameters need to be passed in the original unit, and three mandatory parameters and two optional parameters need to be passed in the extended unit. Alternatively, the types of parameters that need to be passed in the original unit are a and b, and the types of parameters that need to be passed in the extended unit are a and c, for example, a is time, b is location coordinates, c is height, etc.

[0029] See also Figure 1 , which is a flow chart of the first large model-based data processing method provided in an embodiment of the present invention, includes the following steps S101-S103 in the process of realizing the target function.

[0030] S101: Obtain input parameters.

[0031] The above input parameters are parameters to be input into the large model, and the input parameters can be manually input by the user.

[0032] Or in the case of virtual characters interacting with each other, the input parameter can be the latest output of another virtual character.

[0033] Specifically, the input parameter may be content manually input by a user or the full text of a conversation recently output by another virtual character, or key content extracted from the full text.

[0034] In addition, when applied to a scene in a virtual world, the input parameters may also include information about the virtual scene where the virtual character is located, such as time information, weather information, information about virtual objects contained in the scene, and the like.

[0035] S102: calling the target software unit corresponding to the target function, and performing data processing on the input parameters through the target large language model corresponding to the target function.

[0036] Wherein, for the original unit in the target software unit, if the identification of the target extension unit is not obtained, the original unit is called to process data; if the identification of the target extension unit is obtained, the target extension unit is called to process data.

[0037] The target extension unit corresponds to the original unit.

[0038] In one embodiment of the present invention, in the process of realizing the target function, the class in the program of the software unit corresponding to the target function will be imported. In theory, the class of each original unit will be imported.

[0039] In addition, according to actual needs, when importing the class of the target extension unit, the identifier of the target extension unit will be passed in. Since the newly passed in target extension unit has a higher priority, it can replace the original unit corresponding to the target extension unit. In the process of realizing the target function, the target extension unit will replace the original unit to complete the data processing.

[0040] S103: Obtain data processing results.

[0041] As can be seen from the above, in the embodiment of the present invention, for each function, a software unit is configured to implement the function by calling a large language model. The software unit is divided into an original unit and an extended unit, and the extended unit corresponds to all or part of the original unit. The target large language model is implemented by calling the target software unit to perform data processing on the input parameters.

[0042] Furthermore, during the data processing process, the identification of the target extension unit can be used to control whether the original unit or the extension unit is used to implement its corresponding function. This allows for flexible control of the software units used in the data processing process, improves the flexibility of the program, and facilitates the upgrade and update of the original unit.

[0043] In another embodiment of the present invention, a prompt word template corresponding to the large language model is pre-configured, and the prompt word template is combined with the above input parameters as the prompt word input into the large language model.

[0044] Specifically, the prompt word is the data input into the large language model and processed by the large language model. The prompt word is obtained by combining the input parameters with the prompt word template. Different large language models correspond to different prompt word templates.

[0045] For example, the function of the large language model is to combine the weather conditions of the current scene with the information provided by the user to make suggestions on the user's activity plan. The prompt word template can be: "Please plan your activity schedule based on the input information and the current weather. The input information is: ". The underlined part is the part where the input parameters are filled in.

[0046] The prompt word template contains the input and output examples of the corresponding large language model.

[0047] The above input and output examples include: sample prompt words input into the large language model, and sample output results obtained after the large language model processes the sample prompt words.

[0048] For example, the input and output examples may be: "The following is an input and output example, and you can imitate the output result of this example. When the input prompt word is "The weather is good today", the output result may be "Let's go out for a walk today".

[0049] Among them, "The weather is very good today" is a sample prompt word, and "Let's go out for a walk today" is a sample output result.

[0050] In addition, the prompt word template also includes a format for restricting the data output of the large language model, for example: "Please output the result in JSON format".

[0051] In order to ensure that the prompt words input into the large language model meet the input requirements of the large language model, the prompt word template often has data output format restrictions to ensure that the output results meet the requirements. In addition, input and output examples will be added to guide the large language model to imitate the input and output examples to output results. However, due to the strict format requirements of the prompt word template, modifying the format of the prompt word template or adding new information to the prompt word template will often be invalid. This is because the newly added content will be overwritten by the existing content. As a result, the input and output examples and data output formats are difficult to replace.

[0052] To solve this problem, in another embodiment of the present invention, the input parameters are input by calling a simple_chat function, which does not include a data output format for limiting the large language model and / or does not include input and output examples. In this case, the input parameters are directly input into the target large language model.

[0053] The above input and output examples include: sample prompt words input into the large language model and sample output results obtained after the large language model processes the sample prompt words.

[0054] As can be seen from the above, by calling the above simple interactive function, simple input parameters can be directly input without limiting the data output format and / or input and output examples of the large language model, and the input parameters can be directly input into the large language model for subsequent processing. In this way, the input parameters are not limited by the prompt word template, and flexible input is achieved, thereby meeting different functional requirements.

[0055] The prompt words of the large language model contain a lot of information. If it is directly input into the large language model, faced with a large amount of information, the large language model may find it difficult to understand the specific meaning of the information, resulting in difficulty in outputting the accurate results required by the embodiment of the present invention.

[0056] For this purpose, see Figure 2 , is a flow chart of a second data processing method based on a large model provided by an embodiment of the present invention, which is similar to the aforementioned Figure 1 In comparison, the following step S104 is also included before step S102.

[0057] S104: calling a preset role allocation function to allocate the different semantic contents contained in the above input parameters to different roles in the prompt words to be input into the target large language model.

[0058] Specifically, the above roles may include user, content, system, etc. In the embodiment of the present invention, the input parameters are classified and respectively assigned to different roles in the prompt words, so that the input parameters with different semantics are divided in advance, which makes it easier for the large language model to quickly extract the key points in the prompt words, thereby improving the accuracy of the large language model output.

[0059] In the embodiment of the present invention, a semantic analysis model may be called to perform semantic analysis on the input parameters, or other semantic analysis algorithms may be used to perform semantic analysis, which is not limited in the embodiment of the present invention.

[0060] From the above, it can be seen that in the embodiment of the present invention, before inputting the input parameters into the large language model, the input parameters are first semantically analyzed, and the input parameters are divided into different roles in the prompt words, so that the large language model can process the classified data, which is beneficial for the large language model to quickly determine the key content in the prompt words, thereby improving the accuracy of the semantic analysis results.

[0061] See also Figure 3 , is a flow chart of a third data processing method based on a large model provided in an embodiment of the present invention, which is similar to the aforementioned Figure 1 Compared with the embodiment shown, the following steps S105-S107 are also included after the above step S102.

[0062] S105: Obtain an output result after the target large language model corresponding to the target function processes the above input parameters.

[0063] S106: calling the production result verification unit corresponding to the target function to detect whether the output result complies with the target format.

[0064] The target format is the format that the output result of the pre-configured target function should conform to.

[0065] For example, the above target format is to divide the output result into different key points, and each key point is numbered. For example, the output result that conforms to the target format is "1, xxx 2, yyy", etc.

[0066] Alternatively, the number of words in the above target format cannot exceed a preset number of words; the output results are divided into different key points, and different key points are divided into different paragraphs, etc.

[0067] It should be noted that in order to make the large model output the results in the target format, a sentence indicating the target format can be added to the target candidate prompt word template, such as "You need to control the number of words in the output result to within 100 words", etc., so that the generated candidate words contain sentences indicating the target format to instruct the large model to output the results in the target format.

[0068] However, the output result of the large model may not conform to the target format, and the output result does not meet the requirements. Therefore, in order to ensure that the output result of the large model is a normal result that meets the requirements, step S105 can be executed after obtaining the output result to detect whether the output result conforms to the target format.

[0069] If the target format is met, step S103 is executed to output the result as the data processing result. If the target format is not met, step S107 is executed.

[0070] S107: re-processing the input parameters using the target large language model corresponding to the target function.

[0071] And return to execute step S105.

[0072] As can be seen from the above, in the embodiment of the present invention, after obtaining the output result of the target large model, the output result of the target large model is also checked to determine whether it conforms to the target format, and a test result is generated. The output result is tested to ensure that the output result meets the requirements. If the output result does not meet the requirements, the target large language model can be re-called for data processing. By using the randomness of the target large language model, the next output result may be able to meet the requirements. Thereby improving the success rate of data processing.

[0073] See also Figure 4 , is a flow chart of a fourth data processing method based on a large model provided in an embodiment of the present invention, which is similar to the aforementioned Figure 1 Compared with the embodiment shown, the following steps S108-S110 are also included after the above step S102.

[0074] S108: Obtain an output result after the target large language model corresponding to the target function processes the above input parameters.

[0075] S109: Calling the target large language model corresponding to the target function to generate a result post-processing unit, analyzing the output result, and extracting key content from the output result.

[0076] Among them, the above-mentioned key content is the content contained in the above-mentioned output result that best represents the meaning of the above-mentioned output result.

[0077] Since the output result of the target large model may have a large amount of data, including a large amount of data with low information content, it is difficult for users or other virtual characters to quickly determine the key points of the output result of the target large model and to respond quickly.

[0078] Therefore, in the embodiment of the present invention, the target large model generation result post-processing unit can be called to analyze the output results and extract key contents in the output results.

[0079] In one embodiment of the present invention, the output result can be input into a large model for extracting key content, instructing the large model to extract key content. In this case, the prompt word input into the large model can be "Please extract key content from the following content, the specific content is: xxx", where xxx is the above output result.

[0080] In another embodiment of the present invention, key contents in the above output results may also be extracted by a semantic analysis algorithm other than the large model.

[0081] If the key content is extracted successfully, step S103 is executed to take the key content as the data processing result. If the key content is extracted unsuccessfully, step S110 is executed.

[0082] S110: re-processing the input parameters using the target large language model corresponding to the target function.

[0083] And return to execute step S108.

[0084] As can be seen from the above, in the embodiment of the present invention, after obtaining the output result of the target large model, the output result will also be analyzed and extracted for key content, thereby reducing the portion of the output result with low information content, and facilitating subsequent rapid response based on key content with high information content. In addition, since the key content is extracted, information that does not meet expectations or useless information can be removed from the output result, while facilitating subsequent processing and improving the overall production effect. In the event of an error in the subsequent function implementation process, the key content with a small amount of data can be quickly analyzed to quickly locate the error. If the key content is not successfully extracted, the target large language model can be re-called for data processing, and the randomness of the target large language model can be used so that the next output result may meet the requirements. This improves the success rate of data processing.

[0085] See also Figure 5 , which is a flow chart of the fifth data processing method based on a large model provided in an embodiment of the present invention.

[0086] The input parameters passed in the figure are preprocessed by an input parameter preprocessing unit, which corresponds to a new input parameter preprocessing unit. During the data processing process, the identifier of the new input parameter preprocessing unit is passed in, and the original input parameter preprocessing unit can be replaced by the new input parameter preprocessing unit.

[0087] After that, the preprocessed input parameters can be combined with the prompt word template. After the prompt word is obtained, the LLM (Large Language Model) is called to obtain the output result. The output result is processed by the large model production result verification unit, the large model generation result post-processing unit and the human feedback unit to obtain the result.

[0088] The large model production result verification unit is used to implement the aforementioned step S106. The large model generation result post-processing unit is used to implement the aforementioned step S108.

[0089] The human feedback unit is used to guide the learning of the large language model based on human feedback. The human feedback unit corresponds to a new human feedback unit. During the data processing, the identifier of the human feedback unit is passed in, and the original human feedback unit can be replaced with the new human feedback unit.

[0090] In the example shown in the figure, the input parameter preprocessing unit and the human feedback unit are replaced, but what is shown in the figure is only an example. The user can choose the software unit to be replaced according to needs, and the embodiment of the present invention is not limited to this.

[0091] See also Figure 6 , which is a flow chart of the sixth data processing method based on a large model provided in an embodiment of the present invention.

[0092] The contents shown in the figure are similar to those mentioned above. Figure 5 The only difference is that the new incoming parameter pre-processing unit and the new human feedback unit are not shown.

[0093] The portion enclosed by the rectangular frame in the figure is applicable to the aforementioned process of re-execution when the output result does not meet the requirements.

[0094] Corresponding to the aforementioned data processing method based on a large model, an embodiment of the present invention further provides a data processing device based on a large model.

[0095] See also Figure 7 , is a structural diagram of a data processing device based on a large model provided by an embodiment of the present invention. For each function, a software unit is configured to implement the function by calling a large language model. The software unit includes an original unit and an extension unit. Some or all of the original units correspond to the extension units one by one. The original unit and the corresponding extension unit implement the same function, but different parameters are passed in. In the process of implementing the target function, the device includes: Parameter acquisition module 701, used to acquire input parameters; The first data processing module 702 is used to call the target software unit corresponding to the target function, and perform data processing on the input parameter through the target large language model corresponding to the target function, wherein, for the original unit in the target software unit, if the identifier of the target extension unit is not obtained, the original unit is called for data processing; if the identifier of the target extension unit is obtained, the target extension unit is called for data processing, and the target extension unit corresponds to the original unit; The result obtaining module 703 is used to obtain the data processing result.

[0096] As can be seen from the above, in the embodiment of the present invention, for each function, a software unit is configured to implement the function by calling a large language model. The software unit is divided into an original unit and an extended unit, and the extended unit corresponds to all or part of the original unit. The target large language model is implemented by calling the target software unit to perform data processing on the input parameters.

[0097] Furthermore, during the data processing process, the identification of the target extension unit can be used to control whether the original unit or the extension unit is used to implement its corresponding function. This allows for flexible control of the software units used in the data processing process, improves the flexibility of the program, and facilitates the upgrade and update of the original unit.

[0098] In one embodiment of the present invention, the device further comprises: The classification module is used to call a preset role allocation function to allocate the different semantic contents contained in the input parameters to different roles in the prompt words to be input into the target large language model.

[0099] From the above, it can be seen that in the embodiment of the present invention, before inputting the input parameters into the large language model, the input parameters are first semantically analyzed, and the input parameters are divided into different roles in the prompt words, so that the large language model can process the classified data, which is beneficial for the large language model to quickly determine the key content in the prompt words, thereby improving the accuracy of the semantic analysis results.

[0100] In one embodiment of the present invention, the input parameters are input by calling a simple interactive function, which does not include a data output format for limiting the large language model and / or does not include input and output examples. In this case, the input parameters are directly input into the target large language model, and the input and output examples include: sample prompt words input into the large language model and sample output results obtained after the large language model processes the sample prompt words.

[0101] As can be seen from the above, by calling the above simple interactive function, simple input parameters can be directly input without limiting the data output format and / or input and output examples of the large language model, and the input parameters can be directly input into the large language model for subsequent processing. In this way, the input parameters are not limited by the prompt word template, and flexible input is achieved, thereby meeting different functional requirements.

[0102] In one embodiment of the present invention, for each function, the software unit corresponding to the function includes a production result verification unit, and the device further includes: A first result obtaining module is used to obtain an output result after the target large language model corresponding to the target function processes the input parameter; A format detection module, used to call the production result verification unit corresponding to the target function to detect whether the output result conforms to the target format; The second data processing module is used to re-process the input parameters through the target large language model corresponding to the target function if the format detection module determines that the output result does not conform to the target format, and return to trigger the execution of the first result acquisition module.

[0103] As can be seen from the above, in the embodiment of the present invention, after obtaining the output result of the target large model, the output result of the target large model is also checked to determine whether it conforms to the target format, and a test result is generated. The output result is tested to ensure that the output result meets the requirements. If the output result does not meet the requirements, the target large language model can be re-called for data processing. By using the randomness of the target large language model, the next output result may be able to meet the requirements. Thereby improving the success rate of data processing.

[0104] In one embodiment of the present invention, for each function, the software unit corresponding to the function includes a result post-processing unit, and the device further includes: A second result obtaining module is used to obtain an output result after the target large language model corresponding to the target function processes the input parameter; A key point extraction module, used for calling the target large language model corresponding to the target function to generate a result post-processing unit, analyzing the output result, and extracting key points in the output result, wherein the key points are the contents contained in the output result that best represent the meaning of the output result; The third data processing module is used to re-call the target software unit corresponding to the target function if the extraction in the key extraction module fails, and perform data processing on the input parameters through the target large language model corresponding to the target function.

[0105] As can be seen from the above, in the embodiment of the present invention, after obtaining the output result of the target large model, the output result will also be analyzed and extracted for key content, thereby reducing the portion of the output result with low information content, and facilitating subsequent rapid response based on key content with high information content. In addition, since the key content is extracted, information that does not meet expectations or useless information can be removed from the output result, while facilitating subsequent processing and improving the overall production effect. In the event of an error in the subsequent function implementation process, the key content with a small amount of data can be quickly analyzed to quickly locate the error. If the key content is not successfully extracted, the target large language model can be re-called for data processing, and the randomness of the target large language model can be used so that the next output result may meet the requirements. This improves the success rate of data processing.

[0106] The embodiment of the present invention further provides an electronic device, such as Figure 8 As shown, it includes a processor 801, a communication interface 802, a memory 803 and a communication bus 804, wherein the processor 801, the communication interface 802, and the memory 803 communicate with each other through the communication bus 804. Memory 803, used for storing computer programs; The processor 801 is used to implement the aforementioned large model-based data processing method when executing the program stored in the memory 803.

[0107] When the electronic device provided by the embodiment of the present invention is used to perform data processing based on a large model, in the embodiment of the present invention, for each function, a software unit is configured to implement the function by calling a large language model. The software unit is divided into an original unit and an extended unit, and the extended unit corresponds to all or part of the original unit. The target large language model is implemented by calling the target software unit to perform data processing on the input parameters.

[0108] Moreover, during the data processing, the identification of the target extension unit can be used to control whether the original unit or the extension unit is used to implement its corresponding function. This allows for flexible control of the software units used in the data processing process, improves the flexibility of the program, and facilitates the upgrade and update of the original unit.

[0109] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0110] The communication interface is used for communication between the above terminal and other devices.

[0111] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0112] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0113] In another embodiment provided by the present invention, a computer-readable storage medium is also provided, in which a computer program is stored. When the computer program is executed by a processor, the large model-based data processing method described in any of the above embodiments is implemented.

[0114] In another embodiment provided by the present invention, a computer program product containing instructions is also provided, which, when executed on a computer, enables the computer to execute any of the large model-based data processing methods described in the above embodiments.

[0115] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0116] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0117] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0118] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A data processing method based on a large model, characterized in that: For each function, a software unit is configured to implement the function by calling a large language model. The software unit includes an original unit and an extended unit. Some or all of the original units correspond to the extended units one by one. The original unit and the corresponding extended unit implement the same function, but different parameters are passed in. In the process of implementing the target function, the method includes: Get input parameters; Calling the target software unit corresponding to the target function, and performing data processing on the input parameter through the target large language model corresponding to the target function, wherein, for the original unit in the target software unit, if the identifier of the target extension unit is not obtained, calling the original unit for data processing; if the identifier of the target extension unit is obtained, calling the target extension unit for data processing, the target extension unit corresponds to the original unit; Obtain data processing results.

2. The method according to claim 1, characterized in that Before the target software unit corresponding to the target function is called and the input parameter is processed by the target large language model corresponding to the target function, the method further includes: The preset role allocation function is called to allocate the different semantic contents contained in the input parameters to different roles in the prompt words to be input into the target large language model.

3. The method according to claim 1, characterized in that: The input parameters are input by calling a simple interactive function, and do not include a data output format for limiting the large language model and / or do not include input and output examples. In this case, the input parameters are directly input into the target large language model, and the input and output examples include: sample prompt words input into the large language model and sample output results obtained after the large language model processes the sample prompt words.

4. The method according to any one of claims 1 to 3, characterized in that For each function, the software unit corresponding to the function includes a production result verification unit, and after the input parameter is processed by the target large language model corresponding to the target function, it also includes: Obtaining an output result after a target large language model corresponding to a target function processes the input parameters; Calling the production result verification unit corresponding to the target function to detect whether the output result conforms to the target format; If not, the input parameters are processed again using the target large language model corresponding to the target function, and the step of obtaining the output result after the input parameters are processed by the target large language model corresponding to the target function is returned to execute.

5. The method according to any one of claims 1 to 3, characterized in that: For each function, the software unit corresponding to the function includes a result post-processing unit, after the input parameter is processed by the target large language model corresponding to the target function, further including: Obtaining an output result after a target large language model corresponding to a target function processes the input parameters; Calling the target large language model generation result post-processing unit corresponding to the target function to analyze the output result and extract key content in the output result, wherein the key content is the content contained in the output result that best represents the meaning of the output result; If the extraction fails, the input parameters are processed again using the target large language model corresponding to the target function, and the step of obtaining the output result of the input parameters processed by the target large language model corresponding to the target function is returned to be executed.

6. A data processing device based on a large model, characterized in that: For each function, a software unit is configured to implement the function by calling a large language model, the software unit includes an original unit and an extension unit, some or all of the original units correspond to the extension units one by one, the original unit and the corresponding extension unit implement the same function, and the parameters passed in are different. In the process of implementing the target function, the device includes: Parameter acquisition module, used to obtain input parameters; A first data processing module is used to call the target software unit corresponding to the target function, and perform data processing on the input parameter through the target large language model corresponding to the target function, wherein, for the original unit in the target software unit, if the identifier of the target extension unit is not obtained, the original unit is called for data processing; if the identifier of the target extension unit is obtained, the target extension unit is called for data processing, and the target extension unit corresponds to the original unit; The result acquisition module is used to obtain the data processing results.

7. The device according to claim 6, characterized in that The device also includes: The classification module is used to call a preset role allocation function to allocate the different semantic contents contained in the input parameters to different roles in the prompt words to be input into the target large language model.

8. The device according to claim 6, characterized in that The input parameters are input by calling a simple interactive function, and do not include a data output format for limiting the large language model and / or do not include input and output examples. In this case, the input parameters are directly input into the target large language model, and the input and output examples include: sample prompt words input into the large language model and sample output results obtained after the large language model processes the sample prompt words.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 5 when executing a program stored in a memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Intelligent learning interaction method based on custom plug-in and large language model

    CN117251553A

  • Code auxiliary system, code auxiliary processing method and device and electronic equipment

    CN117311683A

  • Target application generation method and device based on large language model and storage medium

    CN117492743A

  • Reconfigurable architecture generation method and device, equipment, medium and product

    CN117608684A

  • Task processing method and device, equipment and storage medium

    CN118312529A