Query statement processing method and device, vehicle, and storage medium

By determining distribution labels and rules in the semantic parsing system, and utilizing distribution mapping relationships and small and large models in vertical domains to process query statements, the problem of low query processing efficiency in traditional systems is solved, and fast and accurate semantic parsing results are achieved.

CN120804139BActive Publication Date: 2025-11-21CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511288241.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-10
Publication Date
2025-11-21
Estimated Expiration
2045-09-10

AI Technical Summary

Technical Problem

Traditional semantic parsing systems are inefficient at processing query statements when dealing with complex and diverse natural language inputs, leading to increased time consumption throughout the entire process from input to result.

Method used

By determining the distribution tags and rules for query statements, the semantic parsing results are distributed to the target information source using the distribution mapping relationship. The distribution mapping relationship is optimized to adapt to changes in information source capabilities and user needs. By combining small and large models in vertical domains to handle different types of query statements, fast and accurate semantic parsing is achieved.

Benefits of technology

It improves the processing efficiency of query statements, ensures the accuracy of target information sources, reduces invalid calculations, and enhances the accuracy and processing quality of semantic parsing results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120804139B_ABST
    Figure CN120804139B_ABST
Patent Text Reader

Abstract

The application provides a query statement processing method and device, a vehicle and a storage medium, relates to the technical field of vehicles, and is used for solving the low processing efficiency of query statements in the prior art, and comprises the following steps: acquiring a query statement input by a user, determining a semantic analysis result and a distribution label of the query statement; determining a distribution rule of the semantic analysis result based on the distribution label of the query statement and a distribution mapping relationship; wherein the distribution mapping relationship is a mapping relationship between the distribution label of the query statement and the distribution rule; the distribution rule is used at least for indicating a target source of distribution from multiple sources; sending the semantic analysis result to the target source based on the distribution rule; acquiring feedback information of an execution result of the semantic analysis result by the target source; and optimizing the distribution mapping relationship based on the feedback information, thereby improving the processing efficiency of the query statement.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of vehicles, in particular to a query statement processing method and device, a vehicle and a storage medium. BACKGROUND

[0002] Traditional semantic parsing systems usually rely on rules and predefined templates, which are difficult to handle complex and diverse natural language inputs. With the development of deep learning and big data technology, large model-based semantic parsing systems have gradually emerged. These systems can understand the context and handle complex tasks such as multi-intention expression and fuzzy semantic reasoning, greatly breaking through the limitations of traditional methods.

[0003] In related technologies, a large language model is used to understand and analyze input text in multiple dimensions, more accurately understand the meaning of input text in a specific context, and accurately extract the required parameters of the user, thereby completing the structured analysis of the user's intention, which can greatly improve the understanding ability in part of the traditional voice interaction process. However, the above method needs to parse parameters to determine the distributable intention queue when distributing intentions. The distributable intention in the distributable intention queue can be distributed through the agreed calling method. This method has low distribution efficiency, resulting in an increase in the time consumption of the whole process from input to obtaining the processing result of the query statement.

[0004] Therefore, how to improve the processing efficiency of the query statement is a problem to be solved at present. SUMMARY

[0005] The present application provides a query statement processing method, device, vehicle and storage medium to solve the problem of low processing efficiency of query statements in related technologies.

[0006] To achieve the above purpose, the technical scheme adopted by the present application is as follows:

[0007] In a first aspect, a query statement processing method is provided, comprising: obtaining a query statement input by a user, determining a semantic parsing result of the query statement and a distribution label; determining a distribution rule of the semantic parsing result based on the distribution label of the query statement and a distribution mapping relationship; wherein the distribution mapping relationship is a mapping relationship between the distribution label of the query statement and the distribution rule; the distribution rule is used at least to indicate a target source of distribution from a plurality of sources; based on the distribution rule, the semantic parsing result is sent to the target source; obtaining feedback information of an execution result of the semantic parsing result by the target source; based on the feedback information, optimizing the distribution mapping relationship.

[0008] The beneficial effects of the present application are: by determining the distribution label of the query statement, determining the distribution rule of the semantic analysis result through the mapping of the distribution label and the distribution rule, and realizing the distribution of the semantic analysis result to the target source, this distribution process does not need to judge which source needs to be called, avoids distributing the semantic analysis result to irrelevant sources, thereby shortening the time from input to distribution of the query statement, when the source capacity, user demand and the like change, the distribution mapping relationship is adjusted through feedback information, thereby improving the accuracy of the target source, and further improving the processing efficiency of the query statement by shortening the time from input to distribution of the query statement and improving the accuracy of the target source.

[0009] Further, the above determining the semantic analysis result of the query statement comprises: determining the characteristics of the query statement; searching whether there is a target semantic analysis rule matched with the characteristics of the query statement from a plurality of semantic analysis rules; in the case of searching the target semantic analysis rule, determining the semantic analysis result of the query statement based on the target semantic analysis rule.

[0010] According to the above technical means, by matching the target semantic analysis rule according to the characteristics of the query statement, the matched analysis rule can be quickly determined, invalid calculation is reduced, and the semantic analysis efficiency of the query statement is improved.

[0011] Further, the above determining the semantic analysis result of the query statement further comprises: in the case of not searching the target semantic analysis rule, detecting whether the query statement is complete; in the case of the complete query statement, distributing the query statement to a corresponding vertical field small model for semantic analysis processing according to the field to which the query statement belongs, to obtain the semantic analysis result; in the case of the incomplete query statement, performing semantic analysis processing on the query statement by a large model to obtain the semantic analysis result.

[0012] According to the above technical means, in the case of not searching the target semantic analysis rule, by judging whether the query statement is complete, the corresponding query statement is processed by the appropriate model, the complete query statement is processed by the vertical field small model, the analysis efficiency of the semantic analysis result and the accuracy of the semantic analysis result in the specific field can be improved, and the incomplete query statement is processed by the large model, and the reasonable semantic analysis result is obtained by means of the context understanding and fuzzy semantic reasoning capability of the large model.

