Data processing method and device based on large language model, equipment and storage medium
Through the data processing method based on the large language model, identifying user intentions and scheduling appropriate interfaces and parameters, the problems of low data processing flexibility and poor user experience in the prior art are solved, and more accurate and flexible task processing effects are achieved.
Patent Information
- Application Number
- CN202411152391.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-08-21
AI Technical Summary
The selection and use of tools in existing natural language processing systems rely on pre-set rules or manual configuration, resulting in inefficient and difficult to adapt to dynamic changes, lack of flexibility and user experience.
Using a data processing method based on a large language model, the user query data is obtained, the target intention is identified by semantic analysis, and the appropriate interfaces and parameters are analyzed and scheduled, the target parameters are dynamically obtained, the interface call conditions are met, and the processing is determined using the preset knowledge base. Method to improve task processing effect.
It achieves more accurate and flexible target intention recognition, improves the call accuracy and user experience of the target interface, adapts to user input, provides more comprehensive processing methods, and improves task processing effects.
Smart Images

Figure CN119128080A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data processing technology, and specifically relates to a data processing method, device, equipment and storage medium based on a large language model. Background Art
[0002] In current natural language processing systems, the selection and use of tools, process jumps and planning are usually completed by pre-set rules or manual configuration. This approach is not only inefficient, but also difficult to adapt to and meet dynamically changing needs. With the advancement of large language models (LLMs) in semantic understanding and reasoning capabilities, a higher degree of automation and intelligence can be achieved, and LLMs can autonomously plan and arrange multiple tools to handle complex tasks. The purpose of the present invention is to provide a data processing method based on a large language model, so that LLM can autonomously understand task requirements and flexibly select and schedule different tools according to the nature and objectives of the task to improve the effect of task processing. Summary of the Invention
[0003] In view of the shortcomings of the existing technology, the purpose of the present invention is to provide a data processing method, device, equipment and storage medium for a large language model to solve the problems of low data processing flexibility and poor user experience in the existing technology.
[0004] According to one aspect of the present application, a data processing method based on a large language model is disclosed, the method comprising:
[0005] Get the user's query data;
[0006] Performing semantic analysis on the query data based on a large language model to identify the user's target intent;
[0007] Analyze the target interface to be called according to the target intention;
[0008] According to the target interface, analyzing the target parameters required for calling the target interface, and sending a target parameter acquisition instruction to the user interaction module; wherein one target interface corresponds to at least one target parameter;
[0009] receiving the target parameter returned by the user interaction module based on the acquisition instruction, wherein the target parameter is acquired based on multiple rounds of dialogue between the user interaction module and the user;
[0010] Analyzing whether the target interface meets the calling condition according to the target interface and the target parameters;
[0011] When the target interface meets the calling condition, calling the target interface and receiving the calling result returned by the target interface;
[0012] Obtaining a preset knowledge base, and determining a method for processing the target intent based on the preset knowledge base and the call result;
[0013] The target intention, the call result and the processing method are sent to the user interaction module accordingly, so that the user interaction module displays them to the user.
[0014] In some embodiments, the user interaction module is provided with a user input receiving unit, the user input receiving unit is used to receive text data or voice data input by the user, and obtaining the user's query data includes:
[0015] Acquire the query data of the user sent by the user interaction module, wherein the query data is text data or voice data input by the user to the input receiving unit.
[0016] In some embodiments, performing semantic analysis on the query data based on a large language model to identify the user's target intent includes:
[0017] Acquire preprocessed query data after preprocessing, wherein the preprocessed query data is obtained by preprocessing the query data based on a preprocessing module, wherein the preprocessing includes word segmentation processing, noise removal processing, and normalization processing;
[0018] Based on a large language model, semantic analysis is performed on the pre-processed query data to obtain semantic features, and the semantic features are matched with preset rules to identify the user's target intention.
[0019] In some embodiments, analyzing the target interface to be called according to the target intent includes:
[0020] Get the mapping relationship table between intent and interface;
[0021] The target interface corresponding to the target intent is searched from the mapping relationship table.
[0022] In some embodiments, analyzing target parameters required for calling the target interface according to the target interface includes:
[0023] Get the corresponding relationship table between interfaces and parameters;
[0024] The target parameter corresponding to the target interface is searched from the correspondence table.
[0025] In some embodiments, when analyzing, based on the target interface and the target parameters, that the target interface does not meet the call condition, the method further includes:
[0026] When the target interface does not meet the calling condition, compare the currently existing target analysis parameters with the target interface to analyze the target missing parameters, wherein the target parameters include the target analysis parameters and the target missing parameters;
[0027] According to the target missing parameters, a target missing parameter acquisition instruction is sent to the user interaction module;
[0028] Receive the target missing parameter fed back by the user interaction module based on the missing parameter acquisition instruction.
[0029] In some embodiments, the preset knowledge base includes a plurality of pieces of knowledge information, and the method of obtaining the preset knowledge base and determining the target intent based on the preset knowledge base and the call result includes:
[0030] Parsing the call result to obtain a call parsing result having the target keyword;
[0031] Matching the target keyword with the plurality of pieces of knowledge information to obtain target knowledge information;
[0032] A method for processing the target intention is determined based on the target knowledge information.
[0033] According to another aspect of the present application, a data processing device based on a large language model is also disclosed, the device comprising:
[0034] Query data acquisition module, used to obtain user query data;
[0035] A target intent recognition module is used to perform semantic analysis on the query data based on a large language model to identify the user's target intent;
[0036] A target interface analysis module is used to analyze the target interface that needs to be called according to the target intention;
[0037] a target parameter acquisition instruction sending module, configured to analyze the target parameters required for calling the target interface according to the target interface, and send a target parameter acquisition instruction to the user interaction module; wherein one target interface corresponds to at least one target parameter;
[0038] a target parameter receiving module, configured to receive the target parameter returned by the user interaction module based on the acquisition instruction, wherein the target parameter is acquired based on multiple rounds of dialogue between the user interaction module and the user;
[0039] A calling condition analysis module, configured to analyze whether the target interface satisfies the calling condition based on the target interface and the target parameters;
[0040] A call result receiving module, configured to call the target interface and receive a call result returned by the target interface when the target interface meets the call condition;
[0041] A processing method determination module is used to obtain a preset knowledge base and determine a processing method for the target intention based on the preset knowledge base and the call result;
[0042] The answer sending module is used to send the target intention, the call result and the processing method to the user interaction module so that the user interaction module can display them to the user.
[0043] According to another aspect of the present application, an electronic device is also disclosed, comprising a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the electronic device executes the various steps of the data processing method based on the large language model as described above.
[0044] According to another aspect of the present application, a computer-readable storage medium is also disclosed, on which instructions are stored. The computer-readable storage medium is characterized in that when the instructions are executed by a processor, the various steps of the data processing method based on the large language model as described above are implemented.
[0045] The present invention includes but is not limited to the following beneficial effects: (1) The present application utilizes a large language model (LLM) to perform semantic analysis on user query data, which can more accurately identify the user's target intent, which is more accurate and flexible than traditional rule-based or simple machine learning model-based methods; (2) The target parameters in the present application are dynamically acquired after multiple rounds of dialogue between the user interaction module and the user. This method can flexibly adapt to the user's input and improve the comprehensiveness of the target parameter acquisition; thereby further improving the accuracy of the target interface call; (3) The present application is based on the knowledge base and matches the call results, which can more comprehensively determine the target intent processing method and improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for describing the embodiments or the prior art.
[0047] Figure 1 This is a flow chart of a data processing method based on a large language model according to an embodiment of the present application;
[0048] Figure 2 This is another flow chart of the data processing method based on the large language model according to an embodiment of the present application;
[0049] Figure 3This is a structural block diagram of a data processing device based on a large language model according to an embodiment of the present application;
[0050] Figure 4 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] An embodiment of the present invention provides a data processing method based on a large language model, including obtaining user query data; performing semantic analysis on the query data based on the large language model to identify the user's target intent; analyzing the target interface that needs to be called according to the target intent; analyzing the target parameters required for calling the target interface according to the target interface, and sending a target parameter acquisition instruction to the user interaction module; wherein, one target interface corresponds to at least one target parameter; receiving the target parameter returned by the user interaction module based on the acquisition instruction, wherein the target parameter is obtained based on multiple rounds of dialogue between the user interaction module and the user; analyzing whether the target interface meets the call condition based on the target interface and the target parameter; when the target interface meets the call condition, calling the target interface and receiving the call result returned by the target interface; obtaining a preset knowledge base, and determining a processing method for the target intent based on the preset knowledge base and the call result; and sending the target intent, the call result, and the processing method to the user interaction module accordingly, so that the user interaction module displays them to the user. This method uses a large language model (LLM) to perform semantic analysis on user query data, which can more accurately identify the user's target intention, which is more accurate and flexible than traditional rule-based or simple machine learning model-based methods; and the target parameters are dynamically acquired after multiple rounds of dialogue between the user interaction module and the user. This method can flexibly adapt to the user's input and improve the comprehensiveness of target parameter acquisition; thereby further improving the accuracy of calling the target interface; further, this method is based on matching the knowledge base with the call results, which can more comprehensively determine the processing method of the target intention and improve the user experience.
[0052] The terms "first," "second," "third," "fourth," and the like (if any) in the description and claims of the present invention and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or apparatus.
[0053] For ease of understanding, the specific process of the embodiment of the present invention is described below. Specifically, Figure 1 This is a flowchart of the data processing based on a large language model of the present application. Specifically, the method of the present application is applied to a data processing system environment based on a large language model. The system includes a user interaction module, a central control task distribution model, an interface tool library, a knowledge base, and an answer aggregation model. The user interaction module is used to interact with users in a conversational manner, obtain user questions, and present solutions to the users. The central control task distribution model is responsible for determining and planning the required tools, obtaining the required call parameters, and completing the interface calls based on the configured interface tool library / knowledge base and user questions. Based on the call results returned by each interface call, the central control task distribution model further determines whether the required knowledge in the knowledge base needs to be called. If not, the call results returned by the interface call are passed to the answer aggregation model. If so, after obtaining the required knowledge from the knowledge base, the processing method and interface call results are passed to the answer aggregation model. After obtaining the interface call results, the answer aggregation model summarizes and processes them into fluent human language and passes them to the user interaction module. After the user interaction module obtains the complete model results, it presents them to the user.
[0054] The following is combined with Figure 1 The method of this application is described in detail, and the steps include:
[0055] S100: Obtain user query data.
[0056] The present application includes a user interaction module, which can be used to interact with users. The user interaction module is provided with a user input receiving unit, which is used to receive text data or voice data input by the user. For example, the user can enter a text or voice query such as "Why did a settlement fail yesterday?" into the user interaction module, which then sends the query data to the central control module.
[0057] S102: Perform semantic analysis on the query data based on the large language model to identify the user's target intent.
[0058] Specifically, pre-processed query data that has undergone word segmentation, denoising, and normalization processing can be obtained first, and semantic analysis can be performed on the pre-processed query data to obtain semantic features. The semantic features are then matched with preset rules to identify the user's target intent. It is understandable that the preset rules can be set in advance. For example, after processing the query data "Why did a settlement fail yesterday?" mentioned above in step S102, it can be concluded that the user's target intent is "query on the reason for the settlement failure." It is understandable that using a large language model (LLM) to perform semantic analysis on user query data can more accurately identify the user's target intent, which is more accurate and flexible than traditional rule-based or simple machine learning model-based methods.
[0059] S104: Analyze the target interface to be called according to the target intent.
[0060] It is understandable that each target intent may need to call multiple target interfaces to complete. Specifically, you can first obtain a mapping relationship table between intents and interfaces, and then find the target interface corresponding to the target intent from the mapping relationship table. For example, in this embodiment, when the target intent is "query on the reason for settlement failure", the target interfaces that need to be called may include the three interfaces of "settlement details query interface", "user account status interface" and "service activation interface". It is understandable that this example is only an illustration of a preferred embodiment and does not specifically limit it. In the case of other target intents, the called interfaces may also include four target interfaces, five target interfaces or other numbers of target interfaces.
[0061] S106: Analyze target parameters required for calling the target interface according to the target interface, and send a target parameter acquisition instruction to the user interaction module.
[0062] Wherein, one target interface corresponds to at least one target parameter.
[0063] Specifically, a table of interface-parameter correspondences can be first obtained, and then the target parameters corresponding to the target interface can be searched from the correspondence table. After analyzing and determining the target parameters corresponding to the target interface, a target parameter acquisition instruction is sent to the user interaction module, so that the user interaction module and the user can engage in multiple rounds of dialogue to obtain the target parameters during these multiple rounds of dialogue. It is understood that the user interaction module can directly obtain the target parameters input by the user during the multiple rounds of dialogue, or it can piece together the target parameters based on the dialogue information of the multiple rounds of dialogue.
[0064] For example, in this example, the "settlement details query interface" can correspond to the three target parameters of "order number", "user number" and "transaction time"; the "user account status interface" can correspond to the target parameter of "user number"; and the "service activation interface" can correspond to the two target parameters of "user number" and "service name".
[0065] It is understandable that the target parameters are dynamically acquired through multiple rounds of dialogue between the user interaction module and the user. This approach can flexibly adapt to user input and improve the comprehensiveness of target parameter acquisition, thereby further improving the accuracy of calling the target interface.
[0066] S108: Receive target parameters returned by the user interaction module based on the acquisition instruction.
[0067] The target parameters are obtained based on multiple rounds of dialogue between the user interaction module and the user.
[0068] S110: Analyze whether the target interface meets the calling conditions based on the target interface and target parameters.
[0069] It is understood that when more than half of the target parameters corresponding to each target interface are obtained, the target interface can be considered to meet the call condition. It should be noted that this call condition can be pre-set and does not require that more than half of the target parameters corresponding to each target structure shown above are obtained; in other real-time solutions, it is also possible that all target parameters corresponding to each target interface are obtained. The specific call condition can be set according to actual needs and is not specifically limited here.
[0070] S112. When the target interface meets the calling condition, the target interface is called and a calling result returned by the target interface is received.
[0071] Specifically, based on the analysis of the call result returned by the target interface in the above embodiment, it can be seen that the "reason for settlement failure" is that the user account is locked.
[0072] S114: Obtain a preset knowledge base, and determine a processing method for the target intent based on the preset knowledge base and the call result.
[0073] Specifically, the call results can be parsed to obtain a call parsing result containing the target keyword; the target keyword can be further matched with multiple pieces of knowledge information to obtain the target knowledge information; and the processing method for the target intent can be determined based on the target knowledge information. It is understandable that based on the analysis of the above embodiment, the solution to the "user account is locked" problem is "Please contact customer service to unlock the account." It is understandable that in this example, matching the call results with the knowledge base can more comprehensively determine the processing method for the target intent, thereby improving the user experience.
[0074] S116: Send the target intention, the call result, and the processing method to the user interaction module accordingly, so that the user interaction module displays them to the user.
[0075] Further, Figure 2 Another flow chart of data processing based on a large language model of this application, see Figure 2 As shown, the following steps are included:
[0076] S200: Obtain user query data.
[0077] S202: Perform semantic analysis on the query data based on the large language model to identify the user's target intent.
[0078] S204: Analyze the target interface to be called according to the target intent.
[0079] S206: Analyze target parameters required for calling the target interface according to the target interface, and send a target parameter acquisition instruction to the user interaction module.
[0080] S208: Receive the target parameter returned by the user interaction module based on the acquisition instruction.
[0081] S210: Analyze whether the target interface meets the calling conditions according to the target interface and target parameters.
[0082] Specifically, the detailed description of the above steps S200 - S210 may refer to the detailed description of the above embodiment steps S100 - S110, and no specific limitation is made here.
[0083] S212: When the target interface does not meet the calling condition, compare the currently existing target analysis parameters with the target interface to analyze the target missing parameters.
[0084] Among them, the target parameters include target analysis parameters and target missing parameters.
[0085] It is understandable that in this example, the parameter acquisition instruction can be dynamically adjusted, and the required parameters can be flexibly acquired according to the user's answer, thereby improving the user experience and task processing efficiency.
[0086] It is understandable that during the multi-round dialogue between the user interaction module and the user, some target parameters may be fed back to the central control task distribution model. If some target parameters (target analysis parameters) are fed back to the central control task distribution model, the user interaction module still talks to the user every time, which may waste time. At this time, the target missing parameters can be analyzed, so that the user interaction module can conduct multiple rounds of dialogue with the user based on the target missing parameters, saving the final feedback time of the target parameters.
[0087] S214. Sending a target missing parameter acquisition instruction to the user interaction module according to the target missing parameter;
[0088] S216: Receive the target missing parameter from the user interaction module based on the missing parameter acquisition instruction feedback.
[0089] Furthermore, after all target missing parameters are fed back to the central task distribution model, step S218 is executed.
[0090] S218. Obtain a preset knowledge base, and determine a processing method for the target intent based on the preset knowledge base and the call result.
[0091] S220: Send the target intention, the call result, and the processing method to the user interaction module so that the user interaction module displays them to the user.
[0092] According to another aspect of the present application, Figure 3 As shown, a data processing device based on a large language model is also disclosed, the device comprising:
[0093] Query data acquisition module, used to obtain user query data;
[0094] The target intent recognition module is used to perform semantic analysis on query data based on a large language model to identify the user's target intent;
[0095] The target interface analysis module is used to analyze the target interface that needs to be called according to the target intention;
[0096] A target parameter acquisition instruction sending module is used to analyze the target parameters required to call the target interface according to the target interface, and send a target parameter acquisition instruction to the user interaction module; wherein, one target interface corresponds to at least one target parameter;
[0097] a target parameter receiving module, configured to receive the target parameter returned by the user interaction module based on the acquisition instruction, wherein the target parameter is acquired based on multiple rounds of dialogue between the user interaction module and the user;
[0098] The calling condition analysis module is used to analyze whether the target interface meets the calling conditions based on the target interface and target parameters;
[0099] The call result receiving module is used to call the target interface and receive the call result returned by the target interface when the target interface meets the call conditions;
[0100] A processing method determination module is used to obtain a preset knowledge base and determine a processing method for the target intent based on the preset knowledge base and the call result;
[0101] The answer sending module is used to send the target intention, call result and processing method to the user interaction module so that the user interaction module can display them to the user.
[0102] Furthermore, in one embodiment, the query data acquisition module is specifically used to obtain the user's query data sent by the user interaction module, wherein the user interaction module is provided with a user input receiving unit, and the query data is text data or voice data input by the user to the input receiving unit.
[0103] Furthermore, in one embodiment, the target intention recognition module includes:
[0104] A preprocessed query data acquisition unit, configured to acquire preprocessed query data, wherein the preprocessed query data is obtained by preprocessing the query data based on a preprocessing module, wherein the preprocessing includes word segmentation, denoising, and normalization.
[0105] The target intention recognition unit is used to perform semantic analysis on the pre-processed query data based on a large language model to obtain semantic features, and match the semantic features with preset rules to identify the user's target intention.
[0106] Furthermore, in one embodiment, the target interface analysis module includes:
[0107] A mapping relationship table acquisition unit, used to acquire a mapping relationship table between intent and interface;
[0108] A target interface search unit is used to search the target interface corresponding to the target intent from the mapping relationship table.
[0109] Furthermore, in one embodiment, the target interface analysis module includes:
[0110] A corresponding relationship table acquisition unit, used to obtain a corresponding relationship table between interfaces and parameters;
[0111] The target parameter search unit is configured to search the target parameter corresponding to the target interface from the corresponding relationship table.
[0112] Furthermore, the device further comprises:
[0113] A target missing parameter analysis module is used to compare the current target analysis parameters with the target interface when the target interface does not meet the call conditions, and analyze the target missing parameters, wherein the target parameters include the target analysis parameters and the target missing parameters;
[0114] a target missing parameter acquisition instruction acquisition module, configured to send a target missing parameter acquisition instruction to the user interaction module according to the target missing parameter;
[0115] The target missing parameter receiving module is configured to receive the target missing parameter fed back by the user interaction module based on the missing parameter acquisition instruction.
[0116] Furthermore, in one embodiment, the processing method determination module includes:
[0117] A parsing unit, configured to parse the call result to obtain a call parsing result having a target keyword;
[0118] a matching unit, configured to match the target keyword with the plurality of pieces of knowledge information to obtain target knowledge information;
[0119] A processing method determination unit is used to determine a processing method for the target intention based on the target knowledge information.
[0120] The application introduction of the relevant modules of the device in this example can refer to the relevant introduction of the above method principles, which will not be repeated here.
[0121] above Figure 3 The data processing device based on the large language model in the embodiment of the present invention is described in detail from the perspective of modular functional entities, and the electronic device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0122] Figure 4 : is a structural diagram of an electronic device provided by an embodiment of the present invention. The electronic device 400 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 410 (for example, one or more processors) and a memory 420, and one or more storage media 430 (for example, one or more mass storage devices) storing application programs 433 or data 432. Among them, the memory 420 and the storage medium 430 can be temporary storage or permanent storage. The program stored in the storage medium 430 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the electronic device 400. Furthermore, the processor 410 can be configured to communicate with the storage medium 430 to execute a series of instruction operations in the storage medium 430 on the electronic device 400.
[0123] The electronic device 400 may further include one or more power supplies 440, one or more wired or wireless network interfaces 450, one or more input / output interfaces 450, and / or one or more operating systems 431, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 4 The illustrated electronic device structure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0124] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the steps of a logistics mismatch order settlement method.
[0125] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0126] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0127] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data processing method based on a large language model, characterized in that: The method comprises: Get the user's query data; Performing semantic analysis on the query data based on a large language model to identify the user's target intent; According to the target intent, analyze the target interface that needs to be called; According to the target interface, analyzing the target parameters required for calling the target interface, and sending a target parameter acquisition instruction to the user interaction module; wherein one target interface corresponds to at least one target parameter; Receiving the target parameter returned by the user interaction module based on the acquisition instruction, wherein the target parameter is acquired based on multiple rounds of dialogues between the user interaction module and the user; Analyzing whether the target interface meets the calling condition according to the target interface and the target parameter; When the target interface meets the calling condition, calling the target interface and receiving the calling result returned by the target interface; Acquire a preset knowledge base, and determine a processing method for the target intent based on the preset knowledge base and the call result; The target intention, the calling result and the processing method are sent to the user interaction module accordingly, so that the user interaction module displays them to the user.
2. The data processing method based on a large language model according to claim 1, characterized in that: The user interaction module is provided with a user input receiving unit, and the user input receiving unit is used to receive text data or voice data input by the user. The obtaining of the user's query data includes: Acquire the query data of the user sent by the user interaction module, wherein the query data is text data or voice data input by the user to the input receiving unit.
3. The data processing method based on a large language model according to claim 2, characterized in that: The performing semantic analysis on the query data based on the large language model to identify the target intention of the user includes: Acquire preprocessed query data after preprocessing, wherein the preprocessed query data is obtained by preprocessing the query data based on a preprocessing module, and the preprocessing includes word segmentation processing, denoising processing and normalization processing; Based on the large language model, the pre-processed query data is semantically analyzed to obtain semantic features, and the semantic features are matched with preset rules to identify the target intention of the user.
4. The data processing method based on a large language model according to claim 1, characterized in that: The analyzing the target interface to be called according to the target intent includes: Get the mapping table between intent and interface; The target interface corresponding to the target intent is searched from the mapping relationship table.
5. The data processing method based on a large language model according to claim 1, characterized in that: The analyzing, according to the target interface, target parameters required for calling the target interface comprises: Get the corresponding relationship table between interface and parameters; The target parameter corresponding to the target interface is searched from the correspondence table.
6. The data processing method based on a large language model according to claim 5, characterized in that: When analyzing, according to the target interface and the target parameter, that the target interface does not meet the calling condition, the method further includes: When the target interface does not meet the calling condition, compare the currently existing target analysis parameters with the target interface to analyze the target missing parameters, wherein the target parameters include the target analysis parameters and the target missing parameters; According to the target missing parameters, sending a target missing parameter acquisition instruction to the user interaction module; The target missing parameter is received from the user interaction module based on the missing parameter acquisition instruction feedback.
7. The data processing method based on a large language model according to claim 1, characterized in that: The preset knowledge base includes a plurality of pieces of knowledge information, and the method of obtaining the preset knowledge base and determining the target intention based on the preset knowledge base and the calling result includes: Parsing the call result to obtain a call parsing result having a target keyword; Matching the target keyword with the plurality of pieces of knowledge information to obtain target knowledge information; According to the target knowledge information, a method for processing the target intention is determined.
8. A data processing device based on a large language model, characterized in that: The device comprises: A query data acquisition module is used to obtain the user's query data; A target intent recognition module, used to perform semantic analysis on the query data based on a large language model to recognize the user's target intent; A target interface analysis module, used to analyze the target interface to be called according to the target intent; A target parameter acquisition instruction sending module is used to analyze the target parameters required for calling the target interface according to the target interface, and send a target parameter acquisition instruction to the user interaction module; wherein one target interface corresponds to at least one target parameter; A target parameter receiving module, configured to receive the target parameter returned by the user interaction module based on the acquisition instruction, wherein the target parameter is acquired based on multiple rounds of dialogue between the user interaction module and the user; A calling condition analysis module, used for analyzing whether the target interface meets the calling condition according to the target interface and the target parameter; A call result receiving module, used for calling the target interface and receiving the call result returned by the target interface when the target interface meets the call condition; A processing method determination module, used to obtain a preset knowledge base, and determine a processing method for the target intent based on the preset knowledge base and the call result; The answer sending module is used to send the target intention, the calling result and the processing method to the user interaction module accordingly, so that the user interaction module can display them to the user.
9. An electronic device, characterized in that: The electronic device includes a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the electronic device executes the various steps of the data processing method based on a large language model as claimed in claims 1-7.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the steps of the data processing method based on a large language model as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Table query method, apparatus and system, electronic device and storage medium
CN117688129A
Methods and apparatus for natural language interface for constructing complex database queries
US20230315722A1
