Natural language query method and device in power field, terminal equipment and storage medium
By combining historical context with semantic disambiguation and causal graph optimization in the natural language query system in the power field, SQL statements that conform to the power business logic are generated, which solves the problems of insufficient query intent recognition and logic in existing technologies and improves the accuracy and interpretability of queries.
Patent Information
- Application Number
- CN202511325903.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-17
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-09-17
AI Technical Summary
Existing natural language query systems in the power sector are unable to effectively combine historical context for semantic disambiguation, making it difficult to identify users' progressive query intentions and unable to support complex power business query needs. The generated structured query statements lack logic and precision, reducing the accuracy and interpretability of the query results.
By receiving natural language query statements input by users, using historical context for semantic disambiguation, building prompt words and inputting them into a large language model to generate SQL statements, building a causal graph and optimizing SQL statements, the accuracy and explainability of the query are improved.
It achieves accurate parsing of complex semantic structures, improves the coverage and accuracy of intent recognition, and the generated SQL statements meet the actual needs of power scenarios in terms of syntax and business logic, significantly enhancing the accuracy and reliability of query results.
Smart Images

Figure CN120804145A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of natural language processing, and in particular to a power field natural language query method and device, a terminal device and a storage medium. BACKGROUND
[0002] With the continuous development of smart grids and power information systems, users' interaction needs in scenarios such as operation and maintenance scheduling, device alarm analysis, index query and historical event tracing gradually shift from traditional form-based queries to more flexible natural language queries.
[0003] However, the existing natural language query system still has obvious deficiencies in the power field: on the one hand, most systems use a single round of interaction architecture, which cannot combine historical context for semantic disambiguation, making it difficult to accurately identify users' progressive query intentions in multi-round conversations; on the other hand, power businesses involve a large number of professional terms, complex index links and cross-event causal relationships, and existing methods mostly rely on static rules or keyword matching, making it difficult to support complex query needs under users' free expression. In addition, in the power scenario, queries often go beyond data retrieval and involve potential causal reasoning between variables. Existing technologies often ignore the impact of potential causal relationships when generating structured query statements, resulting in structured query statements that lack logic and accuracy, ultimately reducing query result accuracy and explainability.
[0004] Therefore, how to improve the accuracy of power data queries in the power field is a technical problem that needs to be solved at present. SUMMARY
[0005] The present application provides a power field natural language query method, which can solve the problem of low accuracy of power data queries in the power field in the prior art.
[0006] An embodiment of the present application provides a power field natural language query method, comprising: receiving a natural language query sentence input by a user, performing semantic disambiguation on the natural language query sentence according to historical context of the natural language query sentence, and obtaining a target entity; constructing a prompt word according to the natural language query sentence, the target entity and a preset task target, and inputting the prompt word into a pre-trained large language model to obtain a first SQL statement; executing the first SQL statement to obtain structured business data, and constructing a first causal graph according to the structured business data; optimizing the first SQL statement according to the causal graph to obtain a second SQL statement, executing the second SQL statement to obtain a query result.
[0007] Compared with the prior art, the above-mentioned embodiments have the following beneficial effects: by introducing historical context, the natural language query statement input by the current user is semantically disambiguated, effectively solving the problems of ambiguous expression, unclear reference and context dependence in the continuous query process of the user, realizing accurate analysis of complex semantic structure, and significantly improving the coverage and accuracy of intent recognition. Further, by introducing adaptively generated prompt words, the system can automatically generate the most semantically consistent query prompts according to the current dialogue state and target entity, effectively guiding the large language model to generate a complete structure and semantically consistent SQL expression, improving the accuracy of the generated SQL statement and the consistency of the business meaning in the complex constraint and multi-variable interaction scene. Finally, by querying the business data obtained by the first SQL statement to construct the first causal graph, the logical path between the implied relationship and the variable in the query process is inferred, so that the system has the ability of causal reasoning, and the first SQL statement is optimized based on the first causal graph to generate a second SQL statement that is more consistent with the business logic, further improving the accuracy and explainability of the query result.
[0008] Further, the semantic disambiguation of the natural language query statement according to the historical context of the natural language query statement obtains a target entity, comprising: calculating a first semantic similarity between the natural language query statement and the corresponding historical context; when the first semantic similarity exceeds a first threshold, extracting a plurality of candidate entities from the natural language query statement; calculating a second semantic similarity between each of the candidate entities and the natural language query statement, and selecting the candidate entity with the highest second semantic similarity as the target entity.
[0009] Compared with the prior art, the above-mentioned embodiments have the following beneficial effects: by calculating the first semantic similarity between the natural language query statement and the historical context, it is determined whether the natural language query statement input by the current user is an intent continuation of the historical context according to the first semantic similarity. When it is determined that the natural language query statement input by the current user is an intent continuation of the historical context, the candidate entities are further extracted and identified from the natural language query statement, the second semantic similarity between each candidate entity and the natural language query statement is calculated, and the candidate entity with the highest second semantic similarity is selected as the target entity from the candidate entities, thereby avoiding the noise influence of invalid candidate entities on the subsequent query statement generation, realizing semantic accurate disambiguation, and improving the target locking accuracy in the query process.
[0010] Further, the construction of the prompt word according to the natural language query statement, the target entity and the preset task target, and the input of the prompt word into the pre-trained large language model to obtain the first SQL statement, comprises: when the first semantic similarity exceeds a first threshold value, concatenating the natural language query statement and the corresponding historical context to obtain a first concatenation result, and encoding the first concatenation result through a pre-trained language representation model to obtain a query intent vector; According to the embedding vector representation of the target entity and the preset task target, and the query intent vector, a prompt word guide vector is constructed; The prompt word guide vector is decoded into a prompt word template, and the prompt word is generated according to the prompt word template; Concatenate the embedding vector representation corresponding to the prompt word, the natural language query statement and the historical context respectively to obtain a second concatenation result, and input the second concatenation result into the large language model to obtain the first SQL statement.
[0011] Compared with the prior art, the above embodiment has the following beneficial effects: by concatenating the vector representations of the historical context, the natural language statement and the target entity, the system can better capture the real query intent of the user, and then generate a prompt word template with better semantic fit. Further, the prompt word is generated through the prompt word template. Since the prompt word template supports dynamic slot filling, multiple expression style generation and context binding, the generated prompt word can improve the understanding accuracy of the query scene and user intent of the language model. Finally, the embedding vectors corresponding to the prompt word, the natural language query statement and the historical context are concatenated, which improves the comprehensiveness of the information input into the large language model, thereby improving the accuracy and comprehensiveness of the first SQL statement generation.
[0012] Further, the second concatenation result is input into the large language model to obtain the first SQL statement, comprising: The second concatenation result is input into the large language model and transmitted to the forward layer of the large language model in a multi-modal embedding manner to obtain a plurality of candidate structured query semantic expressions; For each of the candidate structured query semantic expressions, a corresponding third SQL statement is constructed; The third SQL statement with the highest business consistency and context relevance is taken as the first SQL statement.
[0013] Compared with the prior art, the above-mentioned embodiment has the following beneficial effects: by introducing a multi-modal embedding mode, the second splicing result is input to the forward layer of the large language model, and a plurality of candidate structured query expressions are generated, and then screened in combination with business consistency and context relevance, thereby establishing multiple alternative paths in the SQL generation process, thereby avoiding the error risk caused by a single candidate. At the same time, by using the context relevance and business logic consistency as the screening standard, it is ensured that the finally generated first SQL statement is not only correct in syntax, but also meets the real needs of the power scene in business logic, effectively improving the fault tolerance and robustness of the system to complex natural language input, making the SQL generation result more stable and reliable, thereby significantly enhancing the accuracy and practicality of the query.
[0014] Further, the executing the first SQL statement, obtaining structured business data, and constructing a first causal graph according to the structured business data, comprises: constructing a causal node set according to the structured business data, and performing causal structure search on the causal node set through a preset algorithm to obtain a second causal graph; performing causal edge constraint on the second causal graph according to a preset domain business rule to obtain a third causal graph; setting confidence weights of each causal edge in the second causal graph by evaluating the correlation between each two adjacent nodes in the third causal graph, to obtain the first causal graph.
[0015] Compared with the prior art, the above-mentioned embodiment has the following beneficial effects: based on the relatively comprehensive structured business data obtained by querying the preliminarily generated first SQL statement, the causal nodes are constructed to ensure the comprehensiveness of the finally generated first causal graph. Further, by domain rule constraint, the potential causal relationship between different business variables is revealed, thereby further optimizing the structure of the second causal graph and improving the interpretability and logical consistency of the finally obtained first causal graph. Finally, by judging the correlation between nodes, the confidence weights of each causal edge are set to provide a basis for subsequent path screening, thereby improving the optimization efficiency and accuracy of the first SQL statement.
[0016] Further, the optimizing the first SQL statement according to the causal graph to obtain a second SQL statement, comprises: querying all causal paths to which a target field corresponding to the first SQL statement belongs in the first causal graph; for each of the causal paths, evaluating an effectiveness score of the corresponding causal path according to the confidence weights of each causal edge in the causal path; screening the first causal path with the highest effective score from all the causal paths, and optimizing the first SQL statement according to the first causal path to obtain the second SQL statement.
[0017] Compared with the prior art, the above embodiment has the following beneficial effects: by searching all causal paths related to the query target, calculating the effectiveness score according to the confidence weight, and finally selecting the optimal causal path to correct the first SQL statement, low correlation or noise paths in the causal graph are eliminated, the execution efficiency of the SQL statement correction process is improved, and the second SQL statement finally generated is closer to the real business logic. The optimized first SQL statement can better reflect the real intention of the user, reduce the deviation between the query result and the expectation, and thus improve the accuracy and reliability of the query. In particular, in the complex dependence scenario of power data, the above method can guarantee that the query result has higher logical self-consistency and decision reference value.
[0018] Further, the evaluation of the effectiveness score of the corresponding causal path according to the confidence weight of each causal edge in the causal path comprises: The calculation formula of the effectiveness score is specifically: wherein, is the effectiveness score of the causal path; is the causal path; represents a causal edge between two connected causal nodes in the causal path, is the starting causal node of the causal edge, is the ending causal node of the causal edge; represents and the confidence weight of the causal edge between and ; represents or whether has appeared in the historical context or the natural language query statement, if it appears, then , if it does not appear, then .
[0019] Compared with the prior art, the above embodiment has the following beneficial effects: by judging whether the nodes at both ends of the causal edge appear in the historical context or the natural language query statement, the relevance of the causal edge to the user's target query intention is judged, and the effectiveness score of the entire causal path is calculated based on this, so that the actual contribution of different causal paths is more reasonably evaluated, and the effectiveness of the finally selected causal path is improved.
[0020] Another embodiment of the present application also provides an electric power field natural language query device, comprising: a semantic disambiguation module, a first SQL statement acquisition module, a first causal graph construction module, and a first SQL statement optimization module. The semantic disambiguation module is configured to receive a natural language query statement input by a user, perform semantic disambiguation on the natural language query statement according to historical context of the natural language query statement, and obtain a target entity. The first SQL statement acquisition module is configured to construct a prompt word according to the natural language query statement, the target entity, and a preset task target, input the prompt word into a pre-trained large language model, and obtain a first SQL statement. The first causal graph construction module is configured to execute the first SQL statement, obtain structured business data, and construct a first causal graph according to the structured business data. The first SQL statement optimization module is configured to optimize the first SQL statement according to the causal graph, obtain a second SQL statement, execute the second SQL statement, and obtain a query result.
[0021] Another embodiment of the present application also provides a terminal device, comprising: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements steps of the electric power field natural language query method of the present application when executing the computer program.
[0022] Another embodiment of the present application also provides a computer readable storage medium item, comprising: a stored computer program, wherein the computer program controls a device where the computer readable storage medium is located to execute steps of the electric power field natural language query method of the present application when the computer program is running. BRIEF DESCRIPTION OF DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0024] Figure 1 A flowchart of an electric power field natural language query method provided in some embodiments of the present application; Figure 2 A structural diagram of an electric power field natural language query device provided in some embodiments of the present application. DETAILED DESCRIPTION
[0025] In order to make the objects, technical solutions and advantages of the present application clearer, the following will clearly and completely describe the technical solutions in the present application in conjunction with the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of this application; the use of the terms "including," "comprising," "having" and "with" and any variations thereof in this specification and in the claims are intended to cover both the inclusive and exclusive cases.
[0027] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "a plurality of" is two or more, unless otherwise explicitly and specifically limited.
[0028] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearance of the phrase in various places in the specification does not necessarily all refer to the same embodiment, nor is it necessarily independent or alternative embodiments to other embodiments. Those skilled in the art explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0029] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " in this paper generally represents that the front and rear associated objects are a "or" relationship.
[0030] In the description of the embodiments of the present application, the term "a plurality of" refers to two or more (including two), and similarly, "a plurality of groups" refers to two or more groups (including two groups), and "a plurality of pieces" refers to two or more pieces (including two pieces).
[0031] In the description of the embodiments of the present application, unless otherwise explicitly specified and limited, the technical terms "mounting", "connection", "connecting", "fixing" and the like should be understood in a broad sense, for example, can be fixed connection, can also be detachable connection, or integral; can be mechanical connection, can also be electrical connection; can be direct connection, can also be indirect connection through an intermediate medium, can be internal communication of two elements or interaction relationship between two elements. For those skilled in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.
[0032] The existing natural language query system still has the following deficiencies in the power field: on the one hand, most systems adopt a single round of interaction architecture, which cannot combine historical context for semantic disambiguation, resulting in that the progressive query intention of the user in multi-round dialogue is difficult to be accurately identified; on the other hand, the power business involves a large number of professional terms, complex index links and cross-event causal relationships, and most of the existing methods rely on static rules or keyword matching, which is difficult to support the complex query demand under the free expression of the user. In addition, in the power scene, the query often not only stays at the data retrieval level, but also contains potential causal reasoning between variables, and the existing technology often ignores the influence of potential causal relationship when generating a structured query statement, so that the generated structured query statement often lacks logic and accuracy, finally reducing the accuracy and explainability of the query result.
[0033] Please refer to Figure 1 To solve the problem of low accuracy of power data query in the power field in the prior art, a natural language query method in the power field provided by the embodiments of the present application includes S101 to S104: S101: receiving a natural language query sentence input by a user, performing semantic disambiguation on the natural language query sentence according to historical context of the natural language query sentence, and obtaining a target entity.
[0034] Preferably, in some embodiments of the present application, before S101 is performed, it further includes: constructing a semantic knowledge base in the power field; and maintaining the context state of multi-round dialogue.
[0035] Preferably, in some embodiments of the present application, the power field semantic knowledge base is constructed, including: collecting power system operation and maintenance data, equipment archives, index logs, and event records, and other multi-source information, performing unified formatting processing, removing missing items and redundant fields, and converting into standard structured business data; uniformly normalizing naming of all entity class fields in the structured business data (such as “transformer”, “trip event”, “line number”), constructing a domain term label library, forming an entity dictionary, an attribute dictionary, and a relationship set; constructing triples (h, r, t) based on the logical, spatial, and causal relationships between entities, where h is an entity, t is a tail entity, and r is the relationship between h and r, for example, (“trip event”, “occurs in”, “transformer A”), (“line loss”, “measurement unit”, “percentage”); converting the triples into a directed graph form, storing in a graph database to form a queryable semantic knowledge base; designing a query interface based on SPARQL (SPARQL Protocol and RDF Query Language) and built-in fuzzy matching mechanism, and improving the alignment capability for natural language fuzzy keywords through entity vector embedding and semantic similarity sorting, wherein the entity vector embedding can use embedding methods such as TransE, DistMult, etc.
[0036] Preferably, in some embodiments of the present application, the context state of the multi-round dialogue is maintained, including: receiving a natural language query sentence input by a user, performing word segmentation, part-of-speech tagging, and named entity recognition on the natural language query sentence to obtain preliminary semantic units; concatenating the natural language query sentence input by the current user with historical context to form a multi-round dialogue semantic chain, and constructing a representation vector of the historical context through a Transforme model; establishing a user intent trajectory table and an entity interaction record table to record intent keywords, domain entities, time ranges, and superordinate and subordinate reference relationships of each round, respectively, for supporting semantic inheritance, reference tracing, and intermediate entity completion during multi-round reasoning; in a dialogue exceeding a predefined maximum number of rounds, using a sliding window strategy to crop early historical context, and performing abstract compression on the early historical context through a semantic compression network (such as a bidirectional gated recurrent unit) to extract an abstract vector with the most information to reduce noise interference.
[0037] Further, in some embodiments of the present application, the semantic disambiguation of the natural language query sentence according to the historical context of the natural language query sentence obtains a target entity, including: calculating a first semantic similarity between the natural language query sentence and the historical context corresponding to the natural language query sentence; when the first semantic similarity exceeds a first threshold, extracting a plurality of candidate entities from the natural language query sentence; calculate a second semantic similarity between each of the candidate entities and the natural language query sentence, and take the candidate entity with the highest second semantic similarity as the target entity.
[0038] Preferably, in some embodiments of the present application, before the calculating the first semantic similarity between the natural language query sentence and the historical context, the method further comprises: performing semantic encoding on the natural language query sentence and the historical context to obtain respective semantic vectors of the natural language query sentence and the historical context, and ensuring that the dimensions of the semantic vectors are consistent. The model used for semantic encoding can be a context-aware language model such as BERT or RoBERTa, and the present application does not limit the model used.
[0039] Preferably, in some embodiments of the present application, the first semantic similarity between the natural language query sentence and the historical context is calculated by the following formula: wherein, is the natural language query sentence; is the historical context; is the first semantic similarity; is the semantic vector of the natural language query sentence; is the semantic vector of the historical context; is the norm of the vector.
[0040] Preferably, in some embodiments of the present application, when the first semantic similarity exceeds the first threshold, a plurality of candidate entities are extracted from the natural language query sentence, including: when the first semantic similarity exceeds the first threshold, it is considered that the natural language query sentence has the same intent as the historical context, i.e., it is considered as a continuation of the historical intent, at this time a plurality of candidate entities are extracted from the natural language query sentence, including entity objects (such as devices, regions), attribute fields (such as voltage, current) and query actions (such as trend change, anomaly detection). The extraction method of the candidate entities is: according to the lexical rules, the labels of each entity in the power field semantic knowledge base constructed before step S101, and the mapping table between the entity and the label, three verifications are performed to improve the accuracy of candidate entity recognition. The identified candidate entities are compared with the labels of the standard entities in the power field semantic knowledge base, and a graph embedding similarity matching mechanism is used for fuzzy entity alignment and ambiguity elimination.
[0041] Preferably, in some embodiments of the present application, the second semantic similarity between each candidate entity and the natural language query is calculated, and the candidate entity with the highest second semantic similarity is used as the target entity. The calculation is performed using the above-mentioned formula for calculating the first semantic similarity, and it is only necessary to replace the semantic vector of the natural language query with the embedding vector representation of the candidate entity. The embedding vector representation of the candidate entity is generated from the power domain semantic knowledge base using an entity embedding model.
[0042] The present application calculates a first semantic similarity between a natural language query statement and a historical context, and determines whether the natural language query statement input by the current user is an intended continuation of the historical context based on the first semantic similarity. After determining that the natural language query statement input by the current user is an intended continuation of the historical context, the application further extracts and identifies each candidate entity from the natural language query statement, calculates a second semantic similarity between each candidate entity and the natural language query statement, and selects the candidate entity with the second semantic similarity from the candidate entities as the target entity, thereby avoiding the noise influence of invalid candidate entities on the generation of subsequent query statements, achieving precise semantic disambiguation, and improving the target locking accuracy during the query process.
[0043] S102: Construct prompt words according to the natural language query statement, the target entity and the preset task goal, and input the prompt words into a pre-trained large language model to obtain a first SQL statement.
[0044] Furthermore, in some embodiments of the present application, constructing a prompt word based on the natural language query statement, the target entity, and the preset task goal, and inputting the prompt word into a pre-trained large language model to obtain a first SQL statement includes: When the first semantic similarity exceeds a first threshold, concatenating the natural language query statement with the corresponding historical context to obtain a first concatenation result, and encoding the first concatenation result using a pre-trained language representation model to obtain a query intent vector; Constructing a prompt word guide vector based on the embedding vector representation of the target entity and the preset task goal, and the query intent vector; Decoding the prompt word guide vector into a prompt word template, and generating the prompt word according to the prompt word template; The prompt word, the natural language query statement, and the embedding vector representation corresponding to the historical context are concatenated to obtain a second concatenation result, and the second concatenation result is input into the large language model to obtain the first SQL statement.
[0045] Preferably, in some embodiments of the present application, the splicing the natural language query statement and the corresponding historical context to obtain a first splicing result, and encoding the first splicing result through a pre-trained language representation model to obtain a query intent vector, comprises: the language representation model can be a BERT model, inputting the spliced natural language query statement and the corresponding historical context into the pre-trained BERT model, and extracting the query intent vector from the output vector representation of the last hidden layer of the BERT model.
[0046] Preferably, in some embodiments of the present application, the constructing a prompt word guide vector according to the embedding vector representation of the target entity and the preset task target, and the query intent vector, comprises: The prompt word guide vector is generated through a linear fusion mechanism, and the specific formula is as follows: Wherein, is the prompt word guide vector; is the query intent vector; is the embedding vector representation of the target entity; is the embedding vector of the preset task target, representing the overall target of the current query task; is a weight system, wherein, , and .
[0047] Preferably, in some embodiments of the present application, the decoding the prompt word guide vector into a prompt word template, and generating the prompt word according to the prompt word template, comprises: decoding the prompt word guide vector into a natural language template, generating a plurality of prompt words with high semantic consistency and strong task relevance through interpolation filling, language variant conversion and other means; scoring the credibility of the generated plurality of prompt word candidates, and preferentially selecting the one closest to the historical high feedback example as the final input prompt word to improve the recognition accuracy of the complex intent of the large language model.
[0048] The present application splices the vector representations of the historical context, the natural language statement and the target entity, so that the system can better capture the real query intent of the user, and further generate a prompt word template with higher semantic fitting degree. Further, the prompt word is generated through the prompt word template, and since the prompt word template supports dynamic slot filling, generation of multiple expression styles and context binding, the generated prompt word can improve the understanding accuracy of the query scene and the user intent of the language model. Finally, the embedding vectors of the prompt word, the natural language query statement and the historical context are spliced, the comprehensiveness of the information input into the large language model is improved, and the accuracy and comprehensiveness of the first SQL statement generation are improved.
[0049] Further, in some embodiments of the present application, the inputting the second spliced result into the large language model to obtain the first SQL statement comprises: inputting the second spliced result into the large language model to pass to the forward layer of the large language model in a multi-modal embedding manner to obtain a plurality of candidate structured query semantic expressions; constructing a corresponding third SQL statement for each of the candidate structured query semantic expressions; selecting the third SQL statement with the highest business consistency and context relevance as the first SQL statement.
[0050] Preferably, in some embodiments of the present application, the candidate structured query semantic expression output by the large language model includes query components such as table name, field, connection condition, filtering constraint, and sorting rule. The candidate structured query semantic expression is output in natural language form.
[0051] Preferably, in some embodiments of the application, the constructing a corresponding third SQL statement for each of the candidate structured query semantic expressions comprises: performing semantic analysis and syntax normalization on each of the candidate structured query semantic expressions to extract key elements such as fields, table names, and filtering logic to obtain a corresponding query expression tree; combining data table structure, field type, and entity relationship of the power field semantic knowledge base to perform completion processing on the query expression tree (for example, filling in the default range for missing filtering conditions, judging the data type of ambiguous fields, and introducing context entities to supplement the connection relationship); and constructing a third SQL statement of the corresponding candidate structured query semantic according to the query expression tree.
[0052] Preferably, in some embodiments of the application, the selecting the third SQL statement with the highest business consistency and context relevance as the first SQL statement comprises: selecting the third SQL statement with the highest score as the first SQL statement based on a business consistency and context relevance scoring function, and if it is a multi-round query, supporting inheritance of the intermediate result or filtering condition of the previous round statement; and pre-verifying the obtained first SQL statement, including syntax verification, field legality check, and data source binding legality detection, and if the first SQL statement does not meet the verification requirements, re-generating a prompt word and re-constructing the first SQL statement according to the re-generated prompt word.
[0053] The application inputs the second splicing result into a large language model forward layer by introducing a multi-modal embedding method, generates a plurality of candidate structured query expressions, and screens them in combination with business consistency and context relevance, thereby establishing multiple alternative paths in the SQL generation process, thereby avoiding the error risk caused by a single candidate. At the same time, the context relevance and business logic consistency are used as screening criteria to ensure that the final generated first SQL statement is not only grammatically correct, but also meets the real needs of the power scene in terms of business logic, effectively improving the fault tolerance and robustness of the system to complex natural language input, making the SQL generation result more stable and reliable, thereby significantly enhancing the accuracy and practicality of the query.
[0054] S103: executing the first SQL statement, obtaining structured business data, and constructing a first causal graph according to the structured business data.
[0055] Further, in some embodiments of the application, the execution of the first SQL statement, the obtaining of the structured business data, and the construction of the first causal graph according to the structured business data include: constructing a causal node set according to the structured business data, and performing causal structure search on the causal node set by a preset algorithm to obtain a second causal graph; performing causal edge constraint on the second causal graph according to a preset domain business rule to obtain a third causal graph; setting the confidence weight of each causal edge in the second causal graph by evaluating the correlation between each two adjacent nodes in the third causal graph, to obtain the first causal graph.
[0056] Preferably, in some embodiments of the application, the construction of the causal node set according to the structured business data includes extracting a feature variable set from the structured business data queried by the first SQL statement to construct the causal node set.
[0057] Preferably, in some embodiments of the application, the performing of the causal structure search on the causal node set by the preset algorithm to obtain the second causal graph includes: establishing an initial causal graph by using an intervention-based causal discovery algorithm according to the causal node set; and performing scoring search on the initial causal graph by using a GIES (Greedy Interventional Equivalence Search) algorithm, and selecting the graph structure with the highest score from the initial causal graph as the second causal graph, wherein the score function in the initial causal graph scoring search process is as follows: wherein, represents the score of the causal graph . representative causal graph number of causal nodes in the causal graph for the causal graph first causal node in the causal graph parent node set of conditional probability of occurrence
[0058] Preferably, in some embodiments of the application, the second causal graph is constrained by preset domain business rules to obtain a third causal graph, including introducing domain business rules to constrain causal edges and optimizing the second causal graph. For example, when there is a causal path "transformer tripping <- current surge <- human intervention" in the third causal graph, the system determines by rules that "human intervention -> current surge" is an invalid edge and is forced to be removed, avoiding the generation of a causal path that violates industry common sense.
[0059] Preferably, in some embodiments of the application, the confidence weight of each causal edge in the second causal graph is set by evaluating the correlation between each two adjacent nodes in the third causal graph, including: The confidence weight of each causal edge is calculated by the following formula: wherein, is the confidence weight of the causal edge between the causal nodes and is the conditional probability of occurrence given is the probability of occurrence
[0060] Preferably, in some embodiments of the application, after obtaining the first causal graph, the method further includes: performing semantic annotation on the constructed first causal graph, including assigning a directional label, a confidence weight and a time lag parameter to each edge, for subsequent logical path reasoning; and embedding the first causal graph into a query structure construction module, and if it is found that there is an intermediate variable that does not appear in the key causal path, the system automatically inserts an intermediate query clause to complete the causal chain, ensuring that the final obtained second SQL statement is consistent with the business causal mechanism at the logical level.
[0061] The application constructs a causal node based on the comprehensive structured business data obtained by querying the initially generated first SQL statement, to ensure the comprehensiveness of the finally generated first causal graph. Further, the potential causal relationship between different business variables is revealed through domain rule constraints, so as to further optimize the structure of the second causal graph and improve the interpretability and logical consistency of the finally obtained first causal graph. Finally, the correlation between nodes is judged, the confidence weight of each causal edge is set, and a basis is provided for subsequent path screening, so as to improve the optimization efficiency and accuracy of the first SQL statement.
[0062] S104: optimizing the first SQL statement according to the causal graph, obtaining a second SQL statement, executing the second SQL statement, and obtaining a query result.
[0063] Further, in some embodiments of the application, the optimization of the first SQL statement according to the causal graph to obtain a second SQL statement comprises: querying all causal paths to which the query target field corresponding to the first SQL statement belongs in the first causal graph; for each causal path, evaluating an effectiveness score of the corresponding causal path according to the confidence weight of each causal edge in the causal path; selecting a first causal path with the highest effectiveness score from all the causal paths, and optimizing the first SQL statement according to the first causal path to obtain the second SQL statement.
[0064] Preferably, in some embodiments of the application, the querying of all causal paths to which the query target field corresponding to the first SQL statement belongs in the first causal graph comprises: analyzing each valid causal path to which the query target field corresponding to the first SQL statement belongs in the first causal graph, and judging whether each causal path is explicitly embodied in the first SQL statement; if not, adding auxiliary fields or table join conditions to complete the path.
[0065] Further, in some embodiments of the application, the evaluation of the effectiveness score of the corresponding causal path according to the confidence weight of each causal edge in the causal path comprises: The calculation formula of the effectiveness score is specifically: wherein, is the effectiveness score of the causal path; is the causal path; represents a causal edge between two connected causal nodes in the causal path, is the starting causal node of the causal edge, a causal node at the end of the causal edge; representing a confidence weight of a causal edge between ; representing or whether it has appeared in the historical context or the natural language query statement, if it appears, then , if it does not appear, then .
[0066] The application determines the relevance of the causal edge to the user's target query intention by judging whether the nodes at both ends of the causal edge appear in the historical context or the natural language query statement, and uses this as a basis to calculate the effectiveness score of the entire causal path, thereby more reasonably evaluating the actual contribution of different causal paths and improving the effectiveness of the selected causal path.
[0067] Preferably, in some embodiments of the application, the optimization of the first SQL statement according to the first causal path to obtain the second SQL statement comprises: according to the order of the causal nodes involved in the first causal path, reconstructing the FROM clause in the first SQL statement to ensure that the variable reference order in the first SQL statement is consistent with the order of the causal nodes in the first causal path, and adjusting the JOIN condition to increase the field connection constraint with strong logical dependency; for the scenario where there is a feedback structure or a redundant path in the first causal path, simplifying the Boolean factor of the logical expression of the WHERE clause in the first SQL statement, removing the logically redundant fields, and reducing the query complexity.
[0068] The application searches all causal paths related to the query target, calculates their effectiveness scores according to the confidence weight, and finally selects the optimal causal path to correct the first SQL statement, thereby eliminating low-relevance or noise paths in the causal graph, improving the execution efficiency of the SQL statement correction process, and ensuring that the generated second SQL statement is closer to the real business logic. The optimized first SQL statement can better reflect the user's real intention, reduce the deviation between the query result and the expectation, and thus improve the accuracy and reliability of the query. In particular, in the complex dependency scenario of power data, the above method can ensure that the query result has higher logical self-consistency and decision reference value.
[0069] Preferably, in some embodiments of the application, after obtaining the second SQL statement, it further comprises: submitting the second SQL statement to the backend database for syntax analysis and execution simulation, checking whether there are syntax errors, non-existent fields, table association errors, etc. in the statement, if the detection fails, return an error message and start the SQL repair process.
[0070] Preferably, in some embodiments of the present application, when the second SQL statement is executed to obtain the query result, the method further comprises: performing semantic alignment verification on the query result, including automatically comparing the result type (single value / multiple value / time series), field meaning and unit with the user's original intention, scoring using a semantic consistency scoring model, and triggering the regeneration of the second SQL statement when the threshold value is below the set value.
[0071] Preferably, in some embodiments of the present application, after outputting the query result, the method further comprises: collecting display feedback (such as "satisfied", "inaccurate", "need more information", etc.) and implicit behavior (such as clicking on a record, browsing dwell time, etc.) made by the user according to the query result, constructing a feedback vector, and updating the historical context representation vector maintained in the system; according to the feedback vector, fine-tuning the decoder that generates the prompt word template, updating the priority weight of the candidate template, and adjusting the generation temperature and sampling strategy of the large language model to improve the robustness and intent fit of the subsequent response; when the user produces continuous negative feedback on a causal edge in the first causal graph, the confidence weight of the causal edge is reduced, and vice versa, the confidence weight of the causal edge is increased after multiple positive verifications, thereby realizing the dynamic evolution and credibility enhancement of the causal graph structure.
[0072] By introducing the semantic closed-loop feedback mechanism, the application improves the model's ability to adapt to user needs and its ability to evolve, thereby continuously optimizing the system's understanding and response quality during multiple rounds of queries, and improving the overall interactive experience and business satisfaction.
[0073] In summary, the power field natural language query method provided by the embodiments of the present application has the following beneficial effects compared with the prior art: by introducing historical context, the natural language query statement input by the current user is subjected to semantic disambiguation, effectively solving the problems of ambiguous expression, unclear reference and context dependence in the continuous query process, achieving accurate analysis of complex semantic structures, and significantly improving the coverage and accuracy of intent recognition. Further, by introducing adaptively generated prompt words, the system can automatically generate the most semantically consistent query prompts according to the current dialogue state and target entity, effectively guiding the large language model to generate SQL expressions with complete structure and consistent semantics, improving the accuracy of the generated SQL statements and the consistency of the business meaning in complex constraint and multi-variable interaction scenarios. Finally, by querying the business data obtained by the first SQL statement to construct the first causal graph, the logical path between the relationships and variables implied in the query process is inferred, enabling the system to have causal reasoning capability, and based on the first causal graph, the first SQL statement is optimized to generate a second SQL statement that is more consistent with the business logic, further improving the accuracy and explainability of the query result.
[0074] As Figure 2As shown, on the basis of the above method embodiment, an embodiment of the present application provides a power field natural language query method device, which comprises a semantic disambiguation module 201, a first SQL statement acquisition module 202, a first causal graph construction module 203, and a first SQL statement optimization module 204.
[0075] Further, in some embodiments of the present application, the semantic disambiguation module 201 is configured to receive a natural language query sentence input by a user, perform semantic disambiguation on the natural language query sentence according to historical context of the natural language query sentence, and obtain a target entity; the first SQL statement acquisition module 202 is configured to construct a prompt word according to the natural language query sentence, the target entity, and a preset task target, input the prompt word into a pre-trained large language model to obtain a first SQL statement; the first causal graph construction module 203 is configured to execute the first SQL statement, obtain structured business data, and construct a first causal graph according to the structured business data; and the first SQL statement optimization module 204 is configured to optimize the first SQL statement according to the causal graph, obtain a second SQL statement, execute the second SQL statement, and obtain a query result.
[0076] Further, in some embodiments of the present application, the semantic disambiguation module 201 comprises a first semantic similarity calculation unit, a candidate entity extraction unit, and a target entity screening unit; the semantic disambiguation module 201 is configured to perform semantic disambiguation on the natural language query sentence according to historical context of the natural language query sentence, and obtain a target entity, which comprises: the first semantic similarity calculation unit is configured to calculate a first semantic similarity between the natural language query sentence and the historical context; the candidate entity extraction unit is configured to extract a plurality of candidate entities from the natural language query sentence when the first semantic similarity exceeds a first threshold value; and the target entity screening unit is configured to calculate a second semantic similarity between each of the candidate entities and the natural language query sentence, and select the candidate entity with the highest second semantic similarity as the target entity.
[0077] Further, in some embodiments of the present application, the first SQL statement acquisition module 202 comprises: a query intention vector acquisition unit, a prompt word guide vector construction unit, a prompt word generation unit, and a large language model calling unit; the first SQL statement acquisition module 202 is configured to construct a prompt word according to the natural language query statement, the target entity, and a preset task target, and input the prompt word into a pre-trained large language model to obtain a first SQL statement, comprising: the query intention vector acquisition unit is configured to, when the first semantic similarity exceeds a first threshold, concatenate the natural language query statement and the corresponding historical context to obtain a first concatenation result, and encode the first concatenation result through a pre-trained language representation model to obtain a query intention vector; the prompt word guide vector construction unit is configured to construct a prompt word guide vector according to the embedding vector representation of the target entity and the preset task target, and the query intention vector; the prompt word generation unit is configured to decode the prompt word guide vector into a prompt word template, and generate the prompt word according to the prompt word template; the large language model calling unit is configured to concatenate the embedding vector representation corresponding to the prompt word, the natural language query statement, and the historical context respectively to obtain a second concatenation result, and input the second concatenation result into the large language model to obtain the first SQL statement.
[0078] Further, in some embodiments of the present application, the large language model calling unit is configured to input the second concatenation result into the large language model to obtain the first SQL statement, comprising: inputting the second concatenation result into the large language model in a multi-modal embedding manner to pass to the forward layer of the large language model to obtain a plurality of candidate structured query semantic expressions; for each candidate structured query semantic expression, constructing a corresponding third SQL statement; taking the third SQL statement with the highest business consistency and context relevance as the first SQL statement.
[0079] Further, in some embodiments of the present application, the first causal graph construction module 203 comprises a second causal graph construction unit, a third causal graph construction unit and a confidence weight calculation unit; the first causal graph construction module 203 is configured to execute the first SQL statement, obtain structured business data, and construct a first causal graph according to the structured business data, comprising: the second causal graph construction unit is configured to construct a causal node set according to the structured business data, and perform causal structure search on the causal node set through a preset algorithm to obtain a second causal graph; the third causal graph construction unit is configured to perform causal edge constraint on the second causal graph according to a preset domain business rule to obtain a third causal graph; and the confidence weight calculation unit is configured to set the confidence weight of each causal edge in the second causal graph by evaluating the correlation between each two adjacent nodes in the third causal graph, to obtain the first causal graph.
[0080] Further, in some embodiments of the present application, the first SQL statement optimization module 204 comprises a causal path query unit, a causal path evaluation unit and a second SQL statement acquisition unit; the first SQL statement optimization module 204 is configured to optimize the first SQL statement according to the causal graph to obtain a second SQL statement, comprising: the causal path query unit is configured to query all causal paths to which the query target field corresponding to the first SQL statement belongs in the first causal graph; the causal path evaluation unit is configured to evaluate the effectiveness score of each causal path according to the confidence weight of each causal edge in the causal path; and the second SQL statement acquisition unit is configured to filter a first causal path with the highest effective score from all the causal paths, and optimize the first SQL statement according to the first causal path to obtain the second SQL statement.
[0081] Further, in some embodiments of the present application, the causal path evaluation unit is configured to evaluate the effectiveness score of each causal path according to the confidence weight of each causal edge in the causal path, comprising: The calculation formula of the effectiveness score is specifically: wherein, is the effectiveness score of the causal path; is the causal path; represents a causal edge between two connected causal nodes in the causal path, is the starting causal node of the causal edge, is the ending causal node of the causal edge; represents and confidence weight of a causal edge between them; represent or whether it has appeared in the historical context or the natural language query sentence, if it appears, then if it does not appear, then .
[0082] It can be understood that the above device item embodiments are corresponding to the method item embodiments of the present application, which can realize the power field natural language query method provided by any one of the above method item embodiments.
[0083] In summary, the power field natural language query device provided by the embodiments of the present application has the following beneficial effects compared with the prior art: by introducing the historical context, the semantic disambiguation of the natural language query sentence input by the current user is carried out, effectively solving the problems of ambiguous expression, unclear reference and context dependence in the continuous query process of the user, realizing accurate analysis of complex semantic structure, and significantly improving the coverage and accuracy of intent recognition. Further, by introducing the adaptively and dynamically generated prompt word, the system can automatically generate the query prompt with the highest semantic fit degree according to the current dialogue state and target entity, effectively guiding the large language model to generate a SQL expression with complete structure and consistent semantics, improving the accuracy of the generated SQL statement and the consistency of business meaning in the complex constraint and multi-variable interaction scene. Finally, the business data is obtained by querying the first SQL statement to construct the first causal graph, thereby reasoning out the logical path between the relationships and variables implied in the query process, so that the system has the causal reasoning ability, and the first SQL statement is optimized based on the first causal graph to generate a second SQL statement that is more consistent with the business logic, further improving the accuracy and explainability of the query result.
[0084] It should be noted that the device embodiments described above are only illustrative, and part or all of the modules can be selected to achieve the purpose of the embodiment scheme according to actual needs. In addition, in the device embodiment drawings provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which can be realized as one or more communication buses or signal lines. Those skilled in the art can understand and implement it without creative labor.
[0085] On the basis of the above-mentioned embodiments of the power field natural language query method, another embodiment of the present application provides a terminal device, which comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the power field natural language query method of any one embodiment of the present application is realized.
[0086] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present application. The one or more module elements can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the terminal device.
[0087] The terminal device can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing devices. The terminal device can include, but is not limited to, a processor and a memory.
[0088] The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and connects all parts of the terminal device through various interfaces and lines.
[0089] On the basis of the above-mentioned method embodiment, another embodiment of the present application provides a computer readable storage medium, including a stored computer program, wherein when the computer program runs, the device where the computer readable storage medium is located executes the power field natural language query method described in any one of the above-mentioned method embodiments of the present application.
[0090] The modules / units integrated in the device / terminal equipment can be stored in a computer readable storage medium if they are realized in the form of software function units and sold or used as independent products. Based on this understanding, all or part of the processes in the above-mentioned embodiments can also be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
Claims
1. A natural language query method in the power field, characterized in that: include: Receive a natural language query statement input by a user, perform semantic disambiguation on the natural language query statement according to a historical context of the natural language query statement, and obtain a target entity; Constructing a prompt word according to the natural language query statement, the target entity, and the preset task goal, and inputting the prompt word into a pre-trained large language model to obtain a first SQL statement; Executing the first SQL statement to obtain structured business data, and constructing a first causal graph based on the structured business data; According to the causal graph, the first SQL statement is optimized to obtain a second SQL statement, and the second SQL statement is executed to obtain a query result.
2. A natural language query method in the electric power field according to claim 1, characterized in that: The performing semantic disambiguation on the natural language query statement according to the historical context of the natural language query statement to obtain the target entity includes: Calculating a first semantic similarity between the natural language query statement and the corresponding historical context; When the first semantic similarity exceeds a first threshold, extracting a number of candidate entities from the natural language query statement; A second semantic similarity between each candidate entity and the natural language query statement is calculated, and the candidate entity with the highest second semantic similarity is used as the target entity.
3. A natural language query method in the electric power field according to claim 2, characterized in that: The step of constructing a prompt word according to the natural language query statement, the target entity, and the preset task goal, and inputting the prompt word into a pre-trained large language model to obtain a first SQL statement includes: When the first semantic similarity exceeds a first threshold, concatenating the natural language query statement with the corresponding historical context to obtain a first concatenation result, and encoding the first concatenation result using a pre-trained language representation model to obtain a query intent vector; Constructing a prompt word guide vector based on the embedding vector representation of the target entity and the preset task goal, and the query intent vector; Decoding the prompt word guide vector into a prompt word template, and generating the prompt word according to the prompt word template; The prompt word, the natural language query statement, and the embedding vector representation corresponding to the historical context are concatenated to obtain a second concatenation result, and the second concatenation result is input into the large language model to obtain the first SQL statement.
4. A natural language query method in the electric power field according to claim 3, characterized in that: Inputting the second concatenation result into the large language model to obtain the first SQL statement includes: Inputting the second concatenation result into the large language model, and passing it to the forward layer of the large language model in a multimodal embedding manner to obtain a plurality of candidate structured query semantic expressions; For each candidate structured query semantic expression, construct a corresponding third SQL statement; The third SQL statement with the highest business consistency and context relevance is used as the first SQL statement.
5. The natural language query method in the electric power field according to claim 1, characterized in that: The executing the first SQL statement to obtain structured business data and constructing a first causal graph based on the structured business data includes: Constructing a causal node set based on the structured business data, and performing a causal structure search on the causal node set using a preset algorithm to obtain a second causal graph; Performing causal edge constraints on the second causal graph according to preset domain business rules to obtain a third causal graph; The first causal graph is obtained by evaluating the correlation between each two adjacent nodes in the third causal graph and setting the confidence weight of each causal edge in the second causal graph.
6. A natural language query method in the electric power field according to claim 5, characterized in that: Optimizing the first SQL statement according to the causal graph to obtain a second SQL statement includes: Querying the first causal graph for all causal paths to which the query target field corresponding to the first SQL statement belongs; For each of the causal paths, evaluating a validity score of the corresponding causal path according to the confidence weight of each causal edge in the causal path; The first causal path with the highest effective score is selected from all the causal paths, and the first SQL statement is optimized according to the first causal path to obtain the second SQL statement.
7. A natural language query method in the electric power field according to claim 6, characterized in that: The step of evaluating the validity score of the causal path according to the confidence weight of each causal edge in the causal path includes: The calculation formula of the effectiveness score is specifically: in, Score the validity of the causal path; is the causal path; represents a causal edge between two connected causal nodes in a causal path, is the starting causal node of the causal edge, is the ending causal node of the causal edge; represent and The confidence weight of the causal edge between them; represent or Has it appeared in the historical context or natural language query statement? If so, If it does not appear, then .
8. A natural language query device in the power field, characterized in that: include: A semantic disambiguation module, a first SQL statement acquisition module, a first causal graph construction module, and a first SQL statement optimization module; The semantic disambiguation module is configured to receive a natural language query statement input by a user, perform semantic disambiguation on the natural language query statement based on a historical context of the natural language query statement, and obtain a target entity; The first SQL statement acquisition module is used to construct a prompt word according to the natural language query statement, the target entity and the preset task goal, and input the prompt word into the pre-trained large language model to obtain the first SQL statement; The first causal graph construction module is configured to execute the first SQL statement to obtain structured business data and construct a first causal graph based on the structured business data; The first SQL statement optimization module is used to optimize the first SQL statement according to the causal graph to obtain a second SQL statement, execute the second SQL statement, and obtain a query result.
9. A terminal device, characterized in that: The invention comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the natural language query method in the electric power field according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the natural language query method in the power field according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method, system and device for converting natural language to SQL (Structured Query Language) query statement and medium
CN118779342A
Query statement generation method based on relational graph
CN119046313A
Method, system and equipment for generating SQL (Structured Query Language) statement based on large model
CN119127913A
Structured query statement generation method and device, storage medium and electronic equipment
CN119829607A
SQL (Structured Query Language) statement generation method and device based on natural language and medium
CN120560649A
Cited By
Human resource data natural language query and SQL generation method and system
CN121350068A
Potential customer list mining method and device, equipment and storage medium
CN121456030A
Method, system and equipment for analyzing abnormal phenomenon of semiconductor structure
CN121542487A
Text2SQL semantic caching method based on context and mode matching
CN121681573A