[0013] Further, the above detecting whether the query statement is complete in the case of not searching the target semantic analysis rule comprises: in the case of not searching the target semantic analysis rule, detecting whether the query statement is valid; in the case of invalid query statement, adding a recognition label to the query statement, the recognition label is used to represent that the query statement is not subjected to semantic analysis; in the case of valid query statement, detecting whether the query statement is complete.

[0014] According to the above technical means, the query statement can be semantically parsed on the premise that the query statement is valid. By detecting whether the query statement is valid, invalid query statements can be filtered out in advance, avoiding the waste of parsing resources caused by invalid query statements entering the subsequent semantic parsing process.

[0015] Further, the query statement is distributed to the corresponding vertical field small model for semantic parsing processing according to the field to which the query statement belongs, and the semantic parsing result is obtained, including: in the case that the field to which the query statement belongs is multiple, the query statement is distributed to multiple vertical field small models for semantic parsing processing, and the output results of the multiple vertical field small models are obtained; the output results of the multiple vertical field small models are fused to obtain the semantic parsing result.

[0016] According to the above technical means, the focus of different vertical field small models is different, and correspondingly, the processing results generated are also different. By fusing the output results of the multiple vertical field small models, a consistent semantic parsing result is obtained, thereby improving the accuracy of the semantic parsing result.

[0017] Further, the semantic parsing result is obtained by performing the following operations on the query statement by the large model: performing semantic decomposition on the query statement to obtain multiple sub-statements of the query statement; performing semantic association on the multiple sub-statements to obtain a semantic association result; and performing semantic reconstruction on the semantic association result to obtain the semantic parsing result.

[0018] According to the above technical means, the complex query statement can be decomposed into simple sub-statements through semantic decomposition, reducing the difficulty of semantic parsing. The sub-statements are associated and reconstructed, and the sub-statements are integrated into complete language expressions, which not only reflect the real logic of the query statement, but also provide structured input for subsequent processing of the query statement, thereby improving the accuracy of the processing result of the query statement.

[0019] Further, the method further includes: obtaining a confidence degree of the semantic parsing result; and the optimization of the distribution mapping relationship based on the feedback information includes: jointly optimizing the distribution mapping relationship and model parameters of the model used to generate the semantic parsing result based on the feedback information and the confidence degree.

[0020] According to the above technical means, by jointly optimizing the distribution mapping relationship and the model parameters of the model used to generate the semantic parsing result, the problems of inaccurate model parsing and unmatched distribution are solved, thereby adjusting and maintaining the dynamic balance between accurate semantic understanding and accurate source distribution through the cooperative optimization of parsing and distribution, and further improving the processing efficiency and quality of the query statement.

[0021] Further, the determining the distribution label of the query statement comprises: determining the distribution label of the query statement based on the semantic analysis result of the query statement.

[0022] According to the technical means, the distribution label is generated based on the semantic analysis result, so that the label is highly matched with the query intention, and the accuracy of the target information source is ensured.

[0023] In a second aspect, a processing apparatus for a query statement is provided, comprising: a determining unit configured to obtain a query statement input by a user, determine a semantic analysis result and a distribution label of the query statement; and a processing unit configured to determine a distribution rule of the semantic analysis result based on the distribution label of the query statement and a distribution mapping relationship, wherein the distribution mapping relationship is a mapping relationship between the distribution label of the query statement and the distribution rule, and the distribution rule is used at least for indicating a target information source for distribution from a plurality of information sources; send the semantic analysis result to the target information source based on the distribution rule; obtain feedback information of an execution result of the semantic analysis result by the target information source; and optimize the distribution mapping relationship based on the feedback information.

[0024] In a third aspect, an electronic device is provided, comprising: a processor and a memory; the memory is configured to store processor-executable instructions; and the processor is configured to execute the instructions to implement the method of the first aspect and any possible implementation thereof.

[0025] In a fourth aspect, a vehicle is provided, comprising: the electronic device of the third aspect.

[0026] In a fifth aspect, a computer-readable storage medium is provided, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the method of the first aspect and any possible implementation thereof.

[0027] In a sixth aspect, a computer program product is provided, the computer program product comprises computer instructions, when the computer instructions are run on an electronic device, the electronic device performs the method of the first aspect and any possible implementation thereof.

[0028] The beneficial effects of the present application are as follows:

[0029] (1) By determining the distribution tag of the query statement, determining the distribution rule of the semantic analysis result through the mapping of the distribution tag and the distribution rule, and realizing the distribution of the semantic analysis result to the target source, this distribution process does not need to judge which source needs to be called, avoids distributing the semantic analysis result to irrelevant sources, thereby shortening the time from input to distribution of the query statement, when the source capacity, user demand and the like change, the distribution mapping relationship is adjusted through feedback information, thereby improving the accuracy of the target source, and further improving the processing efficiency of the query statement by shortening the time from input to distribution of the query statement and improving the accuracy of the target source.

[0030] (2) By matching the target semantic analysis rule according to the characteristics of the query statement, the matched analysis rule can be quickly determined, invalid calculation is reduced, and the semantic analysis efficiency of the query statement is improved.

[0031] (3) In the case where the target semantic analysis rule is not retrieved, by judging whether the query statement is complete, the corresponding query statement is processed by a suitable model, a complete query statement is processed by a small model in a vertical field, the analysis efficiency of the semantic analysis result and the accuracy of the semantic analysis result in a specific field can be improved, and an incomplete query statement is processed by a large model, with the help of the context understanding and fuzzy semantic reasoning capability of the large model, a reasonable semantic analysis result is obtained.

[0032] (4) The premise that the query statement can be semantically analyzed is that the query statement is valid, by detecting whether the query statement is valid, invalid query statements can be filtered in advance, and the waste of analysis resources caused by invalid query statements entering the subsequent semantic analysis process is avoided.

[0033] (5) Different small models in different vertical fields have different focuses, and correspondingly, the processing results generated are also different, by fusing the output results of multiple small models in vertical fields, a consistent semantic analysis result is obtained, thereby improving the accuracy of the semantic analysis result.

[0034] (6) By semantic disassembly, a complex query statement can be disassembled into simple sub-statements, the difficulty of semantic analysis is reduced, the sub-statements are associated and reconstructed, and the sub-statements are integrated into a complete language expression, which not only reflects the real logic of the query statement, but also provides a structured input for the subsequent processing of the query statement, thereby improving the accuracy of the processing result of the query statement.

[0035] (7) By jointly optimizing the model parameters of the distribution mapping relationship and the model for generating the semantic analysis result, the problems of inaccurate model analysis and unmatched distribution are solved, thereby maintaining the dynamic balance between semantic understanding accuracy and source distribution accuracy through the cooperative optimization of analysis and distribution, and further improving the processing efficiency and quality of the query statement.

[0036] (8) The distribution label is generated by semantic analysis result, which can ensure that the label is highly matched with the query intention, thereby ensuring the accuracy of the target source. BRIEF DESCRIPTION OF DRAWINGS

[0037] Figure 1 A flowchart of a query sentence processing method provided by an embodiment of the present application (one);

[0038] Figure 2 A flowchart of a query sentence processing method provided by an embodiment of the present application (two);

[0039] Figure 3 A flowchart of a query sentence processing method provided by an embodiment of the present application (three);

[0040] Figure 4 An architectural diagram of a query sentence processing method provided by an embodiment of the present application;

[0041] Figure 5 A flowchart of a query sentence processing method provided by an embodiment of the present application (four);

[0042] Figure 6 A flowchart of a method for determining whether a query sentence is complete provided by an embodiment of the present application;

[0043] Figure 7 A structural diagram of a query sentence processing device provided by an embodiment of the present application;

[0044] Figure 8 A structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0045] The present application will be described in detail with reference to the drawings and preferred embodiments below, and other advantages and effects of the present application can be easily understood by those skilled in the art from the contents disclosed in the specification. The present application can also be implemented or applied in other different specific embodiments, and various modifications or changes can be made to the details in the specification based on different views and applications without departing from the spirit of the present application. It should be understood that the preferred embodiments are only for illustrating the present application, and are not intended to limit the protection scope of the present application.

[0046] It should be noted that the diagrams provided in the following embodiments only schematically illustrate the basic concept of the present application, and only the components related to the present application are shown in the diagrams, not the number, shape and size of the components when actually implemented. The type, number and ratio of the components when actually implemented can be arbitrarily changed, and the layout type of the components can also be more complex.

[0047] Traditional semantic parsing systems usually rely on rules and predefined templates, which are difficult to handle complex and diverse natural language inputs. With the development of deep learning and big data technology, large model-based semantic parsing systems have gradually emerged. These systems can cope with complex tasks such as multi-intention expression and fuzzy semantic reasoning by virtue of context understanding ability, and greatly break through the limitations of traditional methods.

[0048] In related technologies, by guiding the large language model to understand and analyze the input text in multiple dimensions, the meaning of the input text in a specific context is more accurately understood, and the required parameters of the user are accurately extracted, and the structured analysis of the user's intention is completed, thereby the understanding ability in part of the traditional voice interaction process can be greatly improved, however, when the intention distribution is performed, the parameter needs to be parsed to determine the distributable intention queue, and the distributable intention in the distributable intention queue can be distributed through the agreed calling mode, this way is low in distribution efficiency, resulting in an increase in the whole process time from input to obtaining the processing result of the query statement.

[0049] Therefore, how to improve the processing efficiency of the query statement is a problem to be solved at present.

[0050] Therefore, how to improve the processing efficiency of the query statement is a problem to be solved at present.

[0051] In some embodiments, the execution subject of the query statement processing method provided by the embodiments of the present application can be a query statement processing device, which can be deployed in an electronic device. The electronic device can be a server cluster composed of multiple servers, or a single server, or a computer, or a processor or processing chip in a server or computer, or any device or equipment having a query statement processing function, which is not limited in the embodiments of the present application.

[0052] In some embodiments, the query statement processing device or electronic device provided by the embodiments of the present application can be applied to a vehicle. The vehicle can be a fuel vehicle, a pure electric vehicle, or a hybrid vehicle, which is not limited herein.

[0053] For example, during driving of the vehicle, the user input query statement can have a relatively ambiguous semantic. The query statement processing method provided by the embodiments of the present application can make the vehicle obtain a semantic analysis result by accurately analyzing the query statement, thereby enhancing the understanding of the user driving intention of the vehicle and improving the driving experience of the user.

[0054] In addition, with the increase of vehicle function modules, accurate matching of the target source can reduce the function mis-triggering and improve the reliability of the vehicle function response.

[0055] As shown in Figure 1 The query statement processing method provided by the embodiments of the present application includes the following steps:

[0056] S101, obtaining a query statement input by a user, determining a semantic analysis result of the query statement and a distribution label.

[0057] The query statement represents a request proposed by the user. For example, the query statement can be "please generate a navigation route from location A to location B". The query statement can be input in the form of text or image into a search box of an application or system, or can be input in the form of voice into an interactive interface having a voice recognition function.

[0058] The semantic analysis result represents processing of the query statement, so as to represent the real meaning of the query statement as a structured machine language. For example, the query statement is "please generate a navigation route from location A to location B", and the corresponding semantic analysis result is "start point A", "end point B" and structured data of the intention "generate a navigation route".

[0059] As a possible implementation manner, the determining the semantic analysis result of the query statement can be implemented as: determining a feature of the query statement; searching whether there is a target semantic analysis rule matched with the feature of the query statement from the plurality of semantic analysis rules; in the case that the target semantic analysis rule is searched, determining the semantic analysis result of the query statement based on the target semantic analysis rule. By matching the target semantic analysis rule according to the feature of the query statement, the matched analysis rule can be quickly determined, invalid calculation is reduced, and the semantic analysis efficiency of the query statement is improved.

[0060] The feature of the query statement is a basis for searching the target semantic analysis rule, and can be a user intention, a keyword, entity information, etc. reflected by the query statement. For example, the query statement is "What is the weather of place A tomorrow?", and the corresponding feature can include intention, place, and time.

[0061] In a possible implementation manner, a rule matching function is determined, the rule matching function traverses all semantic analysis rules, and checks whether there is a target semantic analysis rule one by one. If there is, the semantic analysis result determined by the target semantic analysis rule is returned.

[0062] As another possible implementation manner, the determining the semantic analysis result of the query statement can also be implemented as: inputting the query statement into a deep learning model to obtain the semantic analysis result of the query statement by establishing the deep learning model. Since the deep learning model can directly map the query statement to the semantic analysis result, the efficiency is high.

[0063] The distribution label represents a classification result of the semantic analysis result, and is used for matching a distribution rule. The distribution label can be determined based on the intention of the query statement. For example, if the semantic analysis result is to generate a navigation route, the distribution label can be marked as a path planning label. The distribution label can also be determined based on the field involved in the query statement. For example, if the field of the semantic analysis result is finance, medical treatment, etc., the distribution label can be marked as a finance, medical treatment, etc. distribution label.

[0064] The number of distribution labels of one query statement can be one or multiple. Specifically, the number of distribution labels can be determined according to the complexity of the query statement. If the complexity of the query statement is low, that is, the intention of the query statement is clear, the distribution label can be one. If the query statement contains multiple intentions and involves multiple fields, multiple distribution labels are needed to jointly describe.

[0065] As a possible implementation manner, the determining the distribution label of the query statement can be implemented as: determining the distribution label of the query statement based on the semantic analysis result of the query statement. The distribution label is generated through the semantic analysis result, which can ensure that the label is highly matched with the query intention, thereby ensuring the accuracy of the target source.

[0066] In a possible implementation, the determining of the distribution label of the query statement based on the semantic analysis result of the query statement can be implemented by directly generating the distribution label of the query statement based on a key feature of the semantic analysis result through rule matching.

[0067] The key feature can be a query intent, and the key feature can also be an attribute of a query object, such as a query object itself or a limitation condition.

[0068] In a possible implementation, the determining of the distribution label of the query statement based on the semantic analysis result of the query statement can be implemented by inputting the current semantic analysis result into a trained classification model (such as a decision tree or a neural network) based on historical semantic analysis results and corresponding distribution labels, to automatically generate a corresponding distribution label.

[0069] S102, determining a distribution rule of the semantic analysis result based on the distribution label of the query statement and a distribution mapping relationship.

[0070] The distribution mapping relationship is a mapping relationship between the distribution label of the query statement and the distribution rule, and the distribution rule is used to indicate at least a target source of distribution from a plurality of sources. The source indicates an information source that can be called when processing the query statement, for example, different databases, external API interfaces, search engines, user interfaces, and the like.

[0071] As a possible implementation, when the distribution label is one, the distribution rule of the semantic analysis result is obtained by traversing the distribution mapping relationship based on the distribution label of the query statement.

[0072] As another possible implementation, when the distribution label is a plurality, the distribution labels have a priority order, and the distribution rule of the semantic analysis result can be obtained by traversing the distribution mapping relationship according to the priority order of the distribution labels.

[0073] When the distribution label is a plurality, the distribution labels have a dependency relationship, and the distribution rule of the semantic analysis result can be obtained by traversing the distribution mapping relationship according to the dependency relationship of the distribution labels.

[0074] It should be noted that, in addition to being used to determine the target source, the distribution rule can also be used to determine the priority of the target source when the target source is a plurality, that is, the distribution order of the target source, and can also be used to define a retransmission rule when the distribution of the semantic analysis result fails.

[0075] S103, sending the semantic analysis result to the target source based on the distribution rule.

[0076] As a possible implementation, after receiving the semantic analysis result, the target source processes according to the content of the semantic analysis result, and returns the processing result. For example, the semantic analysis result is: "time: tomorrow, place A, intent: check the weather", the target source can be a weather query website, and the target source processes according to the received analysis result (such as querying the database, calculating the result), and finally returns the result "tomorrow it will rain in place A.

[0077] S104, obtaining feedback information of the execution result of the target source for the semantic analysis result.

[0078] The feedback information can reflect the performance of the target source processing the semantic analysis result, and usually includes two types of data. One is objective data, for example, which can include: execution success rate, execution time, and completeness of execution result. The other is subjective data, for example, user satisfaction.

[0079] S105, optimizing the distribution mapping relationship based on the feedback information.

[0080] As a possible implementation, based on the feedback information, the priority of the target source in the distribution rule determined by the optimization of the distribution mapping relationship can be optimized.

[0081] In a possible implementation, the priority of the target source can be represented by the weight of the target source. Specifically, the priority of the target source in the distribution rule determined by the optimization of the distribution mapping relationship based on the feedback information can be implemented as follows: determining the initial weight of the target source, and correcting the initial weight of the target source based on the execution success rate and the satisfaction degree to obtain the target weight of the target source, and then adjusting the distribution rule according to the target weight of the target source, so as to adjust the distribution mapping relationship.

[0082] In a possible implementation, the target weight of the target source obtained by correcting the initial weight of the target source based on the execution success rate and the satisfaction degree can be obtained by multiplying the initial weight, the execution success rate and the satisfaction degree.

[0083] For example, when querying the route between place A and place B, the priority (weight) of the first map application in the current distribution rule is higher than that of the second map application. If the user is not satisfied with the route generated by the first map application, or the execution success rate of the first map application is low, the priority (weight) of the first map application can be reduced.

[0084] In a possible implementation, after the target weight of the target source is calculated, whether to adjust the priority of the target source again can be determined through a weight adjustment model. Specifically, the priority of the target source in the distribution rule determined based on the feedback information and the optimization of the distribution mapping relationship can be implemented as follows: a weight adjustment model is determined, the execution success rate and the satisfaction degree of the target source are input into the weight adjustment model, if the result obtained is that the priority of the target source does not need to be updated, the distribution mapping relationship is not adjusted. If the result obtained is that the priority of the target source needs to be updated, the target weight is adjusted based on the target weight.

