A multi-round business data query method, device and medium
By comparing and updating the query intention and slot information, and using the preset joint pre-training model, the problem of computing resource consumption of the human-computer interaction dialogue model when processing historical information is solved, and the dialogue efficiency and data retrieval accuracy are improved.
Patent Information
- Application Number
- CN202410954374.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-07-17
AI Technical Summary
In the existing technology, the human-computer interaction dialogue model needs to consider a large amount of historical information when processing each dialogue, resulting in excessive computing resource consumption and memory usage, and reducing the efficiency of dialogue answering.
By comparing the latest query intent information with historical query intent information, the query slot information is updated to generate reference query information consistent with the user input format, and the preset joint pre-training model is used to output the intent and slot information to reduce repeated calculations and errors and improve query efficiency.
Quickly determine the similarity of user queries, generate more accurate and complete query information, ensure that the data required by users is accurately retrieved from the database, and improve query efficiency.
Smart Images

Figure CN118503395B
Abstract
Description
Technical Field
[0001] The present application relates to the field of data query technology, and in particular to a multi-round business data query method, device and medium. Background Art
[0002] Enterprise Resource Planning (ERP) can achieve optimal resource allocation and efficient management by integrating various resources within the enterprise. In this process, the introduction of artificial intelligence (AI) technology has greatly improved the intelligence level of the ERP system, especially in human-computer interaction. The application of AI enables users to communicate with the system through natural language, improving the convenience and efficiency of operation.
[0003] When users use natural language to interact with AI in the ERP system, they need to enter complete and tedious questions each time they ask questions, otherwise AI will not be able to correctly understand the user's intentions, reducing the completeness and accuracy of the answers. Most existing technologies currently use context modeling and prompt word splicing methods of general large models to achieve multi-round dialogue functions. Although the above two methods can achieve "continuous dialogue", they will inevitably cause the model to consider a large amount of historical information when processing each dialogue, resulting in excessive consumption of computing resources and memory usage, thereby reducing the efficiency of dialogue answers. Summary of the invention
[0004] The embodiments of the present application provide a multi-round business data query method, device and medium, which are used to solve the following technical problems: the dialogue model in the prior art considers a large amount of historical information when processing each dialogue, resulting in excessive consumption of computing resources and memory usage, and reducing the efficiency of dialogue answering.
[0005] The present application embodiment adopts the following technical solutions:
[0006] The embodiment of the present application provides a multi-round business data query method. It includes comparing the latest query intent information obtained with the historical query intent information; when the intent information is consistent, comparing the latest query slot information with the historical query slot information, and updating the latest query slot information based on the comparison result to generate reference query information; wherein the reference query information is consistent with the query information format input by the user; inputting the reference query information into a preset joint pre-trained model, and outputting the corresponding reference query intent information and reference query slot information through the preset joint pre-trained model; based on the reference query intent information and the reference query slot information, determining the required data in the database, and updating the required data The format is converted for display in the ERP system; wherein, the latest query slot information is compared with the historical query slot information, and the latest query slot information is updated based on the comparison result, specifically including: comparing the latest query slot information with the historical query slot information to determine the slot difference information; wherein the slot difference information at least includes the appearance of the same type of slot information, the appearance of newly added slot type information, and the appearance of missing slot type information; comparing the slot difference information with the preset slot information adjustment rules to determine the corresponding slot information adjustment plan, and updating the latest query slot information based on the corresponding slot information adjustment plan.
[0007] The embodiment of the present application compares the latest query intent information with the historical query intent information to quickly determine whether the user's current query is similar to the previous query, thereby reducing the amount of calculation required to re-parse the user's intent. Secondly, the embodiment of the present application generates reference query information that is consistent with the user input query format but more accurate or complete by updating the slot information, so as to reduce errors in subsequent data processing. By inputting the reference query information into the preset joint pre-training model, it is possible to accurately identify the intent and slot information in the query, improve the intent and slot information, thereby ensuring that the data required by the user is accurately retrieved from the database, and improving query efficiency.
[0008] In one implementation of the present application, the latest queried slot information is updated based on the corresponding slot information adjustment plan, specifically including: when the latest queried slot information only contains slot information of the same type, the latest queried slot information is retained and the historical slot information is deleted; when the latest queried slot information retains all historical slot information and new slot type information appears, the latest queried slot information is retained and the historical slot information is deleted; when the latest queried slot information contains missing slot type information, a slot information confirmation reminder is generated to process the slot information based on user options.
[0009] In one implementation of the present application, slot information processing is performed based on user options, specifically including: when the user option is to add new slot type information, the latest queried slot information and historical slot information of different types are retained, and the historical slot information of the same type is deleted; when the user option is to reset the slot information, the latest queried slot information is retained, and the historical slot information is deleted.
[0010] In one implementation of the present application, after outputting the corresponding reference query intention information and reference query slot information through the preset joint pre-trained model, the method also includes: generating initial data in JSON format based on the reference query intention information and the reference query slot information; inputting the initial data in JSON format into a preset data format post-processing module to perform format normalization on the initial data in JSON format; wherein the preset data format post-processing module is embedded in the preset joint pre-trained model.
[0011] In one implementation of the present application, reference query information is input into a preset joint pre-trained model, and corresponding reference query intent information and reference query slot information are output through the preset joint pre-trained model, specifically including: inputting the reference query information into the preset joint pre-trained model, and performing text classification and sequence labeling on the reference query information through the preset joint pre-trained model; based on text classification, determining the query intent information in the reference query information, and adjusting the content of the query intent information, and outputting the reference query intent information; based on sequence labeling, determining the query slot information in the reference query information, and adjusting the content of the query slot information, and outputting the reference query slot information; wherein the content adjustment includes at least one of content addition, duplicate content deletion, and erroneous content deletion.
[0012] In one implementation of the present application, after outputting corresponding reference query intent information and reference query slot information through a preset joint pre-trained model, the method also includes: obtaining feedback information of a user feedback area, and associating the feedback information with a corresponding data query task; determining the query intent and query slot corresponding to the associated data query task, and assigning a first coefficient to the query intent and the query slot based on the number of query intents and the number of query slots; and analyzing the feedback information to determine a sentiment score corresponding to the feedback information, and assigning a second coefficient to the query intent and the query slot based on the sentiment score; based on the first coefficient and the second coefficient, determining the order to be adjusted corresponding to the query intent and the query slot, respectively, so as to fine-tune the preset joint pre-trained model based on the order to be adjusted.
[0013] In one implementation of the present application, required data is formatted for display in an ERP system, specifically including: classifying the required data according to data content; wherein the required data is in JSON format; mapping the classified category information with a preset data format table, determining reference formats corresponding to different category information, and formatting the JSON format data based on the reference format; inputting the format-converted data into the ERP system; and responding to data demand instructions, returning the format-converted data to a user interface in a specified format in the ERP system; wherein the specified format includes at least one of text, table, and block diagram.
[0014] An embodiment of the present application provides a multi-round business data query device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can: compare the latest query intent information obtained with the historical query intent information; when the intent information is consistent, compare the latest query slot information with the historical query slot information, and update the latest query slot information based on the comparison result to generate reference query information; wherein the reference query information is consistent with the query information format input by the user; input the reference query information into a preset joint pre-trained model, and output the corresponding reference query intent information and reference query slot information through the preset joint pre-trained model; based on the reference query intent information and the reference query slot information, determine the required data in the database, and convert the required data into a format for display in the ERP system.
[0015] A non-volatile computer storage medium provided in an embodiment of the present application stores computer executable instructions, wherein the computer executable instructions are configured to: compare the latest query intent information obtained with the historical query intent information; when the intent information is consistent, compare the latest query slot information with the historical query slot information, and update the latest query slot information based on the comparison result to generate reference query information; wherein the reference query information is consistent in format with the query information input by the user; input the reference query information into a preset joint pre-trained model, and output corresponding reference query intent information and reference query slot information through the preset joint pre-trained model; based on the reference query intent information and the reference query slot information, determine the required data in the database, and convert the required data into a format for display in the ERP system.
[0016] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects: By comparing the latest query intent information with the historical query intent information, the embodiments of the present application can quickly determine whether the user's current query is similar to the previous query, thereby reducing the amount of calculation required to re-parse the user's intent. Secondly, the embodiments of the present application generate reference query information that is consistent with the user input query format but more accurate or complete by updating the slot information, so as to reduce errors in subsequent data processing. By inputting the reference query information into the preset joint pre-training model, the intent and slot information in the query can be accurately identified, and the intent and slot information can be improved, thereby ensuring that the data required by the user is accurately retrieved from the database, thereby improving query efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. In the drawings:
[0018] Figure 1 A flow chart of a multi-round business data query method provided in an embodiment of the present application;
[0019] Figure 2 A schematic diagram of a business query data preprocessing module flow provided in an embodiment of the present application;
[0020] Figure 3 A schematic diagram of a data query module flow of a joint pre-training model provided in an embodiment of the present application;
[0021] Figure 4 A schematic diagram of the structure of a multi-round business data query device provided in an embodiment of the present application.
[0022] Reference numerals:
[0023] 200: multi-round business data query device, 201: processor, 202: memory. DETAILED DESCRIPTION
[0024] Embodiments of the present application provide a multi-round business data query method, device, and medium.
[0025] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0026] The technical solution proposed in the embodiment of the present invention is described in detail below with reference to the accompanying drawings.
[0027] Figure 1 A flow chart of a multi-round business data query method provided in an embodiment of the present application, such as Figure 1 As shown, the multi-round business data query method includes the following steps:
[0028] Step 101: Compare the latest query intent information obtained with the historical query intent information.
[0029] In one embodiment of the present application, a prompt word project is constructed based on a selected large model, such as a natural language processing model, a computer vision model, and a speech recognition model. The project can complete the following four tasks:
[0030] (1) Record the historical query information and the latest query information entered by the user;
[0031] (2) Understanding the user’s query intent, that is, determining whether to start a new conversation or continue searching based on the existing query history;
[0032] (3) Combine historical conversation information to achieve question completion, that is, to complete the user's query sentence and generate and organize it into accurate and complete conversation information;
[0033] (4) Only the text processing function of the large model is retained, limiting its ability to extend the generated content.
[0034] Specifically, the number of memory rounds for historical query information is first set. That is, after the maximum number of memory rounds is reached, the first piece of information in the historical record is automatically deleted or all historical records are cleared the next time the user queries. The above function is added to the user interface, and the user can customize the number of memory rounds required.
[0035] Furthermore, organize the historical query information and the latest query information. Preset the query intent and query slot list according to the type of business data you want to query. For example, build a query intent list: invoice, asset, order, archive, inventory, etc.; query slot list: time, organization, number, quantity, amount, name, type, status, etc.
[0036] Furthermore, the intentions of the historical query information and the latest query information are compared. If they are the same, it is considered that the user intends to continue to make further inquiries based on the existing information, and the conversation history needs to be remembered; if they are different, it is considered that the user intends to query other information and start a new round of conversation.
[0037] Step 102: When the intent information is consistent, the latest query slot information is compared with the historical query slot information, and the latest query slot information is updated based on the comparison result to generate reference query information.
[0038] In one embodiment of the present application, the latest query slot information is compared with the historical query slot information to determine slot difference information; wherein the slot difference information at least includes the presence of the same type of slot information, the presence of newly added slot type information, and the presence of missing slot type information. The slot difference information is compared with the preset slot information adjustment rules to determine the corresponding slot information adjustment plan, and the latest query slot information is updated based on the corresponding slot information adjustment plan. wherein the generated reference query information is consistent with the query information format input by the user.
[0039] Specifically, it is necessary to first parse the user's latest query and extract the slot information from it, access and obtain the slot information of the user's previous query, and compare the slot information in the latest query with the slot information in the historical query to determine the difference. According to the comparison results and preset rules, a slot information adjustment plan is determined to update the latest query slot information based on the corresponding slot information adjustment plan.
[0040] In one embodiment of the present application, when the latest queried slot information only contains slot information of the same type, the latest queried slot information is retained and the historical slot information is deleted. When the latest queried slot information retains all historical slot type information and newly added slot type information appears, the latest queried slot information is retained and the historical slot information is deleted. When the latest queried slot information contains missing slot type information, a slot information confirmation reminder is generated to process the slot information based on user options.
[0041] Specifically, the slots of the historical query information and the latest query information are compared. If a certain type of slot information appears in both types of information, it is considered that the user still wants to query the same type of information, but has only changed the query conditions. Therefore, the slot information of this category in the latest query information is retained, and the historical slot information is deleted. If the latest query information retains all historical slot type information and adds new slot type information, it is considered that the user has added new query conditions. Therefore, the latest query slot information is retained and the historical slot information is deleted. If the latest query information lacks some slot type information, the user is asked questions to determine the user's intention.
[0042] In one embodiment of the present application, when the user option is to add slot type information, the latest query slot information and different types of historical slot information are retained, and the same type of historical slot information is deleted. When the user option is to reset the slot information, the latest query slot information is retained, and the historical slot information is deleted.
[0043] Specifically, determine whether the user intends to add a new query condition or reset the query condition. After the user makes a selection, the model retains or deletes the slot information of the historical query information. If the user chooses to add slot type information, the latest query slot information and historical slot information of different types will be retained, and the historical slot information of the same type will be deleted. If the user chooses to reset the slot information, the latest query slot information will be retained, and the historical slot information will be deleted.
[0044] For example, taking "only the same type of slot information appears" as the scope, assuming that the historical query initiated by the user is: "Please query the product outsourcing orders in the fourth quarter of 2023", and re-initiate the latest query as: "Please query the centralized sales orders in the first quarter of 2024". The latest slot type and the historical slot type are both "time" and "type". Therefore, the operation that needs to be taken is to keep the latest slot information and delete the historical slot information. Example:
[0045] Historical slot information: Time: Q4 2023;
[0046] Type: Product outsourcing order;
[0047] Latest slot information:
[0048] Time: The first quarter of 2024;
[0049] Type: Centralized Sales Order;
[0050] The latest slot information is retained and the historical slot information is deleted. The result is:
[0051] Time: The first quarter of 2024;
[0052] Type: Centralized Sales Order.
[0053] With "Retain all historical slot type information, and new slot type information appears" as the scope, assume that the historical query initiated by the user is: "Please query the product outsourcing orders in the fourth quarter of 2023", and re-initiate the latest query: "Please query the centralized sales orders completed in the first quarter of 2024". The historical slot types are "time" and "type", and the latest slot types are "time", "type", and "status". Therefore, the operation that needs to be taken is to retain the latest slot information and delete the historical slot information.
[0054] For example:
[0055] Historical slot information: Time: Q4 2023;
[0056] Type: Product outsourcing order;
[0057] Latest slot information:
[0058] Time: The first quarter of 2024;
[0059] Type: Centralized Sales Order;
[0060] Status: Completed;
[0061] The latest slot information is retained and the historical slot information is deleted. The result is:
[0062] Time: The first quarter of 2024;
[0063] Type: Centralized Sales Order;
[0064] Status: Completed.
[0065] If "slot type information is missing" is taken as the scope, three situations will occur: some historical slot types are missing and new slot types are added, all historical slot types are missing and new slot types are added, and some historical slot types are missing.
[0066] In the first case, assume that the historical query initiated by the user is: "Please query the product outsourcing orders in the fourth quarter of 2023", and re-initiate the latest query: "Please query the completed centralized sales orders". The historical slot types are "time" and "type", and the latest slot types are "type" and "status". Therefore, the action that needs to be taken is to determine the user's intention. If it is a new query condition, the latest slot information is retained, the historical slot information of different types is retained, and the historical slot information of the same type is deleted; if the query condition is reset, the latest slot information is retained and the historical slot information is deleted.
[0067] For example: Historical slot information: Time: Q4 2023;
[0068] Type: Product outsourcing order;
[0069] Latest slot information:
[0070] Type: Centralized sales order;
[0071] Status: Completed.
[0072] If a new query condition is added, the latest slot information is retained, the historical slot information of different types is retained, and the historical slot information of the same type is deleted. The result is:
[0073] Time: The fourth quarter of 2023;
[0074] Type: Centralized Sales Order;
[0075] Status: Completed;
[0076] If the query condition is reset, the latest slot information is retained and the historical slot information is deleted. The result is:
[0077] Type: Centralized Sales Order;
[0078] Status: Completed.
[0079] In the second case, suppose the user has initiated a historical query of "Please query product outsourcing orders in the fourth quarter of 2023", and re-initiated a latest query of "Please query completed orders". The historical slot types are "time" and "type", and the latest slot type is "status". Therefore, the action required is to determine the user's intention. If a new query condition is added, the latest slot information is retained, the historical slot information of different types is retained, and the historical slot information of the same type is deleted (the type does not exist in this case, but it does not affect the algorithm logic); if the query condition is reset, the latest slot information is retained and the historical slot information is deleted.
[0080] For example:
[0081] Historical slot information: Time: Q4 2023;
[0082] Type: Product outsourcing order;
[0083] Latest slot information:
[0084] Status: Completed.
[0085] If a new query condition is added, the latest slot information is retained, the historical slot information of different types is retained, and the historical slot information of the same type is deleted. The result is:
[0086] Time: The fourth quarter of 2023;
[0087] Type: Product outsourcing order;
[0088] Status: Completed;
[0089] If the query condition is reset, the latest slot information is retained and the historical slot information is deleted. The result is:
[0090] Status: Completed.
[0091] In the third case, suppose the user has initiated a historical query of "Please query product outsourcing orders in the fourth quarter of 2023", and re-initiated a latest query of "Please query centralized sales orders". The historical slot types are "time" and "type", and the latest slot type is "type". Therefore, the action required is to determine the user's intention. If the query condition is added, the latest slot information is retained, the historical slot information of different types is retained, and the historical slot information of the same type is deleted; if the query condition is reset, the latest slot information is retained and the historical slot information is deleted.
[0092] For example:
[0093] Historical information: Time: fourth quarter of 2023;
[0094] Type: Product outsourcing order;
[0095] Latest information:
[0096] Type: Centralized Sales Order.
[0097] If a new query condition is added, the latest slot information is retained, the historical slot information of different types is retained, and the historical slot information of the same type is deleted. The result is:
[0098] Time: The fourth quarter of 2023;
[0099] Type: Centralized Sales Order;
[0100] If the query condition is reset, the latest slot information is retained and the historical slot information is deleted. The result is:
[0101] Type: Centralized Sales Order.
[0102] Step 103: input the reference query information into a preset joint pre-trained model, and output corresponding reference query intent information and reference query slot information through the preset joint pre-trained model.
[0103] In one embodiment of the present application, a query data set is constructed based on a preset data form; wherein the query data set includes query sentences of the same format, and intent information and slot information corresponding to the query sentences of the same format. The query data set is divided into a training set, a test set, and a validation set according to a preset ratio. The preset model is trained with the divided query data set to obtain a preset joint pre-training model.
[0104] Specifically, according to the business data to be queried, a query data set is constructed in the form of "question-intention-slot", where the question form is the format of the user input data query, and the data set is divided into training set, test set and validation set in a ratio of 8:1:1. The pre-trained model is fine-tuned using the data set, the model parameters are adjusted, and a joint pre-trained model covering the business data query content is established.
[0105] In one embodiment of the present application, the reference query information is input into a preset joint pre-trained model, and the reference query information is subjected to text classification and sequence labeling by the preset joint pre-trained model. Based on the text classification, the query intent information in the reference query information is determined, and the content of the query intent information is adjusted, and the reference query intent information is output. Based on the sequence labeling, the query slot information in the reference query information is determined, and the content of the query slot information is adjusted, and the reference query slot information is output. Among them, the content adjustment includes at least one of content addition, duplicate content deletion, and erroneous content deletion.
[0106] Specifically, text classification is the process of automatically classifying text data according to predefined categories. In query processing, text classification is performed through a preset joint pre-trained model to determine the intent of the query, that is, what the user wants to achieve through the query. For example, the user may want to check the order status, check the product inventory, or search for promotional information for a specific product. After determining the query intent information, content adjustment is performed to ensure the accuracy and completeness of the intent. If the model recognizes that the intent is incomplete or ambiguous, additional information needs to be added to clarify the intent. If the query contains repeated intent expressions, the redundant parts need to be deleted to avoid confusion. If the query contains irrelevant or erroneous information, it needs to be deleted.
[0107] Furthermore, sequence labeling is a task that classifies each element in a text sequence. In query processing, sequence labeling is used to identify the slot information in the query, that is, the specific data items that need to be filled, such as date, product name, quantity, etc. The query slot information also needs to be adjusted to ensure its accuracy and completeness. If the necessary slot information is missing in the query, the corresponding content needs to be added. If the query contains duplicate slot information, the redundant part needs to be deleted. If there is an error or irrelevant content in the slot information, it needs to be deleted.
[0108] In one embodiment of the present application, feedback information of a user feedback area is obtained, and the feedback information is associated with a corresponding data query task. The query intent and query slot corresponding to the associated data query task are determined, and based on the number of query intents and the number of query slots, first coefficients are assigned to the query intents and query slots, respectively. Also, the feedback information is analyzed to determine the sentiment score corresponding to the feedback information, and second coefficients are assigned to the query intents and query slots, respectively, based on the sentiment score. Based on the first coefficient and the second coefficient, the order to be adjusted corresponding to the query intents and query slots is determined, so as to fine-tune the preset joint pre-trained model based on the order to be adjusted.
[0109] Specifically, user feedback information is collected from specific areas of the user interface, such as the feedback box and the rating column, and the user feedback information is matched with the specific data query task that triggers the feedback, and the query intent and query slot corresponding to the data query task are determined. A basic coefficient allocation rule is set, for example, the more query intents there are, the lower the coefficient of each intent; the more slots there are, the lower the coefficient of each slot. According to the intent of the query task and the number of slots, the first coefficient is allocated to each intent and slot according to the rule.
[0110] Furthermore, sentiment analysis algorithms (such as models based on machine learning or deep learning) are used to sentimentally classify user feedback. Based on the classification results, a sentiment score is assigned to each feedback, for example, a positive sentiment score is a positive number, a negative sentiment score is a negative number, and a neutral sentiment score is 0. If the user feedback is positive, the coefficients of the query intent and slots related to the feedback are increased, and if the user feedback is negative, the coefficients of the query intent and slots related to the feedback are decreased. Taking the first coefficient and the second coefficient into consideration, a comprehensive score is calculated for each query intent and slot, and the query intent and slots are sorted according to the comprehensive score to determine the order to be adjusted. The intents and slots with lower scores should be adjusted first.
[0111] Furthermore, query data related to the intents and slots to be adjusted are collected, and a fine-tuning dataset is constructed. According to the fine-tuning dataset, the preset joint pre-training model is fine-tuned to optimize the performance of the model in identifying these intents and slots.
[0112] Step 104: Based on the reference query intention information and the reference query slot information, the required data is determined in the database, and the required data is formatted for display in the ERP system.
[0113] In one embodiment of the present application, initial data in JSON format is generated based on reference query intent information and reference query slot information. The initial data in JSON format is input into a preset data format post-processing module to perform format normalization processing on the initial data in JSON format; wherein the preset data format post-processing module is embedded in a preset joint pre-training model.
[0114] Specifically, the natural language input by the user is passed to the preset joint pre-training model to identify the user's latest query intention and slot information, and generate initial data in JSON format. The initial data in JSON format is difficult to meet the data format requirements required by the ERP system. Therefore, the embodiment of the present application is provided with a preset data format post-processing module, which is embedded in the preset joint pre-training model to perform format normalization processing on the initial data in JSON format so that it meets the data format requirements required by the ERP system.
[0115] In one embodiment of the present application, the required data is classified and processed according to the data content; wherein the required data is JSON format data. The classified category information is mapped with the preset data format table, and the reference formats corresponding to the different category information are determined, so as to perform format conversion on the JSON format data based on the reference format. The format-converted data is input into the ERP system. In response to the data demand instruction, the format-converted data is returned to the user interface in the ERP system in a specified form; wherein the specified form includes at least one of a text form, a table form, and a block diagram form.
[0116] Specifically, the user's latest query intention and slot information are identified by presetting the joint pre-training model, and the initial data in JSON format is generated. Since the model only completes the text classification and sequence labeling tasks and cannot generate the data format required by the ERP system, a data format post-processing module is embedded in the model to normalize the format of a certain category of information. For example: time information is uniformly set to the ISO 8601 standard time format, and amount information is uniformly set to the standard writing of Arabic numerals, and in yuan, etc. The initial JSON data is input into the post-processing module to obtain standardized JSON data.
[0117] Furthermore, the standardized JSON data is input into the ERP system, and according to user or system requirements, the queried business data information is returned to the user interface in the form of text, table or block diagram to complete the entire query process.
[0118] Figure 2 A flow chart of a business query data preprocessing module provided in an embodiment of the present application is as follows: Figure 2As shown in the figure, first select a large model that is good at text recognition and processing, build a prompt word project, and flexibly select the number of rounds of historical memory required according to user needs, and record the historical query information entered by the user (because data query is performed in ERP and does not occupy the performance of the large model, there is no need to record the model output history). Then compare the historical query information with the latest query information, extract key intent and slot information, judge user needs, and if the latest user intent is different from the intent of the historical information, start a new dialogue. If the intentions are the same, the conversation continues. If the latest query slot information only contains the same type of slot information, the latest query slot information is retained and the historical slot information is deleted. If the latest query slot information contains all the same type of historical slot information and new slot type information is added, the latest query slot information is retained and the historical slot information is deleted. If the latest query slot information contains missing slot type information, if the user option is to add new slot type information, the latest query slot information is retained, and different types of historical slot information are retained, and the same type of historical slot information is deleted. If the user option is to reset the slot information, the latest query slot information is retained and the historical slot information is deleted. The query slot information is updated to generate the latest query information that meets the user's intention.
[0119] Figure 3 A data query module flow diagram of a joint pre-training model provided in an embodiment of the present application, such as Figure 3 As shown, a business query data set fine-tuning pre-training model is constructed to generate a joint pre-training model. The latest query information that meets the user's intention is input into the joint pre-training model to identify the user's intention and slot information. Based on the user's intention and slot information, the required data query is performed in the database to generate initial data in JSON format. The initial JSON data is input into the post-processing module to obtain standardized JSON data. Finally, the standardized JSON data is input into the ERP system, and according to the user or system requirements, the queried business data information is returned to the user interface in the form of text, table or block diagram to complete the entire query process.
[0120] Figure 4 A schematic diagram of the structure of a multi-round business data query device provided in an embodiment of the present application. Figure 4As shown, a multi-round business data query device 200 includes: at least one processor 201; and a memory 202 communicatively connected to the at least one processor 201; wherein the memory 202 stores instructions that can be executed by the at least one processor 201, and the instructions are executed by the at least one processor 201 so that the at least one processor 201 can: compare the latest query intention information obtained with the historical query intention information; when the intention information is consistent, compare the latest query slot information with the historical query slot information, and update the latest query slot information based on the comparison result to generate reference query information; wherein the reference query information is consistent with the query information format input by the user; input the reference query information into a preset joint pre-trained model, and output the corresponding reference query intention information and reference query slot information through the preset joint pre-trained model; based on the reference query intention information and the reference query slot information, determine the required data in the database, and convert the required data into a format for display in the ERP system.
[0121] The embodiment of the present application also provides a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to: compare the latest query intent information obtained with the historical query intent information; when the intent information is consistent, compare the latest query slot information with the historical query slot information, and update the latest query slot information based on the comparison result to generate reference query information; wherein the reference query information is consistent in format with the query information input by the user; input the reference query information into a preset joint pre-trained model, and output corresponding reference query intent information and reference query slot information through the preset joint pre-trained model; based on the reference query intent information and the reference query slot information, determine the required data in the database, and convert the required data into a format for display in the ERP system.
[0122] Each embodiment in this application is described in a progressive 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, equipment, and non-volatile computer storage medium 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 embodiment.
[0123] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the embodiments of the present application may have various changes and variations. 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 various embodiments of the present application.
Claims
1. A multi-round business data query method, characterized in that: The method comprises: Compare the latest query intent information obtained with the historical query intent information; In the case where the intent information is consistent, the latest query slot information is compared with the historical query slot information, and the latest query slot information is updated based on the comparison result to generate reference query information; wherein the reference query information is consistent with the query information format input by the user; Inputting the reference query information into a preset joint pre-training model, and outputting corresponding reference query intent information and reference query slot information through the preset joint pre-training model; Based on the reference query intention information and the reference query slot information, determining the required data in the database, and converting the required data into a format for display in the ERP system; The comparing the latest query slot information with the historical query slot information and updating the latest query slot information based on the comparison result specifically includes: Compare the latest queried slot information with the historical queried slot information to determine slot difference information; wherein the slot difference information at least includes the presence of the same type of slot information, the presence of newly added slot type information, and the presence of missing slot type information; Comparing the slot difference information with a preset slot information adjustment rule to determine a corresponding slot information adjustment scheme, and updating the latest queried slot information based on the corresponding slot information adjustment scheme; The updating of the latest queried slot information based on the corresponding slot information adjustment scheme specifically includes: When only the same type of slot information appears in the latest queried slot information, the latest queried slot information is retained and the historical slot information is deleted; When the latest queried slot information retains all historical slot type information and new slot type information appears, the latest queried slot information is retained and the historical slot information is deleted; In the case where the slot type information is missing in the latest queried slot information, a slot information confirmation reminder is generated to process the slot information based on user options; The processing of slot information based on user options specifically includes: In the case where the user option is to add slot type information, the latest queried slot information and historical slot information of different types are retained, and historical slot information of the same type is deleted; When the user option is to reset the slot information, the latest queried slot information is retained and the historical slot information is deleted.
2. A multi-round business data query method according to claim 1, characterized in that: After outputting the corresponding reference query intention information and reference query slot information through the preset joint pre-training model, the method further includes: Based on the reference query intent information and the reference query slot information, generate initial data in JSON format; The initial data in JSON format is input into a preset data format post-processing module to perform format normalization processing on the initial data in JSON format; wherein the preset data format post-processing module is embedded in the preset joint pre-training model.
3. A multi-round business data query method according to claim 1, characterized in that: The step of inputting the reference query information into a preset joint pre-training model, and outputting corresponding reference query intent information and reference query slot information through the preset joint pre-training model specifically includes: Inputting the reference query information into the preset joint pre-training model, and performing text classification and sequence labeling on the reference query information through the preset joint pre-training model; Based on the text classification, determining the query intent information in the reference query information, adjusting the content of the query intent information, and outputting the reference query intent information; Based on the sequence annotation, determining query slot information in the reference query information, adjusting content of the query slot information, and outputting the reference query slot information; The content adjustment includes at least one of content addition, duplicate content deletion and erroneous content deletion.
4. A multi-round business data query method according to claim 1, characterized in that: After outputting the corresponding reference query intention information and reference query slot information through the preset joint pre-training model, the method further includes: Obtaining feedback information from a user feedback area, and associating the feedback information with a corresponding data query task; Determine the query intentions and query slots corresponding to the associated data query task, and based on the number of query intentions and the number of query slots, respectively allocate first coefficients to the query intentions and the query slots; And, analyzing the feedback information to determine a sentiment score corresponding to the feedback information, and performing second coefficient allocation on the query intent and the query slot respectively based on the sentiment score; Based on the first coefficient and the second coefficient, the order to be adjusted corresponding to the query intent and the query slot is determined, so as to fine-tune the preset joint pre-training model based on the order to be adjusted.
5. A multi-round business data query method according to claim 1, characterized in that: The format conversion of the required data for display in the ERP system specifically includes: Classify and process the required data according to the data content; wherein the required data is in JSON format; Mapping the classified category information with a preset data format table, determining reference formats corresponding to different category information, and performing format conversion on the JSON format data based on the reference formats; Inputting the format-converted data into the ERP system; In response to the data demand instruction, the format-converted data is returned to the user interface in the ERP system in a specified form; wherein the specified form includes at least one of a text form, a table form, and a block diagram form.
6. A multi-round business data query device, characterized in that: The device comprises a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the device is triggered to execute the method according to any one of claims 1 to 5.
7. A non-volatile computer storage medium storing computer executable instructions, characterized in that: The computer executable instructions can execute the method according to any one of claims 1 to 5.
