Method and device for processing user problems and storage medium
By constructing metadata tag models, semantic models and knowledge graphs, and generating scenario prompt words, the problem that large language models are difficult to understand the semantics of multi-source heterogeneous data is solved, and more accurate replies and improved user experience is achieved.
Patent Information
- Application Number
- CN202411875683.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-03-25
AI Technical Summary
Existing large language models are difficult to understand the semantics of multi-source heterogeneous data, resulting in information barriers between data, bringing huge difficulties to the business processing of enterprises and reducing user experience.
By obtaining the user's current query problem and metadata of multiple data sources, the metadata tag model is used to label the metadata, construct a semantic model and knowledge graph, generate multiple scenario prompt words, and finally determine the reply based on the current query problem and scenario prompt words.
Strengthen the correlation between metadata, break the ‘information island’ between metadata, improve the understanding and processing ability of query problems, get more accurate responses, and improve user experience.
Smart Images

Figure CN119692450A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device and storage medium for processing user problems. Background Art
[0002] With the continuous development of digital transformation of industrial manufacturing enterprises, the deep integration of new generation information technology and manufacturing industry has promoted the digital construction of enterprises in the industrial field in all links. The relationship between different systems within the enterprise has become more and more complex, and more and more multi-source heterogeneous massive data has accumulated. These data often present the phenomenon of "information islands", scattered in various business systems, and there are great differences in the data format and structure of these data. At present, large language models are gradually being widely used and are often used to process various businesses. However, existing large language models often find it difficult to understand the semantics of these data, and the information barriers between data also make it impossible for the model to accurately grasp the relationship between data, which brings great difficulties to the business processing of enterprises and reduces the user experience. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a method, device and storage medium for processing user problems, so as to solve the problems of difficulty in understanding data and poor user experience in the prior art.
[0004] In order to achieve the above-mentioned object, the first aspect of the present application provides a method for handling user problems, the method comprising:
[0005] Get the user's current query question;
[0006] Obtain metadata from a variety of data sources;
[0007] All metadata are labeled and classified using the constructed metadata label model to obtain a label for each metadata, wherein the metadata label model defines a mapping relationship between various label types and metadata;
[0008] A semantic model is constructed based on all metadata and all metadata labels, and each metadata is semanticized through the semantic model to obtain a semantic result for each metadata;
[0009] Construct a knowledge graph based on the semantic results of all metadata, where the knowledge graph includes an entity set and an association set used to represent the relationship between entities in the entity set;
[0010] Generate multiple context prompt words based on the knowledge graph;
[0011] Determine a response to the current query question based on the current query question and multiple situational prompt words.
[0012] In an embodiment of the present application, determining a response to the current query question based on the current query question and multiple contextual prompt words includes: determining a candidate contextual prompt word corresponding to the current query question from multiple contextual prompt words; retrieving a target entity corresponding to the current query question and a target relationship between target entities from a knowledge graph; and determining a response to the current query question based on the candidate contextual prompt words, the target entity, and the target relationship.
[0013] In an embodiment of the present application, determining a response to the current query question based on candidate scenario prompt words, target entities, and target relationships includes: updating candidate scenario prompt words based on the target entity and the target relationship to obtain target scenario prompt words; and inputting the target scenario prompt words into the large model to obtain a response.
[0014] In an embodiment of the present application, determining a candidate scenario prompt word corresponding to a current query question from a plurality of scenario prompt words includes: determining current metadata in the current query question; determining a current scene of the current query question based on the current metadata; and determining a scenario prompt word corresponding to the current scene from a plurality of scenario prompt words as a candidate scenario prompt word.
[0015] In an embodiment of the present application, constructing a semantic model based on all metadata and labels of all metadata includes: constructing a metamodel based on all metadata, the metamodel is used to describe and manage data for all metadata; constructing a semantic model based on the metamodel and labels of all metadata, the semantic model is used to define entities, entity attributes, relationships and constraints between entities, and hierarchical structures in the metamodel.
[0016] In an embodiment of the present application, metadata includes management metadata, business description metadata and technical metadata, and building a metamodel based on all metadata includes: building a basic model based on management metadata, business description metadata and technical metadata; building an extended model based on metadata among all metadata except management metadata, business description metadata and technical metadata; generating a metamodel based on the basic model and the extended model.
[0017] In an embodiment of the present application, constructing a knowledge graph based on the semantic results of all metadata includes: determining the entity corresponding to each metadata based on the entity attributes in the semantic results, and determining all entities as an entity set; determining the relationship between each metadata based on the semantics and constraints between each metadata in the semantic results, and determining the relationship between each metadata as an association set; generating a knowledge graph based on the entity set and the association set.
[0018] In an embodiment of the present application, generating multiple scenario prompt words based on a knowledge graph includes: obtaining multiple preset scenario descriptions; determining the target metadata corresponding to each preset scenario description; searching for context information corresponding to each target metadata from the knowledge graph; and filling each context information into a preset prompt word template respectively to obtain multiple scenario prompt words.
[0019] A second aspect of the present application provides a device for handling user problems, comprising:
[0020] a memory configured to store instructions;
[0021] The processor is configured to call instructions from the memory and implement the above method for handling user problems when executing the instructions.
[0022] A third aspect of the present application provides a machine-readable storage medium having instructions stored thereon, the instructions being used to enable a machine to execute the above-mentioned method for handling user problems.
[0023] Through the above technical solution, the user's current query question is obtained; metadata from multiple data sources are obtained; all metadata are labeled and classified using the constructed metadata label model to obtain the label of each metadata, wherein the metadata label model defines the mapping relationship between various label types and metadata; a semantic model is constructed according to all metadata and the labels of all metadata, and each metadata is semanticized by the semantic model to obtain the semantic result of each metadata; a knowledge graph is constructed according to the semantic results of all metadata, wherein the knowledge graph includes an entity set and an association set for characterizing the relationship between each entity in the entity set; multiple context prompt words are generated based on the knowledge graph; and a response to the current query question is determined according to the current query question and the multiple context prompt words, so as to strengthen the association between metadata, break the "information island" between metadata, improve the understanding and processing capabilities of query questions, and obtain more accurate responses.
[0024] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present application, but do not constitute a limitation on the embodiments of the present application. In the accompanying drawings:
[0026] Figure 1 A schematic diagram of a process for handling user problems according to an embodiment of the present application is shown;
[0027] Figure 2A schematic diagram schematically shows a method for handling user problems according to an embodiment of the present application;
[0028] Figure 3 The internal structure diagram of a computer device according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present application, and are not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0030] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back...), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0031] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0032] Figure 1 The following schematically shows a flow chart of a method for handling user problems according to an embodiment of the present application. Figure 1 As shown, an embodiment of the present application provides a method for handling user problems, which may include the following steps.
[0033] Step 101: Obtain the user's current query question.
[0034] Step 102: Obtain metadata from multiple data sources.
[0035] Step 103: Use the constructed metadata label model to label and classify all metadata to obtain a label for each metadata, wherein the metadata label model defines a mapping relationship between various label types and metadata.
[0036] Step 104: construct a semantic model according to all metadata and all metadata labels, and semanticize each metadata through the semantic model to obtain a semantic result of each metadata.
[0037] The processor can obtain the user's current query question. The processor can obtain metadata from multiple data sources. Metadata, also known as intermediary data or relay data, is data that describes data, mainly information that describes data attributes, and is used to support functions such as indicating storage location, historical data, resource search, and file records. In an optional embodiment, the processor can obtain metadata through multiple data source connectors / adapters, SQL file parsers, document parsers, table parsers, API collection, and other methods.
[0038] After obtaining the metadata, the processor can use the constructed metadata label model to label and classify all metadata to obtain the label of each metadata. That is, the processor can realize automatic label classification of metadata through the metadata label model to improve classification efficiency. Among them, the metadata label model defines the mapping relationship between various label types and metadata. In a specific embodiment, the label may include role labels, scenario labels, business domain labels, version labels, and data life cycle labels. Among them, the role label can identify the target user group of metadata, such as algorithm engineers, data analysts, data engineers, data governance personnel, business personnel, operation and maintenance personnel, etc. The scenario label can identify the purpose and use scenario of metadata, such as data discovery and search, data analysis and visualization, data quality problem analysis, data processing and development, machine learning model training, data compliance governance, etc. The business domain label can identify the business professional field to which the metadata belongs, such as equipment research and development design, production and manufacturing, supply chain management, customer sales and after-sales service, financial management, etc.
[0039] After obtaining the labels of all metadata, the processor can build a semantic model based on all metadata and the labels of all metadata. After building the semantic model, the processor can semanticize each metadata through the semantic model to obtain the semantic result of each metadata to eliminate the ambiguity of the metadata.
[0040] In an embodiment of the present application, constructing a semantic model based on all metadata and labels of all metadata includes: constructing a metamodel based on all metadata, the metamodel is used to describe and manage data for all metadata; constructing a semantic model based on the metamodel and labels of all metadata, the semantic model is used to define entities, entity attributes, relationships and constraints between entities, and hierarchical structures in the metamodel.
[0041] The processor can build a semantic model based on all metadata and the labels of all metadata. Specifically, the processor can build a metamodel based on all metadata, and the metamodel is used to describe and manage data for all metadata. After obtaining the metamodel, the processor can build a semantic model based on the metamodel and the labels of all metadata. The semantic model is used to define entities, entity attributes, relationships and constraints between entities, and hierarchical structures in the metamodel.
[0042] In an embodiment of the present application, metadata includes management metadata, business description metadata and technical metadata, and building a metamodel based on all metadata includes: building a basic model based on management metadata, business description metadata and technical metadata; building an extended model based on metadata among all metadata except management metadata, business description metadata and technical metadata; generating a metamodel based on the basic model and the extended model.
[0043] Metadata may include management metadata, business description metadata, and technical metadata. For example, management metadata may include data generation agency, data maintenance agency, data collection agency, data status, data production time, etc. Business description metadata may include data business classification, data business description, data concept hierarchy, etc. Technical metadata may include data type, data format, data value range, etc. The processor may construct a metamodel based on all metadata. Specifically, the processor may construct a basic model based on management metadata, business description metadata, and technical metadata. The processor may construct an extended model based on metadata other than management metadata, business description metadata, and technical metadata in all metadata. After obtaining the basic model and the extended model, the processor may generate a metamodel based on the basic model and the extended model. In a specific embodiment, the metamodel may be a combination of a basic model and a plurality of extended models.
[0044] Step 105: Construct a knowledge graph based on the semantic results of all metadata, wherein the knowledge graph includes an entity set and an association set for representing the relationship between entities in the entity set.
[0045] After obtaining the semantic results of each metadata, the processor can construct a knowledge graph based on the semantic results of all metadata, wherein the knowledge graph includes an entity set and an association set for representing the relationship between entities in the entity set.
[0046] In a specific embodiment, the entities in the entity set may be business terms, business rules, data sources, table schemas, associated indicators, data processing tasks, data reports, data quality rules, and data security levels. Among them, business terms refer to the steps and sequences that describe business activities, such as order processing procedures, production planning procedures, etc. Business rules refer to the description of the constraint relationship between data, such as "a contract can only belong to one primary customer", etc. Data sources refer to the description of which business system or database the data comes from, such as SAP (Enterprise Resource Planning System), MES (Manufacturing Execution System), CRM (Customer Relationship Management System), etc. Table Schema refers to the description of how data is organized into different entities, attributes, and the relationships between them, such as a relational database table that stores "contract" information, including library table names, field names, types, comments, constraints, and default values, etc. Associated indicators refer to the description of business indicators and dimensions, such as sales, customer satisfaction, etc. Data processing tasks refer to tasks that describe the data ETL (Extract-Transform-Load, which is used to describe the process of extracting, transforming, and loading data from the source to the destination, and is the lifeline of the data warehouse), such as data cleaning and data conversion. Data reports refer to data analysis reports that describe data applications, such as sales reports and production reports. Data quality rules refer to data quality verification rules, such as data integrity rules and data consistency rules. Data security levels refer to the sensitivity of data, such as internal disclosure, internal confidentiality, external confidentiality, and external disclosure. Association sets can include multiple relationships between entities, such as inclusion relationships, source relationships, output relationships, belonging relationships, and responsible relationships. For example, an inclusion relationship can mean that a business process contains multiple business terms. A source relationship can mean that the customer information table schema comes from a CRM data source. An output relationship can mean that an association indicator is produced from a data processing task. A belonging relationship can mean that the data security level belongs to a data field. A responsible relationship can mean that the data management department is responsible for a certain business process.
[0047] In an embodiment of the present application, constructing a knowledge graph based on the semantic results of all metadata includes: determining the entity corresponding to each metadata based on the entity attributes in the semantic results, and determining all entities as an entity set; determining the relationship between each metadata based on the semantics and constraints between each metadata in the semantic results, and determining the relationship between each metadata as an association set; generating a knowledge graph based on the entity set and the association set.
[0048] The processor can build a knowledge graph based on the semantic results of all metadata. Specifically, the processor can determine the entity corresponding to each metadata based on the entity attributes in the semantic results, and determine all entities as an entity set. The processor can determine the relationship between each metadata based on the semantics and constraints between each metadata in the semantic results, and determine the relationship between each metadata as an association set. After obtaining the entity set and association set, the processor can generate a knowledge graph based on the entity set and association set to break the "information islands" between metadata, establish connections between metadata, and provide rich contextual information.
[0049] Step 106: Generate multiple context prompt words based on the knowledge graph.
[0050] After obtaining the knowledge graph, the processor can generate multiple situational prompt words based on the knowledge graph.
[0051] In an embodiment of the present application, generating multiple scenario prompt words based on a knowledge graph includes: obtaining multiple preset scenario descriptions; determining the target metadata corresponding to each preset scenario description; searching for context information corresponding to each target metadata from the knowledge graph; and filling each context information into a preset prompt word template respectively to obtain multiple scenario prompt words.
[0052] The processor can generate multiple scenario prompt words based on the knowledge graph. Specifically, the processor can obtain multiple preset scenario descriptions. The preset scenario description can be constructed based on actual needs. After obtaining multiple preset scenario descriptions, the processor can determine the target metadata corresponding to each preset scenario description. And search for context information corresponding to each target metadata from the knowledge graph. After obtaining the context information corresponding to each target metadata, the processor can fill each context information into the preset prompt word template respectively to obtain multiple scenario prompt words. The preset prompt word template can be a prompt word template for a large model.
[0053] Step 107: Determine a response to the current query question based on the current query question and multiple context prompt words.
[0054] After obtaining the multiple context prompt words, the processor may determine a response to the current query question based on the current query question and the multiple context prompt words.
[0055] In an embodiment of the present application, determining a response to the current query question based on the current query question and multiple contextual prompt words includes: determining a candidate contextual prompt word corresponding to the current query question from multiple contextual prompt words; retrieving a target entity corresponding to the current query question and a target relationship between target entities from a knowledge graph; and determining a response to the current query question based on the candidate contextual prompt words, the target entity, and the target relationship.
[0056] The processor may determine a reply to the current query question based on the current query question and multiple contextual prompt words. Specifically, the processor may determine a candidate contextual prompt word corresponding to the current query question from multiple contextual prompt words. After obtaining the candidate contextual prompt word, the processor may retrieve the target entity corresponding to the current query question and the target relationship between the target entities from the knowledge graph. After retrieving the target entity and the target relationship between the target entities, the processor may determine a reply to the current query question based on the candidate contextual prompt word, the target entity, and the target relationship.
[0057] In an embodiment of the present application, determining a candidate scenario prompt word corresponding to a current query question from a plurality of scenario prompt words includes: determining current metadata in the current query question; determining a current scene of the current query question based on the current metadata; and determining a scenario prompt word corresponding to the current scene from a plurality of scenario prompt words as a candidate scenario prompt word.
[0058] The processor may determine the scenario prompt word to be selected corresponding to the current query question from multiple scenario prompt words. Specifically, the processor may determine the current metadata in the current query question. For example, the processor may use a metadata extraction model to extract the current metadata from the current query question. After obtaining the current metadata, the processor may determine the current scene of the current query question based on the current metadata. After obtaining the current scene, the processor may determine the scenario prompt word corresponding to the current scene from the multiple scenario prompt words as the scenario prompt word to be selected.
[0059] In an embodiment of the present application, determining a response to the current query question based on candidate scenario prompt words, target entities, and target relationships includes: updating candidate scenario prompt words based on the target entity and the target relationship to obtain target scenario prompt words; and inputting the target scenario prompt words into the large model to obtain a response.
[0060] The processor can determine the reply to the current query question based on the scenario prompt words to be selected, the target entity and the target relationship. Specifically, the processor can update the scenario prompt words to be selected based on the target entity and the target relationship to obtain the target scenario prompt words. After obtaining the target scenario prompt words, the processor can input the target scenario prompt words into the large model to obtain a reply, effectively reducing the illusion of the large model and improving the accuracy of the large model's reply. In an optional embodiment, the processor can use the target entity and the target relationship to supplement or fill in the scenario prompt words to be selected to obtain the target scenario prompt words.
[0061] In the embodiments of the present application, Figure 2As shown, the processor can obtain metadata from a variety of data sources. And perform metadata management, data tag management, data catalog, standard catalog, indicator catalog and terminology catalog on the metadata at the data model layer. At the data semantic layer, the metadata is semanticized through the semantic data model to build a knowledge graph. And use a semantic network graph database to store metadata. The processor can generate Prompts based on the knowledge graph, and input the Prompts into the LLM (Large Language Model) in combination with the business context to output a reply through the large language model. The reply can be used in intelligent applications, including data understanding, data analysis and visualization, and data development assistants, so that the large language model can accurately generate replies to questions such as data query, analysis and use in the professional field of the enterprise.
[0062] Through the above technical solutions, the association between metadata is strengthened, the "information islands" between metadata are broken, the understanding and processing capabilities of query questions are improved, and more accurate responses are obtained.
[0063] Figure 1 FIG. 1 is a flow chart of a method for handling user questions in one embodiment. It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0064] The present application also provides a device for handling user problems, including:
[0065] a memory configured to store instructions;
[0066] The processor is configured to call instructions from the memory and implement the above method for handling user problems when executing the instructions.
[0067] An embodiment of the present application also provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to enable a machine to execute the above-mentioned method for handling user problems.
[0068] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor A01, a network interface A02, a memory (not shown in the figure) and a database (not shown in the figure) connected via a system bus. Among them, the processor A01 of the computer device is used to provide computing and control capabilities. The memory of the computer device includes an internal memory A03 and a non-volatile storage medium A04. The non-volatile storage medium A04 stores an operating system B01, a computer program B02 and a database (not shown in the figure). The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 in the non-volatile storage medium A04. The database of the computer device is used to store metadata, tags, semantic results, knowledge graphs, situational prompts, and replies. The network interface A02 of the computer device is used to communicate with an external terminal through a network connection. When the computer program B02 is executed by the processor A01, a method for processing user problems is implemented.
[0069] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0070] An embodiment of the present application provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: obtaining a user's current query question; obtaining metadata from multiple data sources; using a constructed metadata label model to label and classify all metadata to obtain a label for each metadata, wherein the metadata label model defines a mapping relationship between various label types and metadata; constructing a semantic model based on all metadata and the labels of all metadata, and semanticizing each metadata through the semantic model to obtain a semantic result for each metadata; constructing a knowledge graph based on the semantic results of all metadata, wherein the knowledge graph includes an entity set and an association set for characterizing the relationship between each entity in the entity set; generating multiple context prompt words based on the knowledge graph; and determining a response to the current query question based on the current query question and the multiple context prompt words.
[0071] In one embodiment, determining a response to the current query question based on the current query question and multiple contextual prompt words includes: determining a candidate contextual prompt word corresponding to the current query question from multiple contextual prompt words; retrieving a target entity corresponding to the current query question and a target relationship between target entities from a knowledge graph; and determining a response to the current query question based on the candidate contextual prompt words, the target entity, and the target relationship.
[0072] In one embodiment, determining a response to the current query question based on candidate context prompt words, target entities, and target relationships includes: updating candidate context prompt words based on the target entity and the target relationship to obtain target context prompt words; and inputting the target context prompt words into a large model to obtain a response.
[0073] In one embodiment, determining a candidate scenario prompt word corresponding to a current query question from a plurality of scenario prompt words includes: determining current metadata in the current query question; determining a current scene of the current query question based on the current metadata; and determining a scenario prompt word corresponding to the current scene from a plurality of scenario prompt words as a candidate scenario prompt word.
[0074] In one embodiment, constructing a semantic model based on all metadata and labels of all metadata includes: constructing a metamodel based on all metadata, the metamodel is used to describe and manage data for all metadata; constructing a semantic model based on the metamodel and labels of all metadata, the semantic model is used to define entities, entity attributes, relationships and constraints between entities, and hierarchical structures in the metamodel.
[0075] In one embodiment, metadata includes management metadata, business description metadata, and technical metadata. Building a metamodel based on all metadata includes: building a basic model based on management metadata, business description metadata, and technical metadata; building an extended model based on metadata among all metadata except management metadata, business description metadata, and technical metadata; and generating a metamodel based on the basic model and the extended model.
[0076] In one embodiment, constructing a knowledge graph based on the semantic results of all metadata includes: determining the entity corresponding to each metadata based on the entity attributes in the semantic results, and determining all entities as an entity set; determining the relationship between each metadata based on the semantics and constraints between each metadata in the semantic results, and determining the relationship between each metadata as an association set; generating a knowledge graph based on the entity set and the association set.
[0077] In one embodiment, generating multiple scenario prompt words based on a knowledge graph includes: obtaining multiple preset scenario descriptions; determining the target metadata corresponding to each preset scenario description; searching for context information corresponding to each target metadata from the knowledge graph; and filling each context information into a preset prompt word template to obtain multiple scenario prompt words.
[0078] The present application also provides a computer program product which, when executed on a data processing device, is suitable for executing a program for initiating the steps of the method for handling a user question.
[0079] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0080] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0081] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0082] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0083] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0084] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0085] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0086] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0087] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for handling user problems, characterized in that: The method comprises: Get the user's current query question; Obtain metadata from a variety of data sources; Using the constructed metadata label model to label and classify all metadata to obtain a label for each metadata, wherein the metadata label model defines a mapping relationship between various label types and metadata; Building a semantic model according to all metadata and all metadata labels, and semanticizing each metadata through the semantic model to obtain a semantic result of each metadata; Constructing a knowledge graph according to the semantic results of all metadata, wherein the knowledge graph includes an entity set and an association set for representing the relationship between each entity in the entity set; Generate multiple context prompt words based on the knowledge graph; A reply to the current query question is determined according to the current query question and the multiple context prompt words.
2. The method for handling user problems according to claim 1, characterized in that: Determining a reply to the current query question according to the current query question and the multiple context prompt words includes: Determining a candidate context prompt word corresponding to the current query question from the multiple context prompt words; Retrieving target entities corresponding to the current query question and target relationships between the target entities from the knowledge graph; A response to the current query question is determined according to the candidate context prompt words, the target entity, and the target relationship.
3. The method for handling user problems according to claim 2, characterized in that: The step of determining a response to the current query question according to the candidate context prompt words, the target entity, and the target relationship includes: updating the candidate scenario prompt word according to the target entity and the target relationship to obtain a target scenario prompt word; The target situation prompt word is input into the large model to obtain the response.
4. The method for handling user problems according to claim 2, characterized in that: The step of determining a candidate context prompt word corresponding to the current query question from the plurality of context prompt words comprises: Determining current metadata in the current query question; Determining a current scenario of the current query question according to the current metadata; The scenario prompt word corresponding to the current scenario among the multiple scenario prompt words is determined as the scenario prompt word to be selected.
5. The method for handling user problems according to claim 1, characterized in that: Building a semantic model based on all metadata and all metadata labels includes: Building a meta-model according to all the metadata, wherein the meta-model is used to perform data description and data management on all the metadata; The semantic model is constructed according to the meta-model and the labels of all the metadata, and the semantic model is used to define the entities, entity attributes, relationships and constraints between entities, and hierarchical structures in the meta-model.
6. The method for handling user problems according to claim 5, characterized in that: The metadata includes management metadata, business description metadata, and technical metadata. Constructing a meta-model based on all the metadata includes: Building a basic model according to the management metadata, the business description metadata and the technical metadata; Building an extended model according to metadata other than the management metadata, the business description metadata and the technical metadata among all the metadata; The meta-model is generated according to the basic model and the extended model.
7. The method for handling user problems according to claim 1, characterized in that: The construction of the knowledge graph according to the semantic results of all metadata includes: Determine the entity corresponding to each metadata according to the entity attributes in the semantic result, and determine all entities as an entity set; Determine the relationship between the metadata according to the semantics and constraints between the metadata in the semantic result, and determine the relationship between the metadata as an association set; The knowledge graph is generated according to the entity set and the association set.
8. The method for handling user problems according to claim 1, characterized in that: The generating of a plurality of context prompt words based on the knowledge graph comprises: Get multiple preset scenario descriptions; Determine the target metadata corresponding to each preset scenario description; Finding context information corresponding to each target metadata from the knowledge graph; Each piece of context information is filled into the preset prompt word template respectively to obtain the multiple situation prompt words.
9. A device for handling user problems, characterized in that: include: a memory configured to store instructions; A processor is configured to call the instructions from the memory and implement the method for handling user questions according to any one of claims 1 to 8 when executing the instructions.
10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores instructions for causing a machine to execute the method for processing user questions according to any one of claims 1 to 8.
Citation Information
Cited By
SQL statement review method, system and equipment based on large model and storage medium
CN120763929A
SQL statement review methods, systems, devices, and storage media based on large-scale models
CN120763929B