[0085] Therefore, by determining the distribution tag of the query statement, determining the distribution rule of the semantic analysis result through the mapping of the distribution tag and the distribution rule, and implementing the distribution of the semantic analysis result to the target source, this distribution process does not need to determine which source needs to be called, avoids the distribution of the semantic analysis result to irrelevant sources, thereby shortening the time from the input of the query statement to the distribution. When the source capability, user demand and the like change, the distribution mapping relationship is adjusted through the feedback information, thereby improving the accuracy of the target source, and further improving the processing efficiency of the query statement by shortening the time from the input of the query statement to the distribution and improving the accuracy of the target source.

[0086] In some embodiments, for a query statement without a matched target semantic analysis rule, a vertical domain small model or a large model can be used to implement the analysis of this type of query statement. Figure 2 As shown in S101, the following steps are included:

[0087] S201, in the case where the target semantic analysis rule is not retrieved, detecting whether the query statement is complete.

[0088] As a possible implementation, in the case where the target semantic analysis rule is not retrieved, detecting whether the query statement is valid; in the case where the query statement is invalid, adding a recognition tag to the query statement, the recognition tag being used to represent that the query statement is not subjected to semantic analysis; in the case where the query statement is valid, detecting whether the query statement is complete.

[0089] It should be understood that the premise that the query statement can be subjected to semantic analysis is that the query statement is valid. By detecting whether the query statement is valid, invalid query statements can be filtered in advance, so that the invalid query statements do not enter the subsequent semantic analysis process, thereby avoiding the waste of analysis resources.

[0090] S202, in the case where the query statement is complete, distributing the query statement to a corresponding vertical domain small model according to the domain to which the query statement belongs, so as to perform semantic analysis processing and obtain a semantic analysis result.

[0091] The vertical small model is more accurate in understanding the professional terms, sentence structure and semantic logic in the field to which it belongs. Compared with the general model, it can more accurately extract the professional terms specific to the field to which it belongs, reduce the analysis bias, and thus improve the accuracy of the semantic analysis result. In addition, the parameter size of the vertical small model is small, and for the same query statement, the reasoning speed is fast, the required computing resources are less, and the processing link is shorter, thereby improving the analysis speed of the semantic analysis result.

[0092] As a possible implementation, the field to which the query statement belongs can be determined according to a machine learning model, for example, the machine learning model can be a text classification model. The field to which the query statement belongs is determined based on a decision tree or a rule system to determine the vertical small model corresponding to the field.

[0093] As a possible implementation, in the case where the field to which the query statement belongs is multiple, the query statement is sent to multiple vertical small models for semantic analysis processing to obtain the output results of the multiple vertical small models; the output results of the multiple vertical small models are fused to obtain the semantic analysis result.

[0094] In a possible implementation, the above-mentioned fusion of the output results of the multiple vertical small models to obtain the semantic analysis result can be implemented as follows: the output results of the multiple vertical small models are checked to determine whether the output results of the multiple vertical small models are consistent, in the case where the output results of the multiple vertical small models are consistent, the output results of the multiple vertical small models are determined as the output result of any vertical small model, and in the case where the output results of the multiple vertical small models are inconsistent, the output results of the multiple vertical small models are weighted and summed to obtain the semantic analysis result.

[0095] The weight of each output result of each vertical small model can be determined according to the weight of each vertical small model.

[0096] For example, the field to which the query statement belongs is medical and financial, the query statement is sent to the vertical small models corresponding to medical and financial respectively to obtain 2 output results, and if the 2 output results are inconsistent, the 2 output results are fused by weighting according to the weight of the vertical small model to obtain the semantic analysis result corresponding to the query statement.

[0097] It should be understood that different vertical small models have different focuses, and correspondingly, the processing results generated are also different. By fusing the output results of the multiple vertical small models, a consistent semantic analysis result is obtained, thereby improving the accuracy of the semantic analysis result.

[0098] S203. In the case of an incomplete query statement, the query statement is processed by the large model for semantic analysis to obtain a semantic analysis result.

[0099] In the case of an incomplete query statement, the large model can reasonably complete the missing content based on common sense, context association or user historical interaction information, thanks to its strong context understanding and fuzzy semantic reasoning capability, avoiding analysis failure due to missing information, and ensuring that incomplete queries can also obtain reasonable semantic analysis results.

[0100] It should be noted that the large model is a model obtained by fusing a multi-modal / multi-domain large model, which solves the bottleneck of traditional large models in long context reasoning and implicit semantic analysis, and improves the depth understanding ability of semantics.

[0101] As a possible implementation, the following operations are performed by the large model to obtain the semantic analysis result: the query statement is semantically decomposed to obtain a plurality of sub-statements of the query statement; the plurality of sub-statements are semantically associated to obtain a semantic association result; and the semantic association result is semantically reconstructed to obtain the semantic analysis result.

[0102] In one possible implementation, the above-mentioned semantic decomposition of the query statement to obtain a plurality of sub-statements of the query statement can be implemented as follows: based on the intention reflected by the query statement, the query statement is semantically decomposed to obtain a plurality of sub-statements of the query statement. For example, the query statement is "Please generate a route from location A to location B, and determine whether the weather tomorrow is suitable for travel", which can be split into two sub-statements "generate a route from location A to location B", and "determine whether the weather tomorrow is suitable for travel".

[0103] In one possible implementation, the above-mentioned semantic association of the plurality of sub-statements to obtain a semantic association result can be implemented as follows: the semantic association result between the sub-statements is determined in combination with an external knowledge base or context information.

[0104] It should be understood that the complex query statement can be decomposed into simple sub-statements by semantic decomposition, reducing the difficulty of semantic analysis. The sub-statements are associated and reconstructed, and the sub-statements are integrated into a complete language expression, which not only reflects the real logic of the query statement, but also provides structured input for subsequent processing of the query statement, thereby improving the accuracy of the processing result of the query statement.

