[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN118467570A - Data post-processing method, system and equipment for service data query - Google Patents

Data post-processing method, system and equipment for service data query Download PDF

Info

Publication number
CN118467570A
CN118467570A CN202410917140.9A CN202410917140A CN118467570A CN 118467570 A CN118467570 A CN 118467570A CN 202410917140 A CN202410917140 A CN 202410917140A CN 118467570 A CN118467570 A CN 118467570A
Authority
CN
China
Prior art keywords
query
slot
intention
service
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410917140.9A
Other languages
Chinese (zh)
Other versions
CN118467570B (en
Inventor
王朝阳
徐同明
李伟龙
李伯钊
勇喜
鹿海洋
申朝然
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur General Software Co Ltd
Original Assignee
Inspur General Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur General Software Co Ltd filed Critical Inspur General Software Co Ltd
Priority to CN202410917140.9A priority Critical patent/CN118467570B/en
Publication of CN118467570A publication Critical patent/CN118467570A/en
Application granted granted Critical
Publication of CN118467570B publication Critical patent/CN118467570B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/243Natural language query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data post-processing method, a system and equipment for service data query, and belongs to the technical field of electric digital data processing. The method is based on service query information from an upstream language model, and corresponding service query intention and query slot positions are determined; and matching the business query intention with a preset query intention set to determine a corresponding query intention category according to a matching result. Determining a slot category corresponding to the query slot according to the query intention category and preset slot filtering conditions; when the type of the slot positions meets the format conversion conditions, carrying out format conversion on the query slot positions to obtain standard query slot positions after format conversion; based on the standard query slot position and the service query intention, post-processing information corresponding to the service query information is generated and used as input information of the downstream task, so that the corresponding downstream task is executed according to the input information. Therefore, efficient and accurate data query is performed without being influenced by user input data, and user experience is improved.

Description

Data post-processing method, system and equipment for service data query
Technical Field
The present application relates to the field of electronic digital data processing technologies, and in particular, to a data post-processing method, system, and device for service data query.
Background
The development of AI (ARTIFICIAL INTELLIGENCE ) technology has greatly advanced the level of industry intelligence and digitization. Through constructing AI assistant, introduce AI technique in ERP (ENTERPRISE RESOURCE PLANNING ), can help the enterprise to realize automatic office in fields such as decision-making, finance, business better, optimize the flow simultaneously, raise the efficiency to reinforcing the core competitiveness and the market adaptability of enterprise, realize the intelligent upgrading of industry.
With the increase of the use frequency and application range of AI assistants in ERP systems, the inventor finds that the use of AI assistants often requires users to follow a certain use rule to provide efficient data search services for users. If the natural language input by the user cannot be accurately and timely adapted to the specified use rule, redundant operation may be brought to the user, so that data searching is more complicated, and user friendliness is poor.
Disclosure of Invention
The embodiment of the application provides a data post-processing method, a system and equipment for service data query, which are used for solving the problems that the data query efficiency and accuracy in the current ERP system are easily affected by user input data, and the user is subjected to complicated operation, so that the user friendliness is poor.
In one aspect, an embodiment of the present application provides a data post-processing method for service data query, where the method includes:
based on the service query information from the upstream language model, determining a corresponding service query intention and a query slot;
matching the business query intention with a preset query intention set to determine a corresponding query intention category according to a matching result;
Determining a slot category corresponding to the query slot according to the query intention category and a preset slot filtering condition; the preset slot filtering conditions are used for screening the slot category corresponding to the query intention category from a preset slot category list; the slot category has a mapping relation with a preset format mapping rule;
When the slot class is determined to meet the format conversion condition, carrying out format conversion on the query slot to obtain a standard query slot after format conversion;
Based on the standard query slot position and the service query intention, generating post-processing information corresponding to the service query information, and taking the post-processing information as input information of a downstream task, so as to execute the corresponding downstream task according to the input information.
In one implementation of the present application, determining a corresponding service query intention and a query slot based on service query information from an upstream language model specifically includes:
Converting the service inquiry information into first JSON format data;
Determining the service query intention and each query slot corresponding to the service query intention according to a key value pair corresponding to each intention attribute and a key value pair corresponding to each slot attribute in the first JSON format data; one of the service query intents corresponds to at least one of the query slots.
In one implementation of the present application, before matching the service query intention with a preset query intention set to determine a corresponding query intention category according to a matching result, the method further includes:
Acquiring a plurality of historical query intention text messages; the historical query intention text information comprises a query short text group corresponding to the marked query intention; the query short text group comprises one or more query short text subgroups corresponding to the same marked query intention;
Adding the marked query intention corresponding to each piece of historical query intention text information to the preset query intention set to serve as the query intention category;
before determining the slot category corresponding to the query slot according to the query intention category and the preset slot filtering condition, the method further comprises:
Determining a labeling slot class corresponding to each inquiry short text group based on labeling operation of a user on each inquiry short text group in the same inquiry intention class respectively, so as to generate the preset slot class list according to each labeling slot class and the corresponding inquiry intention class; wherein, the mapping relation exists between the labeling slot class and the preset format mapping rule; the preset format mapping rule at least comprises: the slot categories are the standard query slot, the slot categories are the slots to be converted to be standard, and the slot categories are the slots to be converted to be supplemented.
In one implementation manner of the present application, the service query intention is matched with a preset query intention set, so as to determine a corresponding query intention category according to a matching result, and the method specifically includes:
Coding the service query intention and the corresponding query slot to generate an intention matching vector;
performing similarity calculation on the intention matching vector and a vector to be matched corresponding to each query intention category in the preset query intention set to obtain each intention matching similarity;
and generating a similarity sequence corresponding to each intention matching similarity through an bubbling sequencing algorithm, taking the intention matching similarity corresponding to the largest element in the similarity sequence as a selected similarity, and adding the selected similarity to the matching result to determine the query intention category corresponding to the selected similarity.
In one implementation manner of the present application, when it is determined that the slot class meets a format conversion condition, format conversion is performed on the query slot to obtain a standard query slot after format conversion, which specifically includes:
Under the condition that the slot class is the slot to be converted to be standard, determining that the slot class meets the format conversion condition, and determining a standard data format corresponding to the query slot according to the query intention class so as to perform format conversion on the query slot according to the standard data format to obtain the standard query slot;
Determining that the slot class meets the format conversion condition under the condition that the slot class is the to-be-supplemented conversion slot, and determining a corresponding multi-stage supplementing slot based on the query slot and a preset natural language understanding model so as to carry out format conversion on the multi-stage supplementing slot according to the multi-stage supplementing slot and a corresponding standard data format to obtain the standard query slot;
the method further comprises the steps of:
and under the condition that the slot class is the standard query slot, determining the query slot as the standard query slot.
In one implementation manner of the present application, determining the corresponding multi-level alignment slot based on the query slot and a preset natural language understanding model specifically includes:
inputting the short query text in each query slot into the preset natural language understanding model to determine whether the associated short query text exists; the association refers to a complete query condition that at least two query short texts are of the same service query dimension and form the service query dimension; the service query dimension at least comprises: service query intention, query time and query quantity;
if the query short text exists, determining that each corresponding query slot is the multi-level filling slot according to the associated query short text;
And if the service query dimension does not exist, determining a plurality of filling slots of the corresponding service query dimension contained in the query short text according to the preset natural language understanding model and the service query dimension corresponding to the query short text so as to generate the corresponding multi-stage filling slots.
In one implementation manner of the present application, based on the standard query slot and the service query intention, post-processing information corresponding to the service query information is generated, which specifically includes:
Sorting all the standard inquiry slots according to a preset data inquiry sequence corresponding to the service inquiry intention;
And converting the sequenced standard query slots and the service query intention into second JSON format data to obtain the post-processing information.
In one implementation of the present application, the method further includes:
Acquiring service inquiry feedback information from a user terminal;
and generating corresponding updating information for the preset query intention set according to the service query feedback information.
In another aspect, an embodiment of the present application further provides a data post-processing system for service data query, where the system includes:
the first determining module is used for determining corresponding service query intention and query slot positions based on service query information from the upstream language model;
The matching module is used for matching the business query intention with a preset query intention set so as to determine a corresponding query intention category according to a matching result;
The second determining module is used for determining the slot category corresponding to the query slot according to the query intention category and a preset slot filtering condition; the preset slot filtering conditions are used for screening the slot category corresponding to the query intention category from a preset slot category list; the slot category has a mapping relation with a preset format mapping rule;
The format conversion module is used for carrying out format conversion on the query slot when the slot class is determined to meet the format conversion condition so as to obtain a standard query slot after format conversion;
The generation module is used for generating post-processing information corresponding to the service query information based on the standard query slot position and the service query intention, and taking the post-processing information as input information of a downstream task so as to execute the corresponding downstream task according to the input information.
In still another aspect, an embodiment of the present application further provides a data post-processing device for service data query, where the device includes:
At least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions are executable by the at least one processor to enable the at least one processor to:
based on the service query information from the upstream language model, determining a corresponding service query intention and a query slot;
matching the business query intention with a preset query intention set to determine a corresponding query intention category according to a matching result;
Determining a slot category corresponding to the query slot according to the query intention category and a preset slot filtering condition; the preset slot filtering conditions are used for screening the slot category corresponding to the query intention category from a preset slot category list; the slot category has a mapping relation with a preset format mapping rule;
When the slot class is determined to meet the format conversion condition, carrying out format conversion on the query slot to obtain a standard query slot after format conversion;
Based on the standard query slot position and the service query intention, generating post-processing information corresponding to the service query information, and taking the post-processing information as input information of a downstream task, so as to execute the corresponding downstream task according to the input information.
Compared with the prior art, the application has the following remarkable effects:
By the technical scheme, the application provides a data post-processing technical scheme after an upstream language model of service data query, and further matches and processes the service query intention and the identified query slot so as to be directly applied to downstream tasks. And the business query information obtained by various natural languages input by the user can be uniformly formatted, so that the user does not need to consider the limitation of the use rules. The method can realize the function of efficiently and accurately inputting natural language data query in the ERP system, reduce user operation, be more friendly to users and improve user experience.
The application adopts the preset query intention set to divide the query intention category, can divide the service query intention with special requirements into finer dimensions, does not provide unified service query processing for a plurality of service query intents, more flexibly carries out format conversion of the query slots corresponding to the single service query intention, is convenient for users to expand and distinguish the service query intents with requirements, and the obtained service query result meets the requirements of users.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a schematic flow chart of a data post-processing method for service data query according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of another method for post-processing data for service data query according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a data post-processing system for service data query according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a data post-processing device for service data query in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
When man-machine interaction is performed, an Artificial Intelligence (AI) assistant constructed based on the BERT model and the like can only perform extraction type groove filling on an input text by the bottom model. Namely: when the user uses the AI assistant to conduct man-machine interaction dialogue, the user can only extract key information from natural language input by the user to conduct similarity matching and generate an answer. However, for the same query content, the user may express in multiple different manners, which results in that the AI model cannot accurately identify information with the same meaning but different expression content, which hinders smooth execution of the downstream task, and brings extra operations such as re-input or supplementary input to the user. In part of the prior art, the format normalization is carried out on the information at an input module or an output module by establishing prompt word engineering and utilizing the generating capacity of a large language model, and then the AI assistant identifies the information. However, the method has the advantages of higher requirement on computer power due to the fact that large model resources are called, the large model has poor interpretability, whether prompt word engineering meets the required quantization index is not judged, and conversion stability is not high.
Based on the above, the embodiment of the application provides a data post-processing method, a system and equipment for service data query, which are used for solving the problems that the data query efficiency and accuracy in the current ERP system are easily affected by user input data, and complicated operation is brought to a user, so that the user friendliness is poor.
Various embodiments of the present application are described in detail below with reference to the attached drawing figures.
The embodiment of the application provides a data post-processing method for service data query, which is applied to an AI assistant after processing natural language and before executing corresponding service data query operation from a database. As shown in fig. 1, the method may include steps S101-S105:
s101, the server determines corresponding service query intention and query slot positions based on service query information from an upstream language model.
It should be noted that, the server is merely an exemplary implementation body of the data post-processing method for service data query, and the implementation body is not limited to the server, and the present application is not limited thereto.
The upstream language model may be understood as a pre-trained language model, such as a BERT model, which is trained through a preset data set, so as to extract domain knowledge, identify problems raised by users in these domains, and output service query information. For example, the natural language of the service query input by the user is "please help me check the electronic tax invoice added with the last year", and the service query information may include: invoice inquiry, last year, value-added tax electronic invoice.
In the embodiment of the application, based on the service query information from the upstream language model, the corresponding service query intention and the query slot position are determined, and the method specifically comprises the following steps:
The server converts the service query information into first JSON format data. And determining the service query intention and each query slot corresponding to the service query intention according to the key value pair corresponding to each intention attribute and the key value pair corresponding to each slot attribute in the first JSON format data. One business query intention corresponds to at least one query slot.
In other words, the server can sort the service query information into JSON format data, so that unified formatting processing is facilitated. Including business query intents and query slots. The first JSON format data is as follows: { "intent" for invoice query "," slots "{" date ":" last year "," type ":" value added tax electronic invoice "}," intent "for invoice query" means key value pairs corresponding to business query intent, "intent" for intent attributes, "date" and "type" for slot attributes, "date": "last year", "type": "value added tax electronic invoice" means key value pairs corresponding to two query slots.
S102, the server matches the business query intention with a preset query intention set to determine a corresponding query intention category according to a matching result.
In the embodiment of the application, before matching the business query intention with the preset query intention set to determine the corresponding query intention category according to the matching result, the method further comprises the following steps:
The server obtains a number of historical query intent text messages. Wherein the historical query intent text information includes a query short text group corresponding to the labeled query intent. The query short text groups include one or more query short text subgroups corresponding to the same labeled query intent. And adding the labeled query intention corresponding to each historical query intention text message to a preset query intention set to serve as a query intention category.
That is, the server may obtain the labeled query intent that is labeled in advance by the user, and establish the preset query intent set. In the actual use process, the service query intention is not further classified, and the method and the device for classifying the service query intention are used for classifying the service query intention to obtain query intention categories, so that the corresponding slot categories can be obtained for different query intention categories conveniently. The historical query intention text information carrying the labeled query intention may include a plurality of query short text groups, for example { (amount query, 20000 element), (amount query, 20000 circle), (amount query, twenty thousand blocks) … … }, i.e., a plurality of query short text groups in one historical query intention text information are short text groups expressing the same query intention category, and the short text groups include short text in forms such as amount query, 20000 element, etc., wherein the amount query is the query intention category.
In one embodiment of the present application, the service query information may include a plurality of service query intentions and query slots corresponding to the service query intentions, and the server may obtain a plurality of query intent categories corresponding to the service query intentions, that is, one service query intention may cover a plurality of query intent categories, where the description of the service query intention may be relatively broad and may cover a plurality of query intent categories that may be used for service data query. For example, the first business query intention may include the first query intention category and the second query intention category in the noted query intents, so that the server may obtain a plurality of query intention categories.
In the embodiment of the present application, the matching of the service query intention with the preset query intention set to determine a corresponding query intention category according to a matching result specifically includes:
And the server encodes the service query intention and the corresponding query slot to generate an intention matching vector. And carrying out similarity calculation on the intention matching vector and the vectors to be matched corresponding to each query intention category in the preset query intention set to obtain each intention matching similarity. And generating a similarity sequence corresponding to each intention matching similarity through an bubbling sequencing algorithm, taking the intention matching similarity corresponding to the maximum element in the similarity sequence as a selected similarity, and adding the selected similarity to a matching result to determine the query intention category corresponding to the selected similarity.
In other words, the server may perform the intent matching vector coding, for example { a, B, C … … }, where the first location is the coding of the service query intent, and the second location is then the coding of the slot value corresponding to the query slot, and perform the vector coding on each query short text subgroup in the preset query intent set, to obtain one or more vectors to be matched corresponding to one labeled query intent. The server can obtain the intention matching similarity between the intention matching vector and the vector to be matched by calculating the reciprocal of the Euclidean distance or the cosine similarity. The larger the value of the intended match similarity, the higher the degree of similarity of the two vectors. And sequencing the obtained intention matching similarity through an bubbling sequencing algorithm to obtain a similarity sequence. The similarity sequences can be arranged in sequence from large to small, the maximum value in the similarity sequences is used as the selected similarity by the server, and the corresponding query intention category is obtained according to the query short text group corresponding to the selected similarity.
If multiple query intention categories exist, the server can perform multi-thread calculation on the intention matching similarity between the service query intention and each query intention in the preset query intention set, determine that the intention matching similarity is greater than a set threshold, if the multiple intention matching similarities are greater than the set threshold, then multiple query intention categories exist, and the server determines query intention categories corresponding to the multiple intention matching similarities respectively.
S103, the server determines the slot category corresponding to the query slot according to the query intention category and the preset slot filtering condition.
The preset slot filtering conditions are used for screening the slot categories corresponding to the query intention categories from the preset slot category list. The mapping relation exists between the slot class and a preset format mapping rule.
In the embodiment of the application, before determining the slot category corresponding to the query slot according to the query intention category and the preset slot filtering condition, the method further comprises the following steps:
And determining the labeling slot categories corresponding to the query short text groups based on labeling operations of the users on the query short text groups in the same query intention category respectively, so as to generate a preset slot category list according to the labeling slot categories and the corresponding query intention categories. The annotation slot category has a mapping relation with a preset format mapping rule. The preset format mapping rule at least comprises: the slot class is a standard query slot, the slot class is a slot to be converted to be standard, and the slot class is a slot to be converted to be supplemented.
That is, each inquiry short text group is marked with a marked slot class to generate a preset slot class list, and different preset format mapping rules are corresponding to different slot classes. The preset format mapping rule corresponds to a manner for format-converting the bit values (i.e., short text) in the query slots. The application has three preset format mapping rules, which respectively correspond to three situations that the slot class is a standard query slot, the slot class is a slot to be converted to be standard, and the slot class is a slot to be converted to be supplemented.
And S104, when the server determines that the slot class meets the format conversion condition, performing format conversion on the query slot to obtain a standard query slot after format conversion.
In the embodiment of the application, when determining that the slot class meets the format conversion condition, format conversion is performed on the query slot to obtain the standard query slot after format conversion, which specifically comprises the following steps:
Under the condition that the slot class is the slot to be converted, determining that the slot class meets the format conversion condition, determining the standard data format corresponding to the query slot according to the query intention class, and performing format conversion on the query slot according to the standard data format to obtain the standard query slot. Under the condition that the slot class is the slot to be supplemented and converted, determining that the slot class meets format conversion conditions, determining corresponding multi-level supplementing and aligning slots based on the query slot and a preset natural language understanding model, and carrying out format conversion on the multi-level supplementing and aligning slots according to the multi-level supplementing and aligning slots and corresponding standard data formats to obtain the standard query slot. In addition, under the condition that the slot class is the standard query slot class, determining that the slot class does not meet the format conversion condition, and determining that the query slot is the standard query slot.
In other words, the slot class is a standard query slot, and the value of the slot in the current query slot is characterized as being directly used for the subsequent downstream tasks, and the server directly takes the query slot as the standard query slot. When the slot class is not the standard query slot, the server judges whether the slot belongs to the conversion slot to be standard or the conversion slot to be complemented by identifying the slot value in the query slot. Specifically, a pre-trained natural language understanding model can be used for identifying whether the slot class corresponding to the query slot belongs to a preset to-be-supplemented conversion slot. In the actual use process, the user can designate some slot categories as the to-be-repaired conversion slots, for example, the query slots used for querying the time and the query slots used for querying the quantity belong to the to-be-repaired conversion slots.
If the channel is not the to-be-repaired conversion channel and is not the standard query channel, the channel type is the to-be-standard conversion channel. At this time, the server determines the standard data format corresponding to the query slot from the preset standard data format comparison table according to the query intention type. For example, the first query intention category corresponds to a first standard data format comparison table, and the standard data format corresponding to the query slot in the first standard data format comparison table is in the format of ISO 8601. And the server converts the slot values in the query slots into a standard data format, so that the standard query slots are obtained.
When the bin categories are determined to be the to-be-supplemented conversion bins, the server uses the query bins and a preset natural language understanding model to determine the multilevel supplemented bins, and then performs format conversion. The multi-level alignment slot is understood to be a slot group consisting of a plurality of associated query slots, such as a query slot "last year" which belongs to the conversion slot to be aligned, and the corresponding multi-level alignment slots are "xxxx 1 month 1 day" and "xxxx 12 month 31 day". And the server performs format conversion on the standard data format of the determined multi-level filling slots, such as the ISO 8601 format, and generates standard query slots.
In the embodiment of the application, based on the inquiry slot position and a preset natural language understanding model, the corresponding multistage filling slot position is determined, and the method specifically comprises the following steps:
The server inputs the short text in each inquiry slot into a preset natural language understanding model to determine whether the associated short text exists. The association refers to a complete query condition that at least two query short texts are of the same service query dimension and constitute the service query dimension. The service query dimension includes at least: business query intention, query time, query number. And under the condition that the associated query short text exists, determining that each corresponding query slot is a multi-level filling slot according to the associated query short text. And under the condition that the related query short text does not exist, determining a plurality of filling slots of corresponding service query dimensions contained in the query short text according to a preset natural language understanding model and the service query dimensions corresponding to the query short text so as to generate corresponding multi-stage filling slots.
The preset natural language understanding model can be a cyclic neural network model, and can judge the class of the slot positions, whether a plurality of inquiry slot positions are related or not, output the filling slot positions and the like. For example, a business query is intended to be: the personal account bill is inquired, and two inquiry slots exist: the service inquiry dimension corresponds to the inquiry quantity of 1 ten thousand and 10 ten thousand, and the two inquiry slots can form a complete inquiry condition of the inquiry quantity corresponding to the service inquiry dimension, such as the inquiry of a personal account statement between 1 ten thousand and 10 ten thousand. The server generates a multi-level filling slot from each associated query slot. If the related query short text does not exist, namely, the related query slot is not exist, the server outputs the complement slot of the corresponding service query dimension of the query short text through a preset natural language understanding model. For example, the query text is "last year", and the complementary slots are "xxxx 1 month 1 day" and "xxxx 12 month 31 days", thereby generating a multi-level complementary slot.
By the technical scheme, different natural languages which express the same service query intention and are input by the user can be processed in a targeted manner, so that the standard query slot meeting the downstream task is obtained, the user does not need to perform additional operation, and the service data query time is saved.
S105, the server generates post-processing information corresponding to the service query information based on the standard query slot position and the service query intention, and the post-processing information is used as input information of the downstream task, so that the corresponding downstream task is executed according to the input information.
In the embodiment of the present application, the generating post-processing information corresponding to service query information based on the standard query slot and the service query intention specifically includes:
And the server sorts the standard query slots according to a preset data query sequence corresponding to the service query intention. And converting the sequenced standard query slots and the service query intention into second JSON format data to obtain post-processing information.
In other words, the server may store preset data query sequences corresponding to different service query intents, and each standard query slot may be arranged according to the preset data query sequences. Thereby generating ordered second JSON formatted data. Second JSON format data such as: { "intent" for invoice query "," slots "{" date1 "for 2023-01-01", "date2" for 2023-12-31"," type "for value added tax electronic invoice }.
In one embodiment of the present application, there are some special business query intents not covered in the preset query intent set, so the present application also provides the following embodiments:
the server acquires service inquiry feedback information from the user terminal. And generating corresponding updating information for the preset query intention set according to the service query feedback information.
That is, after the user can check the natural language of the service query input by the user terminal, the service query result provided by the downstream task is sent to the server service query feedback information, such as that the service query result meets the requirement, or that the service query result does not meet the service query intention, etc. The server may determine whether to generate update information according to the service query feedback information to prompt the corresponding user to update the preset query intent set.
Fig. 2 is another flow chart of a data post-processing method for service data query according to an embodiment of the present application, as shown in fig. 2, including:
S201, an upstream task; s202, sorting the data into JSON format data; s203, presetting an intention and slot list; s204, identifying and classifying user intentions; s205, checking the slot position; s206, judging that the general slot position is a standard query slot position or a slot position type is a slot position to be converted; s207, judging that the special slot position (namely the slot position type is the slot position to be complemented and converted); s208, setting a secondary slot position; s209, checking the slot position; s2010, judging that the slot is implicitly contained (namely, no associated query short text exists); s2011, judging or converting into a display containing slot position; s2012, establishing a mapping relation between a standard data format and natural language (service query intention and query slot position); s2013, formatting according to the mapping relation; s2014, sorting the data into JSON format data and merging the data; s2015, downstream tasks.
By the technical scheme, the application provides a data post-processing technical scheme after an upstream language model of service data query, and further matches and processes the service query intention and the identified query slot so as to be directly applied to downstream tasks. And the business query information obtained by various natural languages input by the user can be uniformly formatted, so that the user does not need to consider the limitation of the use rules. The method can realize the function of efficiently and accurately carrying out data query of the input natural language in the ERP system, reduces user operation and is more friendly to users.
The application adopts the preset query intention set to divide the query intention category, can divide the service query intention with special requirements into finer dimensions, does not provide unified service query processing for a plurality of service query intents, more flexibly carries out format conversion of the query slots corresponding to the single service query intention, is convenient for users to expand and distinguish the service query intents with requirements, and the obtained service query result meets the requirements of users.
Fig. 3 is a schematic structural diagram of a data post-processing system 300 for service data query according to an embodiment of the present application, where, as shown in fig. 3, the system includes:
The first determining module 301 is configured to determine a corresponding service query intention and a query slot based on service query information from the upstream language model. The matching module 302 is configured to match the service query intention with a preset query intention set, so as to determine a corresponding query intention category according to a matching result. The second determining module 303 is configured to determine a slot category corresponding to the query slot according to the query intention category and a preset slot filtering condition. The preset slot filtering conditions are used for screening the slot categories corresponding to the query intention categories from the preset slot category list. The mapping relation exists between the slot class and a preset format mapping rule. And the format conversion module 304 is configured to perform format conversion on the query slot when the slot class is determined to satisfy the format conversion condition, so as to obtain a standard query slot after format conversion. The generating module 305 is configured to generate post-processing information corresponding to the service query information based on the standard query slot and the service query intention, and serve as input information of the downstream task, so as to execute the corresponding downstream task according to the input information.
In the embodiment of the present application, the first determining module 301 is specifically configured to:
And converting the service inquiry information into the first JSON format data. And determining the service query intention and each query slot corresponding to the service query intention according to the key value pair corresponding to each intention attribute and the key value pair corresponding to each slot attribute in the first JSON format data. One business query intention corresponds to at least one query slot.
In the embodiment of the application, the system can also:
and acquiring a plurality of historical query intention text messages. Wherein the historical query intent text information includes a query short text group corresponding to the labeled query intent. The query short text groups include one or more query short text subgroups corresponding to the same labeled query intent. And adding the labeled query intention corresponding to each historical query intention text message to a preset query intention set to serve as a query intention category.
The system is further capable of:
And determining the labeling slot categories corresponding to the query short text groups based on labeling operations of the users on the query short text groups in the same query intention category respectively, so as to generate a preset slot category list according to the labeling slot categories and the corresponding query intention categories. The annotation slot category has a mapping relation with a preset format mapping rule. The preset format mapping rule at least comprises: the slot class is a standard query slot, the slot class is a slot to be converted to be standard, and the slot class is a slot to be converted to be supplemented.
In the embodiment of the present application, the matching module 302 is specifically configured to:
And coding the service query intention and the corresponding query slot to generate an intention matching vector. And carrying out similarity calculation on the intention matching vector and the vectors to be matched corresponding to each query intention category in the preset query intention set to obtain each intention matching similarity. And generating a similarity sequence corresponding to each intention matching similarity through an bubbling sequencing algorithm, taking the intention matching similarity corresponding to the maximum element in the similarity sequence as a selected similarity, and adding the selected similarity to a matching result to determine the query intention category corresponding to the selected similarity.
In the embodiment of the present application, the second determining module 303 is specifically capable of:
Under the condition that the slot class is the slot to be converted, determining that the slot class meets the format conversion condition, determining the standard data format corresponding to the query slot according to the query intention class, and performing format conversion on the query slot according to the standard data format to obtain the standard query slot. Under the condition that the slot class is the slot to be supplemented and converted, determining that the slot class meets format conversion conditions, determining corresponding multi-level supplementing and aligning slots based on the query slot and a preset natural language understanding model, and carrying out format conversion on the multi-level supplementing and aligning slots according to the multi-level supplementing and aligning slots and corresponding standard data formats to obtain the standard query slot. The system is further capable of: under the condition that the slot class is the standard query slot, determining that the slot class does not meet the format conversion condition, and determining that the query slot is the standard query slot.
The second determination module 303 is specifically further capable of:
And inputting the short query texts in each query slot into a preset natural language understanding model to determine whether the associated short query texts exist. The association refers to a complete query condition that at least two query short texts are of the same service query dimension and constitute the service query dimension. The service query dimension includes at least: business query intention, query time, query number. If the corresponding query slots exist, determining that the corresponding query slots are multi-level filling slots according to the associated query short text. If the corresponding service query dimension does not exist, a plurality of filling slots of the corresponding service query dimension contained in the query short text are determined according to a preset natural language understanding model and the service query dimension corresponding to the query short text, so that corresponding multi-stage filling slots are generated.
The generating module 305 is specifically capable of:
And sequencing the standard query slots according to a preset data query sequence corresponding to the service query intention. And converting the sequenced standard query slots and the service query intention into second JSON format data to obtain post-processing information.
In the embodiment of the application, the system can also:
and acquiring service inquiry feedback information from the user terminal. And generating corresponding updating information for the preset query intention set according to the service query feedback information.
Fig. 4 is a schematic structural diagram of a data post-processing device for service data query according to an embodiment of the present application, where, as shown in fig. 4, the device includes:
at least one processor; and a memory communicatively coupled to the at least one processor. Wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to:
Based on the service query information from the upstream language model, a corresponding service query intent and query slot are determined. And matching the business query intention with a preset query intention set to determine a corresponding query intention category according to a matching result. And determining the slot category corresponding to the query slot according to the query intention category and the preset slot filtering condition. The preset slot filtering conditions are used for screening the slot categories corresponding to the query intention categories from the preset slot category list. The mapping relation exists between the slot class and a preset format mapping rule. And when the type of the slot positions meets the format conversion condition, carrying out format conversion on the query slot positions to obtain standard query slot positions after format conversion. Based on the standard query slot position and the service query intention, post-processing information corresponding to the service query information is generated and used as input information of the downstream task, so that the corresponding downstream task is executed according to the input information.
The embodiments of the present application are described in a progressive manner, and the same and similar parts of the embodiments are all referred to each other, and each embodiment is mainly described in the differences from the other embodiments. In particular, for system and apparatus embodiments, the description is relatively simple, as it is substantially similar to method embodiments, with reference to the description of method embodiments in part.
The system, the device and the method provided by the embodiment of the application are in one-to-one correspondence, so that the system and the device also have similar beneficial technical effects as the corresponding method, and the beneficial technical effects of the method are explained in detail above, so that the beneficial technical effects of the system and the device are not repeated here.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (10)

1. A data post-processing method for service data query, the method comprising:
based on the service query information from the upstream language model, determining a corresponding service query intention and a query slot;
matching the business query intention with a preset query intention set to determine a corresponding query intention category according to a matching result;
Determining a slot category corresponding to the query slot according to the query intention category and a preset slot filtering condition; the preset slot filtering conditions are used for screening the slot category corresponding to the query intention category from a preset slot category list; the slot category has a mapping relation with a preset format mapping rule;
When the slot class is determined to meet the format conversion condition, carrying out format conversion on the query slot to obtain a standard query slot after format conversion;
Based on the standard query slot position and the service query intention, generating post-processing information corresponding to the service query information, and taking the post-processing information as input information of a downstream task, so as to execute the corresponding downstream task according to the input information.
2. The data post-processing method for service data query according to claim 1, wherein determining the corresponding service query intention and query slot based on the service query information from the upstream language model, specifically comprises:
Converting the service inquiry information into first JSON format data;
Determining the service query intention and each query slot corresponding to the service query intention according to a key value pair corresponding to each intention attribute and a key value pair corresponding to each slot attribute in the first JSON format data; one of the service query intents corresponds to at least one of the query slots.
3. The method of claim 1, wherein prior to matching the business query intent with a set of preset query intents to determine a corresponding query intent category based on the matching results, the method further comprises:
Acquiring a plurality of historical query intention text messages; the historical query intention text information comprises a query short text group corresponding to the marked query intention; the query short text group comprises one or more query short text subgroups corresponding to the same marked query intention;
Adding the marked query intention corresponding to each piece of historical query intention text information to the preset query intention set to serve as the query intention category;
before determining the slot category corresponding to the query slot according to the query intention category and the preset slot filtering condition, the method further comprises:
Determining a labeling slot class corresponding to each inquiry short text group based on labeling operation of a user on each inquiry short text group in the same inquiry intention class respectively, so as to generate the preset slot class list according to each labeling slot class and the corresponding inquiry intention class; wherein, the mapping relation exists between the labeling slot class and the preset format mapping rule; the preset format mapping rule at least comprises: the slot categories are the standard query slot, the slot categories are the slots to be converted to be standard, and the slot categories are the slots to be converted to be supplemented.
4. A data post-processing method for service data query according to claim 3, wherein the matching of the service query intention with a preset query intention set to determine a corresponding query intention category according to the matching result specifically comprises:
Coding the service query intention and the corresponding query slot to generate an intention matching vector;
performing similarity calculation on the intention matching vector and a vector to be matched corresponding to each query intention category in the preset query intention set to obtain each intention matching similarity;
and generating a similarity sequence corresponding to each intention matching similarity through an bubbling sequencing algorithm, taking the intention matching similarity corresponding to the largest element in the similarity sequence as a selected similarity, and adding the selected similarity to the matching result to determine the query intention category corresponding to the selected similarity.
5. The method for post-processing data for service data query according to claim 3, wherein when determining that the slot class satisfies a format conversion condition, performing format conversion on the query slot to obtain a standard query slot after format conversion, comprising:
Under the condition that the slot class is the slot to be converted to be standard, determining that the slot class meets the format conversion condition, and determining a standard data format corresponding to the query slot according to the query intention class so as to perform format conversion on the query slot according to the standard data format to obtain the standard query slot;
Determining that the slot class meets the format conversion condition under the condition that the slot class is the to-be-supplemented conversion slot, and determining a corresponding multi-stage supplementing slot based on the query slot and a preset natural language understanding model so as to carry out format conversion on the multi-stage supplementing slot according to the multi-stage supplementing slot and a corresponding standard data format to obtain the standard query slot;
the method further comprises the steps of:
And under the condition that the slot class is the standard query slot, determining that the slot class does not meet the format conversion condition, and determining that the query slot is the standard query slot.
6. The method for post-processing data for service data query according to claim 5, wherein determining the corresponding multi-level filling slot based on the query slot and a preset natural language understanding model specifically comprises:
inputting the short query text in each query slot into the preset natural language understanding model to determine whether the associated short query text exists; the association refers to a complete query condition that at least two query short texts are of the same service query dimension and form the service query dimension; the service query dimension at least comprises: service query intention, query time and query quantity;
if the query short text exists, determining that each corresponding query slot is the multi-level filling slot according to the associated query short text;
And if the service query dimension does not exist, determining a plurality of filling slots of the corresponding service query dimension contained in the query short text according to the preset natural language understanding model and the service query dimension corresponding to the query short text so as to generate the corresponding multi-stage filling slots.
7. The method for post-processing data for service data query according to claim 1, wherein generating post-processing information corresponding to the service query information based on the standard query slot and the service query intention specifically comprises:
Sorting all the standard inquiry slots according to a preset data inquiry sequence corresponding to the service inquiry intention;
And converting the sequenced standard query slots and the service query intention into second JSON format data to obtain the post-processing information.
8. A data post-processing method for service data queries according to claim 1, characterized in that the method further comprises:
Acquiring service inquiry feedback information from a user terminal;
and generating corresponding updating information for the preset query intention set according to the service query feedback information.
9. A data post-processing system for business data queries, the system comprising:
the first determining module is used for determining corresponding service query intention and query slot positions based on service query information from the upstream language model;
The matching module is used for matching the business query intention with a preset query intention set so as to determine a corresponding query intention category according to a matching result;
The second determining module is used for determining the slot category corresponding to the query slot according to the query intention category and a preset slot filtering condition; the preset slot filtering conditions are used for screening the slot category corresponding to the query intention category from a preset slot category list; the slot category has a mapping relation with a preset format mapping rule;
The format conversion module is used for carrying out format conversion on the query slot when the slot class is determined to meet the format conversion condition so as to obtain a standard query slot after format conversion;
The generation module is used for generating post-processing information corresponding to the service query information based on the standard query slot position and the service query intention, and taking the post-processing information as input information of a downstream task so as to execute the corresponding downstream task according to the input information.
10. A data post-processing device for service data querying, the device comprising:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform a data post-processing method for business data querying according to any of the preceding claims 1-8.
CN202410917140.9A 2024-07-10 2024-07-10 Data post-processing method, system and equipment for service data query Active CN118467570B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410917140.9A CN118467570B (en) 2024-07-10 2024-07-10 Data post-processing method, system and equipment for service data query

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410917140.9A CN118467570B (en) 2024-07-10 2024-07-10 Data post-processing method, system and equipment for service data query

Publications (2)

Publication Number Publication Date
CN118467570A true CN118467570A (en) 2024-08-09
CN118467570B CN118467570B (en) 2024-09-27

Family

ID=92164050

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410917140.9A Active CN118467570B (en) 2024-07-10 2024-07-10 Data post-processing method, system and equipment for service data query

Country Status (1)

Country Link
CN (1) CN118467570B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825949A (en) * 2019-09-19 2020-02-21 平安科技(深圳)有限公司 Information retrieval method based on convolutional neural network and related equipment thereof
US20200387550A1 (en) * 2019-06-05 2020-12-10 Dell Products, Lp System and method for generation of chat bot system with integration elements augmenting natural language processing and native business rules
CN112579031A (en) * 2019-09-27 2021-03-30 北京安云世纪科技有限公司 Voice interaction method and system and electronic equipment
WO2021254411A1 (en) * 2020-06-17 2021-12-23 华为技术有限公司 Intent recognigion method and electronic device
CN113919366A (en) * 2021-09-06 2022-01-11 国网河北省电力有限公司电力科学研究院 Semantic matching method and device for power transformer knowledge question answering
CN117370564A (en) * 2023-10-30 2024-01-09 北京工业大学 Intention recognition and slot filling method and system based on asynchronous training multiple models
CN117744651A (en) * 2023-12-22 2024-03-22 云知声(杭州)智能科技有限公司 Method and device for extracting slot position information of language large model fusion NLU
CN118132687A (en) * 2022-12-02 2024-06-04 北京沃东天骏信息技术有限公司 Sentence processing and category model training method, sentence processing and category model training device, sentence processing equipment and category model training medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200387550A1 (en) * 2019-06-05 2020-12-10 Dell Products, Lp System and method for generation of chat bot system with integration elements augmenting natural language processing and native business rules
CN110825949A (en) * 2019-09-19 2020-02-21 平安科技(深圳)有限公司 Information retrieval method based on convolutional neural network and related equipment thereof
CN112579031A (en) * 2019-09-27 2021-03-30 北京安云世纪科技有限公司 Voice interaction method and system and electronic equipment
WO2021254411A1 (en) * 2020-06-17 2021-12-23 华为技术有限公司 Intent recognigion method and electronic device
CN113919366A (en) * 2021-09-06 2022-01-11 国网河北省电力有限公司电力科学研究院 Semantic matching method and device for power transformer knowledge question answering
CN118132687A (en) * 2022-12-02 2024-06-04 北京沃东天骏信息技术有限公司 Sentence processing and category model training method, sentence processing and category model training device, sentence processing equipment and category model training medium
CN117370564A (en) * 2023-10-30 2024-01-09 北京工业大学 Intention recognition and slot filling method and system based on asynchronous training multiple models
CN117744651A (en) * 2023-12-22 2024-03-22 云知声(杭州)智能科技有限公司 Method and device for extracting slot position information of language large model fusion NLU

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
何玉钧;张文正;陈冉;刘毅;周生平;: "基于文本信息提取的电力通信网业务信息管理系统设计", 电力信息与通信技术, no. 09, 15 September 2015 (2015-09-15), pages 87 - 93 *

Also Published As

Publication number Publication date
CN118467570B (en) 2024-09-27

Similar Documents

Publication Publication Date Title
CN112035599B (en) Query method and device based on vertical search, computer equipment and storage medium
CN109325040B (en) FAQ question-answer library generalization method, device and equipment
WO2003012685A2 (en) A data quality system
CN112507704A (en) Multi-intention recognition method, device, equipment and storage medium
CN112035626A (en) Rapid identification method and device for large-scale intentions and electronic equipment
CN116991875A (en) SQL sentence generation and alias mapping method and device based on big model
CN117909464A (en) Intelligent question-answering method and system for inquiring monitoring data of power equipment
CN110413779B (en) Word vector training method, system and medium for power industry
CN118467570B (en) Data post-processing method, system and equipment for service data query
CN111831624A (en) Data table creating method and device, computer equipment and storage medium
CN110019714A (en) More intent query method, apparatus, equipment and storage medium based on historical results
CN113869054B (en) Deep learning-based power field project feature recognition method
CN113590781A (en) Terminal express delivery code prediction method and system, electronic device and readable storage medium
JPH06282587A (en) Automatic classifying method and device for document and dictionary preparing method and device for classification
CN115658903B (en) Text classification method, model training method, related device and electronic equipment
CN114722159B (en) Multi-source heterogeneous data processing method and system for numerical control machine tool manufacturing resources
CN117688151A (en) Knowledge base-based question and answer method, knowledge base-based question and answer device, computer equipment and storage medium
CN113535938B (en) Standard data construction method, system, equipment and medium based on content identification
CN115617841A (en) Method, system, equipment and storage medium for generating data query statement
CN115712722A (en) Clustering system, method, electronic device and storage medium for multi-language short message text
CN115358473A (en) Power load prediction method and prediction system based on deep learning
CN113468174A (en) Database query method and device, electronic equipment and computer storage medium
CN114386427A (en) Semantic analysis-based power grid regulation unstructured table data extraction processing method and device and storage medium
CN114090624B (en) Processing method and device for converting natural language into structured query language
CN112612888B (en) Method and system for intelligent clustering of text files

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant