Explanation generation method and device of field expression, equipment, medium and product

Through the interpretation generation method of parsing and generating field expressions, the problem of low efficiency and difficulty in ensuring the generation of field expression interpretation in the prior art is solved, efficient and accurate field interpretation generation is achieved, and cross-language interpretation generation is supported.

CN119848235APending Publication Date: 2025-04-18BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510031926.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The prior art has problems of low efficiency and difficulty in ensuring accuracy when processing field expressions and generating explanations of complex data, especially in terms of cross-language support.

Method used

Provides a method for interpreting and generating field expressions. By obtaining the field expression and field information to be processed, analyzing the target atomic field, searching and obtaining field knowledge, and generating field explanations based on this information. This method includes expression parsing module, knowledge query module and interpretation generation module, which supports multilingual interpretation generation and consistency checking in different languages.

Benefits of technology

It improves the parsing efficiency of field expressions, reduces the errors of human intervention, realizes the rapid acquisition and accurate matching of field knowledge, improves the generation efficiency of field interpretation and ensures accuracy, and supports cross-language generation of field interpretation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119848235A_ABST
    Figure CN119848235A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and discloses an interpretation generation method and device of a field expression, equipment, a medium and a product. The method comprises the steps of obtaining a to-be-processed field expression and field information corresponding to the field expression; analyzing the field expression to obtain a target atomic field corresponding to the field expression; retrieving the target atomic field to obtain field knowledge corresponding to the target atomic field; and according to the field knowledge, the target atomic field and the field information, generating field interpretation of the field expression. According to the technical scheme, the complex field expression can be automatically processed, the analysis efficiency of the field expression is improved, errors caused by human intervention are reduced, the generation efficiency of field interpretation is improved, and the accuracy of field generation is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a method, device, equipment, medium and product for generating interpretation of a field expression. Background Art

[0002] In data-intensive business scenarios, it is usually necessary to process large and wide tables containing a large number of fields. The fields in large and wide tables are often complex expressions involving the combination of multiple atomic fields, which are difficult to understand and use directly. Currently, field expressions are usually parsed manually by consulting documents to understand the meaning of the fields; or rule-based parsing tools are used to parse and interpret field expressions, but this method has defects such as low efficiency and difficulty in ensuring accuracy. Summary of the invention

[0003] In view of this, the present disclosure provides a method, apparatus, device, medium and product for generating interpretations of field expressions to solve the problems of low efficiency and difficulty in ensuring accuracy when generating interpretations for field expressions.

[0004] In a first aspect, the present disclosure provides a method for generating an interpretation of a field expression, including: obtaining a field expression to be processed and field information corresponding to the field expression; parsing the field expression to obtain a target atomic field corresponding to the field expression; searching the target atomic field to obtain field knowledge corresponding to the target atomic field; generating a field interpretation of the field expression according to the field knowledge, the target atomic field and the field information.

[0005] In the second aspect, the present disclosure provides a device for generating an interpretation of a field expression, including: an acquisition module, used to obtain a field expression to be processed and field information corresponding to the field expression; an expression parsing module, used to parse the field expression to obtain a target atomic field corresponding to the field expression; a knowledge query module, used to search the target atomic field and obtain field knowledge corresponding to the target atomic field; an interpretation generation module, used to generate a field interpretation of the field expression according to the field knowledge, the target atomic field and the field information.

[0006] In a third aspect, the present disclosure provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the method for interpreting and generating field expressions of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0007] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for interpreting and generating a field expression of the first aspect or any corresponding embodiment thereof.

[0008] In a fifth aspect, the present disclosure provides a computer program product, including computer instructions, which are used to enable a computer to execute the method for interpreting and generating a field expression of the above-mentioned first aspect or any corresponding embodiment.

[0009] The method, device, equipment, medium and product for generating interpretation of field expressions provided by the present disclosure parse the acquired field expression to be processed to obtain the target atomic field corresponding to the field expression, thereby being able to automatically process complex field expressions, improve the efficiency of parsing field expressions, and reduce errors caused by human intervention. By searching according to the target atomic field to determine the field knowledge corresponding to the target atomic field, rapid acquisition and precise matching of field knowledge are achieved. Due to the accurate matching between field knowledge and target atomic field, when the field interpretation is automatically generated according to the field knowledge, target atomic field and field information, the generation efficiency of the field interpretation is improved and the accuracy of field generation is guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0011] Figure 1 is a schematic diagram of an explanation generation system according to an embodiment of the present disclosure;

[0012] Figure 2 is a schematic diagram of a specific implementation of an explanation generation system according to an embodiment of the present disclosure;

[0013] Figure 3 It is a flowchart of a method for interpreting and generating a field expression according to an embodiment of the present disclosure;

[0014] Figure 4 is a flowchart of another method for interpreting and generating a field expression according to an embodiment of the present disclosure;

[0015] Figure 5 is a flowchart of another method for interpreting and generating a field expression according to an embodiment of the present disclosure;

[0016] Figure 6 is a structural block diagram of a device for generating an explanation of a field expression according to an embodiment of the present disclosure;

[0017] Figure 7It is a schematic diagram of the hardware structure of the computer device of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0019] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0020] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0021] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0022] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0023] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0024] At present, in the process of processing field expressions and generating explanations for complex data, the commonly used methods include: (1) manual parsing and document review, that is, data engineers or analysts manually parse field expressions and understand the meaning of fields by reviewing documents or communicating with business experts. However, manual parsing and document review are time-consuming and error-prone, and inefficient; they rely on personal experience, making it difficult to share and reuse knowledge, and documents often lag behind changes in actual data, resulting in untimely updates. (2) Static documents and data dictionaries, that is, maintaining static data dictionaries or documents to record the definition and purpose of fields. However, they need to be continuously updated to reflect changes in the data model, with high maintenance costs, and are difficult to quickly adapt to new business needs or changes in data structure, which is not flexible enough. (3) Rule-based parsing tools to parse and interpret field expressions. However, this method requires a large number of rule configurations and is difficult to maintain; it has limited support for new types of expressions or complex logic and poor adaptability; and it cannot automatically generate explanations for business contexts and lacks intelligence. (4) Provide field management and annotation functions through the built-in functions of data warehouses and BI tools. However, it usually only supports simple annotations and basic field management, has limited functionality, and is difficult to integrate with other systems or tools. It cannot form a unified knowledge base, requires manual entry and maintenance of field information, and lacks automation.

[0025] In addition, the above methods mainly support a single language environment. Cross-language support usually relies on manual translation, which has high translation costs and may cause inconsistencies or misunderstandings between different language versions, resulting in insufficient cross-language support.

[0026] In summary, relevant technologies have defects such as low efficiency, difficult maintenance, lack of intelligent and automated support when processing field expressions and generating explanations. In particular, the lack of cross-language support further limits the user experience and efficiency.

[0027] Based on this, the technical solution of the present disclosure provides an explanation generation system, such as Figure 1 As shown, the system is mainly composed of an expression parsing module, a knowledge query module, an explanation generation module, a knowledge base management module and a user query module.

[0028] The expression parsing module has the functions of syntax tree parsing, large language model splitting, and further splitting based on field lineage relationships. It is responsible for parsing complex field expressions and decomposing them into atomic fields, such as Figure 2 shown.

[0029] The knowledge query module has the functions of knowledge base query, knowledge index construction, retrieval, base table field knowledge query, field data sampling and statistical description. The expression parsing module inputs the atomic fields parsed by it into the knowledge query module, and the knowledge query module retrieves the field knowledge related to the atomic fields from the knowledge base, such as Figure 2 shown.

[0030] The explanation generation module has the functions of structuring, generating explanations, verifying and optimizing explanations, and topological sorting based on blood relationships. The knowledge query module inputs the atomic fields and field knowledge corresponding to the field expressions into the explanation generation module, which uses the large language model to generate detailed explanations of the fields. It also supports multi-language explanation generation and consistency checks in different languages, such as Figure 2 shown.

[0031] The knowledge base management module has the functions of storing, dynamically updating and supporting cross-language field explanations and related information, and can perform consistency checks in different languages ​​to ensure that different languages ​​can point to the same field explanation. Figure 2 As shown, the field interpretations generated by the interpretation generation module are stored in the knowledge base, and the field interpretations from different knowledge sources are integrated through the knowledge base, and dynamic updates and cross-language support for the field interpretations are implemented, thereby realizing the storage and maintenance of the field interpretations and their related information.

[0032] The user query module supports natural language query processing and field direct retrieval functions, such as Figure 2 As shown, it can support the use of text similarity algorithms to query fields related to natural language query statements from the knowledge base and make field recommendations. It also supports directly searching the fields that users want to query from the knowledge base and displaying field explanations.

[0033] According to an embodiment of the present disclosure, an embodiment of a method for interpreting and generating a field expression is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0034] In this embodiment, a method for generating an interpretation of a field expression is provided, which can be used in computer devices such as computers, tablet computers, etc. Figure 3 is a flowchart of a method for interpreting and generating a field expression according to an embodiment of the present disclosure, such as Figure 3 As shown, the process includes the following steps:

[0035] Step S101, obtaining the field expression to be processed and the field information corresponding to the field expression.

[0036] Field expressions refer to formulas or logic used to specify and operate specific fields in a data table during database query or data processing. Specifically, field expressions can be extracted from a large wide table, input into a computer device through an interactive interface, or intercepted from a pre-edited programming language. There is no limitation on how to obtain field expressions.

[0037] Field information is attribute information related to a field, which may include field name, field description, field alias, field comment, etc. Specifically, the field expression is parsed to determine the meaning and background information of each field carried by the field expression. Combined with the meaning and background information of each field, the field information corresponding to the field expression is determined.

[0038] Step S102, parse the field expression to obtain the target atomic field corresponding to the field expression.

[0039] The target atomic field is the smallest field unit that constitutes the field expression, that is, the target atomic field is an indivisible field. Specifically, the field expression is composed of multiple nested atomic fields, operators, and operands. When the field expression is obtained, the structure of the field expression is parsed by the corresponding parsing method to determine the nested structure of the field expression. Then, the field expression is split according to the nested structure to obtain the target atomic field of the field expression.

[0040] Step S103, searching the target atomic field to obtain field knowledge corresponding to the target atomic field.

[0041] Field knowledge is knowledge related to the target atomic field, including field definition, data type, data source, etc. In combination with the business scenario corresponding to the target atomic field, the database corresponding to the business scenario is determined, and the relevance (such as literal matching degree, semantic matching degree, etc.) of the content of the target atomic field and the content in the database is calculated, and the field knowledge matching the target atomic field is retrieved from the database according to the relevance.

[0042] Step S104, generating a field interpretation of the field expression according to the field knowledge, the target atomic field and the field information.

[0043] The field knowledge, field expressions, target atomic fields corresponding to the field expressions, and field information are integrated to make them have a unified data format. Then, the pre-trained explanation generation model is used to process the data to generate explanations for the field expressions and obtain the field explanations of the field expressions. At the same time, the explanation generation model has multi-language capabilities and supports the generation of field explanations in different languages.

[0044] Among them, the explanation generation model can be obtained by training based on the model architecture of a large language model, or by training based on the model architecture of a deep learning model, or by training based on the model architecture of a neural network. There is no specific limitation here, as long as the generation of field explanations can be achieved.

[0045] The method for generating an interpretation of a field expression provided in this embodiment parses the acquired field expression to be processed to obtain the target atomic field corresponding to the field expression, thereby being able to automatically process complex field expressions, improve the parsing efficiency of the field expression, and reduce errors caused by human intervention. By searching according to the target atomic field to determine the field knowledge corresponding to the target atomic field, rapid acquisition and precise matching of field knowledge are achieved. Due to the accurate match between the field knowledge and the target atomic field, when the field interpretation is automatically generated according to the field knowledge, the target atomic field and the field information, the generation efficiency of the field interpretation is improved, and the accuracy of the field generation is guaranteed.

[0046] In this embodiment, a method for generating an interpretation of a field expression is provided, which can be used in computer devices such as computers, tablet computers, etc. Figure 4 is a flowchart of a method for interpreting and generating a field expression according to an embodiment of the present disclosure, such as Figure 4 As shown, the process includes the following steps:

[0047] Step S201, obtaining the field expression to be processed and the field information corresponding to the field expression. For details, please refer to the relevant description of the corresponding steps in the above-mentioned embodiment, which will not be repeated here.

[0048] Step S202, parse the field expression to obtain the target atomic field corresponding to the field expression.

[0049] Specifically, the above step S202 includes:

[0050] Step S2021, based on the expression type of the field expression, determine the parsing method that matches the expression type.

[0051] The expression type is used to characterize the structured type of the field expression, specifically, the expression type includes structured expression and unstructured expression. The parsing method is the method of parsing the field expression, specifically including parser parsing, model parsing, etc.

[0052] For structured field expressions, the corresponding parser can be matched according to the language of the field expression; for unstructured field expressions, the field can be parsed using a pre-trained parsing model. The parsing model can be trained based on a large language model or a neural network model. There is no specific limitation here, as long as the field parsing function can be realized.

[0053] Specifically, format detection and rule detection are performed on the obtained field expression to determine whether the field expression follows specific grammatical rules and has a fixed format (such as mathematical expressions, code blocks in programming languages, or SQL queries, etc.). If the field expression follows specific grammatical rules and has a fixed format, and the expression consists of clear elements (such as operands, operators, functions, and keywords) and is arranged in a specific logical order, then the field expression can be determined to be a structured field expression; otherwise, the field expression is determined to be an unstructured field expression.

[0054] Step S2022, split the field expression into fields according to the parsing method to obtain the target atomic field corresponding to the field expression.

[0055] If it is determined that the field expression is a structured field expression, a parser that matches it is determined according to the syntax of the field expression, and the field expression is converted into a syntax tree according to the parser, and the operators, operands and nested structures are identified, so as to extract the target atomic field from the leaf nodes of the syntax tree according to the nested structure.

[0056] If the field expression is determined to be an unstructured field expression, the field expression is input into the trained parsing model, and the natural language processing capability of the parsing model is used to identify and split the target atomic field from the field expression. At the same time, the target atomic field output by the parsing model is verified to determine the accuracy of the field splitting.

[0057] It should be noted that if the field expression is complex, the language understanding ability of the parsing model can be used to directly split the field expression and identify the target atomic field. Of course, the field can also be split according to the type of specific field expression and business needs, combining the parser and parsing model. At the same time, the splitting strategy and depth can be dynamically adjusted according to the business scenario to adapt to different parsing needs, and the practicality and accuracy of the field splitting results can be ensured by close integration with business needs.

[0058] In some optional implementations, the atomic fields obtained by parsing may have a finer-grained blood relationship in the parent table in which they are located, and need to be further split. Accordingly, the above step S2022 includes:

[0059] Step a1, split the field expression into fields according to the parsing method to obtain the initial atomic fields.

[0060] Step a2, analyzing the field blood relationship corresponding to each initial atomic field in the initial atomic field.

[0061] Step a3: split the initial atomic fields according to the field blood relationship to generate target atomic fields.

[0062] The initial atomic field is obtained by splitting the field expression using a parser or parsing model. In some business scenarios, the initial atomic field may not be the smallest field unit, so it is necessary to analyze the field lineage relationship of the initial atomic field obtained by parsing, determine the position of the initial atomic field in the data lineage graph, and identify the source of the initial atomic field in the parent table. Combined with the needs of the business scenario, the initial atomic field is further split according to the field lineage relationship to obtain the corresponding target atomic field.

[0063] The data lineage graph represents the data flow of fields from source to target, including the source, storage location, and flow direction of fields. The depth and number of times of splitting the initial atomic fields according to the field lineage relationship can be dynamically adjusted according to specific business scenarios and business needs.

[0064] In the above implementation, the initial atomic fields obtained by parsing are further split according to the field blood relationship to obtain the corresponding target atomic fields, thereby achieving accurate splitting of field expressions, improving parsing accuracy, and facilitating rapid understanding and use of these target atomic fields to retrieve relevant knowledge, thereby providing support for subsequent data analysis and data decision-making.

[0065] Step S203: search the target atomic field to obtain field knowledge corresponding to the target atomic field.

[0066] Specifically, the above step S203 includes:

[0067] Step S2031, determining the knowledge source related to the target atomic field according to the attribute information of the target atomic field.

[0068] Attribute information is used to characterize the characteristics of the target atomic field, which may include the field's annotations, aliases, and DDL (data definition language) information for creation and modification. The knowledge source is the source of knowledge related to the target atomic field, which may include question and answer records, documents, and work order records related to business scenarios.

[0069] Specifically, the knowledge database is queried according to the attribute information of the target atomic field, and the work order related records in the knowledge database are retrieved to determine whether there are business backgrounds and use cases related to the target atomic field in the work order record; the similarity between the target atomic field and the question and answer record is analyzed to determine whether there are questions and answers related to the target atomic field in the question and answer record; the document content is split and indexed to retrieve whether there is document content related to the target atomic field in the document. Therefore, by retrieving question and answer records, documents, and work order records through the target atomic field, the knowledge source corresponding to the target atomic field can be determined.

[0070] Step S2032, split the knowledge in different knowledge sources to obtain text index segments corresponding to the knowledge sources.

[0071] The text index fragment is an indexable text fragment. The work order record, question and answer record, document content, etc. are split into texts to obtain the text fragments corresponding to each knowledge source, and the text fragments are used as text index fragments.

[0072] Step S2033: determining field knowledge related to the target atomic field according to the relevance between the text index segment and the target atomic field.

[0073] Use an inverted index or other index structure to build a retrieval index for each knowledge source. According to the retrieval index, match each text index segment with the target atomic field to determine the text index segment related to the target atomic field. According to the determined text index segment related to the target atomic field, obtain the field knowledge related to the target atomic field.

[0074] In some optional implementations, the above step S2033 includes:

[0075] Step b1, according to the literal relevance between the text index segment and the target atomic field, retrieve the field knowledge related to the target atomic field from the knowledge source.

[0076] Literal relevance is the literal relevance between the text index segment and the target atomic field. Literal matching algorithms (such as KMP algorithm, BM25 algorithm, Rabin-Karp algorithm, linear search, etc.) are used to perform literal matching between the text index segment and the target atomic field to quickly retrieve field knowledge related to the target atomic field from the knowledge source.

[0077] Step b2: Retrieve field knowledge related to the target atomic field from the knowledge source according to the semantic relevance between the text index segment and the target atomic field.

[0078] Semantic relevance is the semantic relevance between the text index segment and the target atomic field. A deep learning model (such as BERT, etc.) is used to semantically match the text index segment with the target atomic field, identify the text index segment corresponding to the target atomic field, and retrieve field knowledge related to the target atomic field from the knowledge source.

[0079] In the above implementation, literal retrieval and semantic retrieval are used to support the retrieval and matching of field knowledge for target atomic fields, so that when faced with a large number of target atomic fields, the field knowledge that matches them can be accurately determined, thereby facilitating efficient field knowledge matching.

[0080] In some optional implementations, the above step S203 further includes:

[0081] Step c1, based on the field blood relationship of the target atomic field, determine the target base table where the target atomic field is located.

[0082] Step c2, using the field knowledge in the target base table, determine the field knowledge related to the target atomic field.

[0083] The field lineage relationship indicates the dependency relationship between the target atomic field and other fields; the target base table is the source table where the target atomic field is located. According to the field lineage relationship of the target atomic field, other fields with which it has a dependency relationship can be determined, so that the target base table where the target atomic field is located can be identified.

[0084] Each field in the target base table has corresponding field knowledge. Combined with the field lineage relationship of the target atomic field, the target atomic field can inherit and utilize the field knowledge in the target base table to obtain field knowledge related to the target atomic field, thereby reducing the repeated generation of field knowledge and further improving the retrieval efficiency of field knowledge.

[0085] In some optional implementations, the above step S203 further includes:

[0086] Step d1, extracting key atomic fields from target atomic fields.

[0087] Step d2, statistics are collected on the field data of the key atomic fields to generate statistical description information of the key atomic fields.

[0088] The key atomic field is a representative field that can characterize the content to be expressed by the target atomic field. Specifically, the pre-trained field extraction model can be used here to parse the data set of the target atomic field and extract representative key atomic fields. The field data of the key atomic field is sampled and statistically analyzed, the basic statistics of the key atomic field (such as mean, median, standard deviation) are calculated, and its data distribution is analyzed to generate statistical description information of the indicator. The statistical description information is integrated into the corresponding field knowledge as part of the field knowledge.

[0089] In the above implementation, key atomic fields are extracted to perform statistics on field data to generate corresponding statistical description information, which is convenient for providing an intuitive understanding of the actual data characteristics of the field and supporting more accurate business decisions.

[0090] Step S204: Generate a field interpretation of the field expression according to the field knowledge, the target atomic field and the field information. For details, please refer to the description of the corresponding steps in the above embodiment, which will not be repeated here.

[0091] The interpretation and generation method of the field expression provided in this embodiment determines the parsing method that matches the expression type of the field expression, and then splits the field expression according to the matched parsing method to obtain the target atomic field corresponding to the field expression, thereby realizing the intelligent parsing of the field expression and ensuring the accuracy of the splitting of the field expression. According to the attribute information of the target atomic field, multiple knowledge sources related to it are determined, and knowledge integration of different knowledge sources is performed to obtain the corresponding text index fragment, and then according to the correlation between the text index fragment and the target atomic field, the field knowledge that matches the target atomic field is determined, thereby ensuring the comprehensiveness and accuracy of the field knowledge.

[0092] In this embodiment, a method for generating an interpretation of a field expression is provided, which can be used in computer devices such as computers, tablet computers, etc. Figure 5 is a flowchart of a method for interpreting and generating a field expression according to an embodiment of the present disclosure, such as Figure 5 As shown, the process includes the following steps:

[0093] Step S301, obtaining the field expression to be processed and the field information corresponding to the field expression. For details, please refer to the relevant description of the corresponding steps in the above-mentioned embodiment, which will not be repeated here.

[0094] Step S302: parse the field expression to obtain the target atomic field corresponding to the field expression. For details, please refer to the description of the corresponding steps in the above embodiment, which will not be repeated here.

[0095] Step S303, searching each target atomic field in the target atomic field to obtain field knowledge corresponding to each target atomic field. For details, please refer to the relevant description of the corresponding steps in the above embodiment, which will not be repeated here.

[0096] Step S304, generating a field interpretation of the field expression according to the field knowledge, the target atomic field and the field information.

[0097] Specifically, the above step S304 includes:

[0098] Step S3041, formatting the field knowledge, target atomic fields and field information to obtain structured information.

[0099] Structured information is information with a specific format, which is pre-set, such as JSON format. Field information such as field knowledge, target atomic fields, field expressions, and field names are formatted and integrated to convert them into a unified specific format. The specific format is used to structure and organize field information such as field knowledge, target atomic fields, field expressions, and field names to obtain corresponding structured information, so as to facilitate the interpretation of the generation model for information parsing.

[0100] Step S3042, summarize the field knowledge and generate the entry content of the target atomic field.

[0101] The structured information is passed to the interpretation generation model for information processing. The interpretation generation model summarizes the field knowledge of each target atomic field and generates the entry content for each target atomic field to provide detailed background information and definition for the target atomic field.

[0102] Step S3043, generating field explanations in different languages ​​for the field expressions based on the structured information and the entry content.

[0103] Utilize structured information and entry content to analyze the calculation logic, field meaning, business background, and application scenarios corresponding to the target atomic field. Generate descriptive information for the target atomic field based on the analyzed information, and generate field explanations for the field expressions corresponding to the target atomic field based on the descriptive information. The same field explanation can be converted into different languages ​​for expression. For example, the field expression for weighted purchases is explained as follows: "Explanation": "The weighted number of purchases is calculated by adding the number of purchases of the user to the user's age and then multiplying it by the discount factor. This indicator is used to analyze the purchasing behavior of users of different age groups and consider the impact of discounts on the number of purchases.".

[0104] In some optional implementations, the above method further includes:

[0105] Step e1, verifying the field interpretation and generating a verification result of the field interpretation.

[0106] Step e2, optimizing the generation strategy of the field explanation based on the verification result.

[0107] Verify and optimize the generated field explanations to ensure their accuracy and practicality. Specifically, after the field explanations are generated, the field explanations can be input into the pre-trained verification model for explanation verification to generate corresponding verification results; the field explanations can also be sent to relevant technicians for review, and in response to the technicians' review operations on the field explanations, corresponding verification results are generated. The verification results are used to determine whether the field explanations conform to the business logic.

[0108] Furthermore, combined with user feedback and verification results on field explanations, the structured information input into the explanation generation model and the explanation generation strategy are optimized so that the explanation generation model can generate more accurate field explanations.

[0109] The verification model can be obtained by training based on a model architecture of a large language model or a model architecture of a neural network. There is no specific limitation here, as long as it can verify whether the field interpretation conforms to the business logic.

[0110] In the above implementation, the field explanation is verified and the generation strategy is optimized in combination with user feedback and the verification results of the field explanation, so as to dynamically adjust the generation strategy of the field explanation, thereby achieving continuous optimization of the field explanation, ensuring that the field explanation is always up to date, and improving the accuracy and practicality of the field explanation.

[0111] In some optional implementations, the above method further includes:

[0112] Step f1, construct a field data lineage graph based on field dependencies.

[0113] Step f2, topologically sorting the fields in the data lineage graph using a preset sorting method to generate a field topological sorting result.

[0114] Step f3, according to the field topology sorting result, the fields are generated, changed or inserted in the field data lineage graph in sequence.

[0115] Field dependencies are used to characterize the interdependencies between different target atomic fields. Field dependencies are used to determine the field lineage relationships between different target atomic fields, so that different target atomic fields can be topologically sorted according to the field lineage relationships, ensuring that each target atomic field is generated from top to bottom according to the field lineage relationships. Nodes are represented by target atomic fields, and edges are represented by field dependencies. Thus, a field data lineage graph can be constructed according to nodes and edges.

[0116] The preset sorting method is a preset field sorting method, such as a topological sorting algorithm such as the Kahn algorithm or depth-first search. The preset sorting method is used to sort each target atomic field in the data lineage graph to generate a field topological sorting list.

[0117] When the target atomic field is generated, changed, or inserted, it is generated, changed, or inserted in the order of the field topological sort list to ensure that the field dependencies are correct.

[0118] In a specific example, the constructed data lineage graph is as follows:

[0119] fieldA->fieldD

[0120] fieldB->fieldD

[0121] fieldC->fieldE

[0122] fieldD->fieldF

[0123] fieldE->fieldF

[0124] Based on the above data lineage graph, the field topological sorting list can be determined as: fieldA, fieldB, fieldC, fieldD, fieldE, fieldF.

[0125] Then, the fields are generated according to the field topology sorting list as follows: first generate fieldA, fieldB, fieldC; then generate fieldD, fieldE; and finally generate fieldF.

[0126] In the above implementation, topological sorting based on blood relationship is used to ensure that fields are generated from top to bottom according to dependency relationships, thereby ensuring the correctness and consistency of field generation.

[0127] Step S305, storing the field explanation and related information corresponding to the field explanation in a database in different languages.

[0128] The database is a pre-established structured database or knowledge base. Specifically, the table structure of the database is pre-designed, including field names, expressions, explanations, atomic fields, related knowledge, etc. The table structure is as follows:

[0129] CREATE TABLE Field Knowledge Base (

[0130] Field name VARCHAR(255),

[0131] Expression TEXT,

[0132] Explain TEXT,

[0133] Atomic field JSON,

[0134] Related knowledge JSON,

[0135] Language VARCHAR(10),

[0136] Version number INT,

[0137] Update timeTIMESTAMP

[0138] ).

[0139] By interpreting the multilingual capabilities of the generation model, field explanations in different languages ​​are generated, and the generated field explanations and related information are stored in the database. The language identifier is recorded for each field explanation in the database to support retrieval by language. At the same time, the consistency of field explanations in different language versions in terms of content and logic is ensured to ensure the systematization and retrievability of information and support fast retrieval and query.

[0140] It should be noted that the database can have good integration, facilitate seamless connection with other systems (such as data warehouses, BI tools), provide unified data support and services, and ensure data security and confidentiality through access control and authority management for the database. By indexing the database and optimizing the query mechanism, the database can be ensured to have efficient retrieval capabilities.

[0141] Step S306: When it is detected that the field interpretation is updated, the field interpretation in the database is dynamically updated.

[0142] Assign a corresponding version number to each field interpretation in the database, record the update time and update content of the field interpretation, and implement version control for the field interpretation. When it is detected that the field interpretation is different from the same field interpretation stored in the database, it means that the field interpretation has been updated. At this time, the field interpretation in the database is automatically updated to ensure that the field information in the database is always up-to-date. Of course, manual updates by users are also supported here. In this way, real-time synchronization of field interpretations with data models and business logic is ensured, supporting rapid response to business changes. Furthermore, whenever a field interpretation is updated, a change log for each update is recorded to facilitate update tracing and auditing of field interpretations.

[0143] Step S307, obtaining a query statement, parsing the query statement, and determining each to-be-queried field carried in the query statement.

[0144] The query statement is a statement generated by the user using natural language to query the field through the interactive page. The query statement is parsed, including word segmentation, stop word removal, stem extraction, etc., to obtain the various fields to be queried carried in the query statement.

[0145] Step S308: Match the field to be queried with the field interpretation in the database to obtain the target field interpretation corresponding to the field query request.

[0146] The similarity between the field to be queried and each field interpretation in the database is calculated using text similarity matching (such as BM25, cosine similarity, BERT embedding, etc.). Based on the similarity, each field interpretation is matched and sorted with the field to be queried, and the most relevant target field is selected.

[0147] Furthermore, the most relevant target fields and their field explanations can be displayed to the user who initiated the query request through a page based on the similarity, providing detailed field information. At the same time, the user is allowed to provide feedback on the recommended results of the target field explanations, so as to optimize the recommended field explanations later.

[0148] Step S309: Obtain a field query request, match the field query request with the field interpretation in the database, and determine a target field interpretation matched by the field query request.

[0149] A field query request is a request generated for querying a field, and the field query request includes a field name. A user can input the field name of the field explanation to be queried through the interactive interface provided by the database, and accordingly, the database can respond to the user's field query request, search the field and its field explanation that match the field query request in the field explanation of the database, and display the field explanation to the user through the interactive interface provided by the database.

[0150] The method for generating the interpretation of field expressions provided in this embodiment generates field interpretations in different languages ​​of field expressions according to structured information and the entry content of the target atomic field, thereby realizing the automatic generation of field interpretations, reducing the reliance on manual writing and maintenance of field interpretations, and reducing labor costs. At the same time, it supports cross-language generation of field interpretations, reduces reliance on manual translation, reduces translation costs, and facilitates meeting different language requirements, thereby being able to quickly respond to different language requirements, ensuring the real-time and accuracy of queries and recommendations, and improving user understanding and usage efficiency. By generating the target field interpretation according to the query statement, and directly matching the corresponding target field interpretation according to the field query request, support for natural language query and direct field retrieval is achieved, which facilitates the intelligent recommendation and rapid retrieval of field interpretations, helps users quickly find relevant fields and their field interpretations, and improves data usage efficiency.

[0151] In this embodiment, a field expression interpretation generation device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0152] This embodiment provides a device for generating an explanation of a field expression, such as Figure 6 As shown, including:

[0153] The acquisition module 401 is used to acquire the field expression to be processed and the field information corresponding to the field expression.

[0154] The expression parsing module 402 is used to parse the field expression to obtain the target atomic field corresponding to the field expression.

[0155] The knowledge query module 403 is used to search the target atomic field and obtain the field knowledge corresponding to the target atomic field.

[0156] The explanation generation module 404 is used to generate the field explanation of the field expression according to the field knowledge, the target atomic field and the field information.

[0157] In some optional implementations, the expression parsing module 402 includes:

[0158] The parsing method determination unit is used to determine a parsing method that matches the expression type based on the expression type of the field expression.

[0159] The splitting unit is used to split the field expression according to the parsing method to obtain the target atomic field corresponding to the field expression.

[0160] In some optional embodiments, the splitting unit includes:

[0161] The initial split subunit is used to split the field expression according to the parsing method to obtain the initial atomic field.

[0162] The lineage analysis subunit is used to analyze the field lineage relationship corresponding to each initial atomic field in the initial atomic field.

[0163] The field splitting subunit is used to split the initial atomic field according to the field lineage relationship to generate the target atomic field.

[0164] In some optional implementations, the knowledge query module 403 includes:

[0165] The source determination unit is used to determine the knowledge source related to the target atomic field according to the attribute information of the target atomic field.

[0166] The knowledge splitting unit is used to split the knowledge in different knowledge sources to obtain text index fragments corresponding to the knowledge sources.

[0167] The first knowledge determination unit is used to determine field knowledge related to the target atomic field according to the relevance between the text index segment and the target atomic field.

[0168] In some optional implementations, the knowledge determination unit includes:

[0169] The literal retrieval subunit is used to retrieve field knowledge related to the target atomic field from the knowledge source according to the literal relevance between the text index segment and the target atomic field.

[0170] The semantic retrieval subunit is used to retrieve field knowledge related to the target atomic field from the knowledge source according to the semantic relevance between the text index fragment and the target atomic field.

[0171] In some optional implementations, the knowledge query module 403 further includes:

[0172] The base table determination unit determines the target base table where the target atomic field is located based on the field lineage relationship of the target atomic field.

[0173] The second knowledge determination unit is used to determine the field knowledge related to the target atomic field by using the field knowledge in the target base table.

[0174] In some optional implementations, the knowledge query module 403 further includes:

[0175] The field extraction unit is used to extract key atomic fields from the target atomic fields.

[0176] The statistical unit is used to count the field data of the key atomic field and generate statistical description information of the key atomic field.

[0177] In some optional implementations, the explanation generation module 404 includes:

[0178] The format integration unit is used to perform format integration on field knowledge, target atomic fields and field information to obtain structured information.

[0179] The knowledge summarization unit is used to summarize the field knowledge and generate the entry content of the target atomic field.

[0180] The field explanation generation unit is used to generate field explanations in different languages ​​for field expressions based on structured information and term content.

[0181] In some optional embodiments, the above device further includes:

[0182] The verification module is used to verify the field interpretation and generate the verification result of the field interpretation.

[0183] A strategy generation module is used to generate strategies for optimizing field interpretation based on validation results.

[0184] In some optional embodiments, the above device further includes:

[0185] The lineage graph construction module is used to build a field data lineage graph based on field dependencies.

[0186] The sorting module is used to topologically sort the fields in the data lineage graph using a preset sorting method to generate a field topological sorting result.

[0187] The field update module is used to generate, change or insert fields in the field data lineage graph in sequence according to the field topology sorting results.

[0188] In some optional embodiments, the above device further includes:

[0189] The storage module is used to store the field explanation and the related information corresponding to the field explanation in the database in different languages.

[0190] The database update module is used to dynamically update the field interpretation in the database when it is detected that the field interpretation is updated.

[0191] The query module is used to obtain a query statement, parse the query statement, and determine each field to be queried carried in the query statement.

[0192] The first matching module is used to match the field to be queried with the field interpretation in the database to obtain the target field interpretation corresponding to the field query request.

[0193] The second matching module is used to obtain a field query request, match the field query request with the field interpretation in the database, and determine a target field interpretation matched by the field query request.

[0194] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0195] The field expression interpretation and generation device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above-mentioned functions.

[0196] The field expression interpretation generation device provided in this embodiment parses the acquired field expression to be processed to obtain the target atomic field corresponding to the field expression, thereby being able to automatically process complex field expressions, improve the parsing efficiency of the field expression, and reduce errors caused by human intervention. By searching according to the target atomic field to determine the field knowledge corresponding to the target atomic field, rapid acquisition and precise matching of field knowledge are achieved. Due to the accurate match between field knowledge and target atomic field, when the field interpretation is automatically generated according to the field knowledge, target atomic field and field information, the generation efficiency of the field interpretation is improved and the accuracy of field generation is guaranteed.