[0105] Thus, in the case where the target semantic parsing rule is not retrieved, by judging whether the query statement is complete, the appropriate model is enabled to process the corresponding query statement, the complete query statement is processed by the vertical field small model, the parsing efficiency of the semantic parsing result and the accuracy of the semantic parsing result in a specific field can be improved, the incomplete query statement is processed by the large model, and the reasonable semantic parsing result is obtained by means of the context understanding and fuzzy semantic reasoning capability of the large model.

[0106] In some embodiments, when the target source processes the query statement, there may be a low accuracy of the semantic parsing result itself, even if the target source is highly matched, the execution result of the target source for the semantic parsing result still does not meet the user's demand, and in Figure 1 the case, as shown in Figure 3 the method further includes:

[0107] S301, obtaining the confidence of the semantic parsing result.

[0108] The above S105 includes:

[0109] S302, based on the feedback information and the confidence, jointly optimizing the distribution mapping relationship and the model parameter of the model used to generate the semantic parsing result.

[0110] As a possible implementation manner, based on the feedback information and the confidence of the semantic parsing result, the semantic parsing result is classified, so that according to the type of the semantic parsing result, the distribution mapping relationship and the model parameter of the model used to generate the semantic parsing result are jointly optimized.

[0111] In a possible implementation manner, for the semantic parsing result with high confidence, low execution success rate and low satisfaction, only the distribution mapping relationship can be optimized. The process of optimizing the distribution mapping relationship can refer to the description in the above embodiments, which will not be described here.

[0112] In a possible implementation manner, for the high-confidence semantic parsing result corresponding to the same distribution label, if there are low execution success rate, low satisfaction and high execution success rate, high satisfaction at the same time, the distribution mapping relationship can be refined, that is, the distribution mapping relationship corresponding to the high execution success rate and the high satisfaction is retained, and the distribution mapping relationship corresponding to the low execution success rate and the low satisfaction is adjusted.

[0113] In a possible implementation, for a semantic analysis result with low confidence, low execution success rate, and low satisfaction, the query statement can be re-labeled, and the model parameters of the model for generating the semantic analysis result are adjusted. For a semantic analysis result with high confidence, low execution success rate, and low satisfaction, the matching degree of the semantic analysis result and the target source is analyzed, and if the matching degree is low, the semantic analysis result of the target source requirement is included in the model training, so that the semantic analysis result is more suitable for the target source.

[0114] In this way, by jointly optimizing the distribution mapping relationship and the model parameters of the model for generating the semantic analysis result, the problems of inaccurate model analysis and unmatched distribution are solved, so as to adjust and maintain the dynamic balance of accurate semantic understanding and accurate source distribution through the cooperative optimization of analysis and distribution, and further improve the processing efficiency and quality of the query statement.

[0115] In some embodiments, as shown in Figure 4 the processing architecture of the query statement of the present application includes a pre-processing layer, a semantic processing layer, a distribution mapping layer, and a three-party source layer.

[0116] The pre-processing layer includes a semantic integrity judgment model, a semantic recognition model, and a rule management module. The semantic integrity judgment model is used to evaluate the integrity of the query statement and determine the complexity of subsequent processing. The semantic recognition model is used to identify and filter query statements that do not meet the system processing capability, ensuring that the system does not process invalid or meaningless inputs. The rule management module is used to store a plurality of semantic analysis rules and quickly determine the target semantic analysis rule matching the query statement of the user.

[0117] The semantic processing layer includes a complex semantic understanding fusion large model and a vertical domain distribution small model. The complex semantic understanding fusion large model is used to process complex and incomplete query statements and perform deep semantic analysis. The vertical domain distribution small model is used to process query statements according to the requirements of a specific domain and provide fine-grained processing results.

[0118] The distribution mapping layer includes a semantic fusion module and a semantic distribution mapping table. The semantic fusion module is used to fuse the output results of the complex semantic understanding fusion large model and the vertical domain distribution small model to generate a unified output. The semantic distribution mapping table is used to store the distribution mapping relationship and the distribution rules.

[0119] The three-party source layer includes a basic source and a large model source. The number of each type of source can include multiple, for example, basic source 1, basic source 2, large model source 1, and large model source 2.

[0120] In some embodiments, the processing architecture of the query statement further includes an input data management module for receiving the query statement of the user and performing preliminary preprocessing such as formatting processing, noise filtering, etc.

[0121] In some embodiments, the processing architecture of the query statement can be represented as a directed graph G=(V, E), wherein V represents each module, and E represents the data flow between modules.

[0122] As shown in Figure 5 , the present application proposes another processing method of the query statement, comprising the following steps:

[0123] After the beginning of the flow, the following steps are performed:

[0124] S501, obtaining the query statement input by the user.

[0125] S502, the rule management module determines whether there is a target semantic parsing rule. If yes, S508 is performed, and if no, S503 is performed.

[0126] S503, the semantic recognition model determines whether the query statement is valid. If yes, S504 is performed, and if no, the flow is ended.

[0127] S504, the semantic integrity judgment model determines whether the query statement is complete. If yes, S505 is performed, and if no, S506 is performed.

[0128] S505, determining the semantic parsing result based on the vertical field distribution small model.

[0129] S506, determining the semantic parsing result based on the complex semantic understanding fusion large model.

[0130] S507, the semantic fusion module fuses the output results of the models.

[0131] S508, determining the distribution rule of the semantic parsing result based on the semantic distribution mapping table.

[0132] S509, determining the target information source based on the distribution rule.

[0133] S510, the target information source outputs the processing result of the query statement.

[0134] The flow is ended.

[0135] As shown in Figure 6 , the present application determines whether the query statement is complete, comprising the following steps:

[0136] S601, obtaining the query statement input by the user.

[0137] S602, searching the target semantic parsing rule matched with the characteristics of the query statement from a plurality of semantic parsing rules, and determining the semantic parsing result of the query statement based on the target semantic parsing rule.

[0138] S603, if there is no target semantic analysis rule, determine whether the query statement is valid, if not, directly return the rejection result.

[0139] S604, determine whether the query statement that is not rejected is complete.

[0140] The above mainly introduces the scheme provided by the embodiments of the application from the perspective of the method. In order to realize the above functions, the processing device of the query statement or the electronic device contains the hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed in the present application, the application can be realized in the form of hardware or the combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driven hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the application.

[0141] The embodiments of the application can divide the functional modules of the processing device of the query statement or the electronic device according to the above method, for example, the processing device of the query statement or the electronic device can include each functional module corresponding to each functional division, or two or more functions can be integrated in one processing module. The above integrated module can be realized in the form of hardware or in the form of software functional module. It should be noted that the division of modules in the embodiments of the application is illustrative, and is only a logical functional division. When actually implemented, there can be another division method.

[0142] In some embodiments, with reference to Figure 7 The processing device of the query statement 700 provided by the embodiments of the application includes a determination unit 701 and a processing unit 702.

[0143] The determination unit 701 is configured to acquire the query statement input by a user, determine the semantic analysis result of the query statement, and distribute the label.

[0144] The processing unit 702 is configured to determine the distribution rule of the semantic analysis result based on the distribution label of the query statement and the distribution mapping relationship, wherein the distribution mapping relationship is the mapping relationship between the distribution label of the query statement and the distribution rule; the distribution rule is at least used to indicate the target source of distribution from a plurality of sources; based on the distribution rule, the semantic analysis result is sent to the target source; the feedback information of the execution result of the target source for the semantic analysis result is acquired; and based on the feedback information, the distribution mapping relationship is optimized.

[0145] In some embodiments, the processing unit 702 is further configured to obtain feedback information of an execution result of the semantic parsing result by the target source; and optimize the distribution mapping relationship based on the feedback information.

[0146] In some embodiments, the determining unit 701 is specifically configured to determine a feature of the query statement; search for whether there is a target semantic parsing rule matching the feature of the query statement from a plurality of semantic parsing rules; and in a case where the target semantic parsing rule is searched, determine the semantic parsing result of the query statement based on the target semantic parsing rule.

[0147] In some embodiments, the determining unit 701 is further configured to, in a case where the target semantic parsing rule is not searched, detect whether the query statement is complete; in a case where the query statement is complete, distribute the query statement to a corresponding vertical field small model for semantic parsing processing according to a field to which the query statement belongs, to obtain the semantic parsing result; and in a case where the query statement is not complete, perform semantic parsing processing on the query statement by a large model to obtain the semantic parsing result.

[0148] In some embodiments, the determining unit 701 is specifically configured to, in a case where the target semantic parsing rule is not searched, detect whether the query statement is valid; in a case where the query statement is invalid, add a rejection label to the query statement, the rejection label being used to represent that the query statement is not subjected to semantic parsing; and in a case where the query statement is valid, detect whether the query statement is complete.

[0149] In some embodiments, the determining unit 701 is specifically configured to, in a case where the field to which the query statement belongs is a plurality of fields, distribute the query statement to a plurality of vertical field small models for semantic parsing processing to obtain output results of the plurality of vertical field small models; and fuse the output results of the plurality of vertical field small models to obtain the semantic parsing result.

[0150] In some embodiments, the determining unit 701 is specifically configured to perform the following operations by the large model to obtain the semantic parsing result: perform semantic decomposition on the query statement to obtain a plurality of sub-statements of the query statement; perform semantic association on the plurality of sub-statements to obtain a semantic association result; and perform semantic reconstruction on the semantic association result to obtain the semantic parsing result.

[0151] In some embodiments, the processing unit 702 is further configured to obtain a confidence degree of the semantic parsing result; and jointly optimize the distribution mapping relationship and model parameters of a model used to generate the semantic parsing result based on the feedback information and the confidence degree.

[0152] In some embodiments, the determining unit 701 is specifically configured to determine a distribution label of the query statement based on the semantic parsing result of the query statement.

[0153] As shown in Figure 8 The electronic device 800 provided by the embodiment of the present application includes but is not limited to a processor 801 and a memory 802.

[0154] The memory 802 is configured to store executable instructions of the processor 801. It can be understood that the processor 801 is configured to execute the instructions to implement the method in the above embodiment.

[0155] It should be noted that the person skilled in the art can understand Figure 8 The structure of the electronic device shown in the above embodiment does not constitute a limitation on the electronic device, and the electronic device can include more or fewer components than those shown in the above embodiment, or combine some components, or arrange different components. Figure 8

[0156] The processor 801 is the control center of the electronic device, and connects all parts of the electronic device through various interfaces and lines. The processor 801 executes software programs and / or modules stored in the memory 802 and calls data stored in the memory 802 to perform various functions of the electronic device and process data, thereby monitoring the whole electronic device. The processor 801 can include one or more processing units. Optionally, the processor 801 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the modem processor can also not be integrated into the processor 801.

[0157] The memory 802 can be used to store software programs and various data. The memory 802 can mainly include a program storage area and a data storage area, wherein the program storage area can store the operating system, application programs (such as determination unit, processing unit, etc.) required by at least one function module, etc. In addition, the memory 802 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device, flash memory device, or other volatile solid-state memory device.

[0158] In the exemplary embodiment, a vehicle including the electronic device is also provided, and the vehicle is used to implement the method in the above embodiment.

[0159] In the exemplary embodiment, a computer readable storage medium including instructions is also provided, for example, the memory 802 including instructions, and the instructions can be executed by the processor 801 of the electronic device 800 to implement the method in the above embodiment.

[0160] In actual implementation, Figure 7 The functions of the determination unit 701 and the processing unit 702 in the above embodiment can be implemented by Figure 8 ​The processor 801 in the computer program product stored in the memory 802 is called to realize the computer program. The specific execution process can refer to the description of the method part in the above embodiment, which will not be repeated here.

[0161] Optionally, the computer readable storage medium can be a non-transitory computer readable storage medium, for example, the non-transitory computer readable storage medium can be a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), a magnetic tape, a floppy disk and an optical data storage device, etc.

[0162] In the exemplary embodiments, the embodiments of the present application also provide a computer program product comprising one or more instructions executable by a processor of an electronic device to complete the method in the above embodiments.