[0197] The present disclosure also provides a computer device having the above Figure 6 An explanation generating device for the field expression shown.

[0198] See also Figure 7 , Figure 7 is a schematic diagram of a computer device provided by an optional embodiment of the present disclosure, such as Figure 7 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.

[0199] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0200] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0201] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created according to the use of the computer device, and the like.

[0202] In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage devices. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0203] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0204] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 7 The example of connecting through bus is taken in the following.

[0205] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0206] The computer device also includes a communication interface, which is used for the computer device to communicate with other devices or a communication network.

[0207] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0208] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.

[0209] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for generating an explanation of a field expression, characterized in that: The method comprises: Obtaining the field expression to be processed and the field information corresponding to the field expression; Parsing the field expression to obtain a target atomic field corresponding to the field expression; Searching the target atomic field to obtain field knowledge corresponding to the target atomic field; A field interpretation of the field expression is generated according to the field knowledge, the target atomic field and the field information.

2. The method according to claim 1, characterized in that The parsing of the field expression to obtain a target atomic field corresponding to the field expression includes: Based on the expression type of the field expression, determine a parsing method that matches the expression type; The field expression is split into fields according to the parsing method to obtain the target atomic field corresponding to the field expression.

3. The method according to claim 2, characterized in that The field expression is split into fields according to the parsing method to obtain a target atomic field corresponding to the field expression, including: Perform field splitting on the field expression according to the parsing method to obtain initial atomic fields; Analyzing the field blood relationship corresponding to each initial atomic field in the initial atomic field; The initial atomic field is split according to the field blood relationship to generate the target atomic field.

4. The method according to claim 1, characterized in that: The searching the target atomic field to obtain field knowledge corresponding to the target atomic field includes: Determining a knowledge source related to the target atomic field according to the attribute information of the target atomic field; Splitting the knowledge in different knowledge sources to obtain text index fragments corresponding to the knowledge sources; According to the relevance between the text index segment and the target atomic field, field knowledge related to the target atomic field is determined.

5. The method according to claim 4, characterized in that The determining, according to the relevance between the text index segment and the target atomic field, field knowledge related to the target atomic field includes: Retrieving field knowledge related to the target atomic field from the knowledge source according to the literal relevance between the text index segment and the target atomic field; and / or, According to the semantic relevance between the text index segment and the target atomic field, field knowledge related to the target atomic field is retrieved from the knowledge source.

6. The method according to claim 4, characterized in that Also includes: Based on the field blood relationship of the target atomic field, determining the target base table where the target atomic field is located; The field knowledge related to the target atomic field is determined by utilizing the field knowledge in the target base table.

7. The method according to any one of claims 4 to 6, characterized in that: Also includes: Extracting key atomic fields from the target atomic fields; Statistics are collected on the field data of the key atomic field to generate statistical description information of the key atomic field.

8. The method according to claim 1, characterized in that: The generating a field interpretation of the field expression according to the field knowledge, the target atomic field and the field information includes: Formatting the field knowledge, the target atomic field and the field information to obtain structured information; Summarizing the field knowledge to generate entry content of the target atomic field; Based on the structured information and the entry content, field interpretations in different languages ​​are generated for the field expressions.

9. The method according to claim 1 or 8, characterized in that: Also includes: Verifying the field interpretation and generating a verification result of the field interpretation; The generation strategy of the field explanation is optimized based on the verification result.

10. The method according to claim 1 or 8, characterized in that: Also includes: Build a field data lineage graph based on field dependencies; Topologically sorting the fields in the data lineage graph using a preset sorting method to generate a field topological sorting result; According to the field topological sorting result, fields are sequentially generated, changed or inserted in the field data lineage graph.

11. The method according to claim 1, characterized in that: Also includes: storing the field interpretation and related information corresponding to the field interpretation in a database in different languages; When it is detected that the field interpretation is updated, the field interpretation in the database is dynamically updated.

12. The method according to claim 11, characterized in that Also includes: Obtaining a query statement, parsing the query statement, and determining each to-be-queried field carried in the query statement; The field to be queried is matched with the field interpretation in the database to obtain a target field interpretation corresponding to the field query request.

13. The method according to claim 11 or 12, characterized in that: Also includes: A field query request is obtained, the field query request is matched with the field interpretation in the database, and a target field interpretation matched by the field query request is determined.

14. A device for generating an explanation of a field expression, characterized in that: The device comprises: An acquisition module, used to acquire a field expression to be processed and field information corresponding to the field expression; An expression parsing module, used to parse the field expression to obtain a target atomic field corresponding to the field expression; A knowledge query module, used to search the target atomic field and obtain field knowledge corresponding to the target atomic field; An explanation generation module is used to generate a field explanation of the field expression according to the field knowledge, the target atomic field and the field information.

15. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for interpreting and generating a field expression as described in any one of claims 1 to 13 by executing the computer instructions.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for interpreting and generating a field expression according to any one of claims 1 to 13.

17. A computer program product, characterized in that It comprises computer instructions, which are used to make a computer execute the method for interpreting and generating a field expression as described in any one of claims 1 to 13.

Citation Information

Cited By

  • Data processing method and device, electronic equipment, storage medium and program product

    CN121166721A