[0163] It should be noted that the instructions in the above computer readable storage medium or the one or more instructions in the computer program product are executed by the processor of the electronic device to realize the various processes of the above method embodiments, and can achieve the same technical effects as the above method. To avoid repetition, it will not be repeated here.

[0164] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of functional modules is taken as an example for illustration, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0165] In several embodiments provided by the present application, it should be understood that the disclosed device and method can be implemented by other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules or units is only a logical function division, and there can be another division way in actual implementation, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.

[0166] The units described as separate components may or may not be physically separate, and the components displayed as units may be a physical unit or multiple physical units, that is, may be located in one place, or also can be distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment of the present application.

[0167] In addition, each functional unit in various embodiments of the present application can be integrated in one processing unit, or each unit can be physically present alone, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0168] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application essentially or the part of the prior art that contributes to the technical solutions or the whole or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for causing an apparatus (which can be a single-chip microcomputer, a chip, etc.) or a processor to perform all or part of the steps of the various embodiments of the method of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, and various program code storage media.

[0169] The above embodiments are only preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. The equivalent replacements or transformations of the skilled in the art on the basis of the present application are within the protection scope of the present application.

Claims

1. A method for processing query statements, characterized in that, The method includes: Obtain the query statement input by the user, determine the semantic parsing result of the query statement and the distribution tag; Based on the distribution tags and distribution mapping relationships of the query statement, the distribution rules for the semantic parsing results are determined; wherein, the distribution mapping relationship is the mapping relationship between the distribution tags of the query statement and the distribution rules; the distribution rules are used at least to indicate the target information source for distribution from multiple information sources; Based on the distribution rules, the semantic parsing result is sent to the target information source; Obtain feedback information on the execution results of the target information source in response to the semantic parsing results; the feedback information includes objective data and subjective data, and the objective data includes at least one of the following: execution success rate, execution time, and completeness of execution results; Based on the feedback information, the distribution mapping relationship is optimized; Determining the semantic parsing result of the query statement includes: Determine the characteristics of the query statement; Search among multiple semantic parsing rules to determine if there exists a target semantic parsing rule that matches the features of the query statement; If the target semantic parsing rule is not found, check whether the query statement is complete; If the query statement is complete, it is distributed to the corresponding vertical domain mini-model for semantic parsing processing according to the domain to which the query statement belongs, and the semantic parsing result is obtained. In the case of an incomplete query statement, the query statement is semantically parsed using a large model to obtain the semantic parsing result.

2. The method according to claim 1, characterized in that, Determining the semantic parsing result of the query statement includes: If the target semantic parsing rule is retrieved, the semantic parsing result of the query statement is determined based on the target semantic parsing rule.

3. The method according to claim 1, characterized in that, The step of detecting whether the query statement is complete when the target semantic parsing rule is not found includes: If the target semantic parsing rule is not found, check whether the query statement is valid; If the query statement is invalid, a rejection tag is added to the query statement. The rejection tag is used to indicate that the query statement will not be semantically parsed. If the query statement is valid, check whether the query statement is complete.

4. The method according to claim 1, characterized in that, The step of distributing the query statement to the corresponding vertical domain mini-model for semantic parsing processing based on the domain to which the query statement belongs, and obtaining the semantic parsing result, includes: When the query statement belongs to multiple domains, the query statement is sent to multiple vertical domain mini-models for semantic parsing processing to obtain the output results of the multiple vertical domain mini-models; The outputs of the multiple vertical domain small models are fused to obtain the semantic parsing result.

5. The method according to claim 1, characterized in that, The semantic parsing process performed on the query statement using a large model to obtain the semantic parsing result includes: The semantic parsing result is obtained by performing the following operations on the large model: The query statement is semantically decomposed to obtain multiple sub-statements of the query statement; Perform semantic association on the multiple sub-statements to obtain the semantic association result; The semantic association result is semantically reconstructed to obtain the semantic parsing result.

6. The method according to claim 1, characterized in that, The method further includes: Obtain the confidence level of the semantic parsing result; The step of optimizing the distribution mapping relationship based on the feedback information includes: Based on the feedback information and the confidence level, the distribution mapping relationship and the model parameters of the model used to generate the semantic parsing results are jointly optimized.

7. The method according to claim 1, characterized in that, Determining the distribution tag of the query statement includes: Based on the semantic parsing results of the query statement, the distribution tag of the query statement is determined.

8. A query statement processing apparatus, characterized in that, include: The determining unit is used to obtain the query statement input by the user, determine the semantic parsing result of the query statement and the distribution tag; A processing unit is configured to determine the distribution rules for the semantic parsing results based on the distribution tags and distribution mapping relationships of the query statement; wherein the distribution mapping relationship is a mapping relationship between the distribution tags of the query statement and the distribution rules; the distribution rules are used to indicate the target information source for distribution from at least multiple information sources; based on the distribution rules, the semantic parsing results are sent to the target information source; feedback information on the execution results of the target information source in response to the semantic parsing results is obtained; the feedback information includes objective data and subjective data, the objective data including at least one of the following: execution success rate, execution time, and completeness of execution results; and the distribution mapping relationship is optimized based on the feedback information. The determining unit is specifically used to determine the features of the query statement; search among multiple semantic parsing rules to find whether there is a target semantic parsing rule that matches the features of the query statement; if no target semantic parsing rule is found, detect whether the query statement is complete; if the query statement is complete, distribute the query statement to the corresponding vertical domain small model for semantic parsing processing according to the domain to which the query statement belongs, and obtain the semantic parsing result; if the query statement is incomplete, perform semantic parsing processing on the query statement through a large model to obtain the semantic parsing result.

9. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the method as described in any one of claims 1-7.

10. A vehicle, characterized in that, include: The electronic device according to claim 9.

11. A computer-readable storage medium, characterized in that, When the computer-executable instructions stored in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is capable of performing the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Database information query method and device, equipment and storage medium

    CN119396857A

  • Data query method and device based on cloud search service, equipment and medium

    CN120492482A