Atlas construction method and device, electronic equipment and computer readable medium

By using large language models and text vector libraries to generate and supplement target business maps, the problem of long-term and poor coverage of map construction in the existing technology is solved, and more efficient map construction and better user experience is achieved.

CN120218219AActive Publication Date: 2025-06-27BEIJING ZHONGQI HUIYUN TECH CO LTD +1
View PDF 15 Cites 0 Cited by

Patent Information

Application Number
CN202510342728.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2025-06-27
Estimated Expiration
2045-03-21

AI Technical Summary

Technical Problem

When the model-based pre-training method does not have ready-made training data, it takes a lot of time to label the data, and the map cannot be further supplemented, resulting in poor map coverage and the related operations of the generated target business map.

Method used

By responding to user questions, we obtain the target business map of the target industry chain's construction request text, use a large language model to generate the basic target business map, and generate a supplementary text set through the text vector library, further extract triples, combine to generate a complete target business map, and provide an operation interface to support scaling, folding and saving operations.

Benefits of technology

The map construction process has been simplified, the map has been further improved, and the user experience has been improved. By omitting the data annotation process, a map with a wider coverage is generated, and further operations on the map are supported.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120218219A_ABST
    Figure CN120218219A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an atlas construction method and device, electronic equipment and a computer readable medium. A specific embodiment of the method comprises the following steps: in response to a received question of a user, obtaining a graph construction request text according to a keyword extracted from the question of the user; performing format processing on the target business atlas construction request text to obtain a processed atlas construction request; generating a basic target business atlas based on the processed atlas construction request and a preset large language model; generating a basic target business atlas supplementary text set based on the target business related content of the text vector library and the basic target business atlas; extracting the basic target business atlas supplementary text set to obtain a supplementary triple; and generating a complete target service atlas in combination with the supplementary triad and the basic target service atlas. According to the embodiment, the graph with a wider coverage can be generated, a data annotation process is omitted, corresponding equipment can be connected to operate the graph, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a graph construction method, device, electronic device, and computer-readable medium. Background Art

[0002] Knowledge graph is a way to represent knowledge in a graph structure, which presents complex knowledge systems in a systematic way through nodes (entities) and edges (relationships). It can not only effectively organize and utilize information, but also provide strong support for applications such as intelligent question and answer, recommendation systems, and semantic search. In conventional business scenarios, knowledge graphs also have extensive and important applications. Most business graphs can be built around core entities such as users, products, and related channels. By establishing relationships between users, products, and related channels, a knowledge network that reflects the full picture of related businesses can be formed. At present, most knowledge graph construction methods use a model-based pre-training method. This method first trains the model to learn the patterns and rules in a large amount of data, and then performs information extraction tasks, thereby efficiently extracting valuable entities and relationships from the original data and building a complete knowledge graph.

[0003] However, when the above method is used to perform extraction tasks, the following technical problems often occur:

[0004] When there is no ready-made training data, the model-based pre-training method requires a lot of time to label the data and cannot further supplement the graph, resulting in poor graph coverage and the inability to perform related operations (such as deletion, scaling, folding, etc.) on the generated target business graph.

[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure concept and therefore it may contain information that does not form the prior art that is already known to a person of ordinary skill in the art. Summary of the invention

[0006] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.

[0007] Some embodiments of the present disclosure propose graph construction methods, devices, electronic devices and computer-readable media to solve one or more of the technical problems mentioned in the above background technology section.

[0008] In a first aspect, some embodiments of the present disclosure provide a method for constructing a business map. The method includes: in response to receiving a user's question, obtaining a text for constructing a target business map for a target industrial chain according to keywords extracted from the user's question, where the target industrial chain includes a home furnishing industrial chain, an automotive industrial chain, and a logistics industrial chain, and the business map is a map in which various elements, relationships, and chronological processes in the industrial chain are presented in a graphical manner; performing format processing on the text for constructing the target business map to obtain a processed map construction request; generating a basic target business map based on the processed map construction request and a preset large language model; generating a supplementary text set for the basic target business map based on the target business-related content in the text vector library and the basic target business map; extracting supplementary triples from the supplementary text set for the basic target business map; generating a complete target business map by combining the supplementary triples and the basic target business map; in response to generating the complete target business map, sending the complete target business map to an associated display of the user for display; and in response to detecting that the associated display is in a display state, controlling the associated display to superimpose a preset operation interface on the visualized complete target business map, where the operation functions of the preset operation interface include zooming, folding, and saving.

[0009] Second aspect, some embodiments of the present disclosure provide a graph construction device, which includes: an acquisition unit configured to, in response to receiving a user's question, obtain a target business graph construction request text for a target industrial chain according to keywords extracted from the user's question, where the target industrial chain includes a home furnishing industrial chain, an automotive industrial chain, and a logistics industrial chain, and the business graph is a graph presenting various elements, relationships, and chronological processes in the industrial chain in a graphical manner; a format processing unit configured to perform format processing on the target business graph construction request text to obtain a processed graph construction request; a first generation unit configured to generate a basic target business graph based on the processed graph construction request and a preset large language model; a second generation unit configured to generate a supplementary text set for the basic target business graph based on the target business-related content in the text vector library and the basic target business graph; an extraction unit configured to extract from the supplementary text set for the basic target business graph to obtain supplementary triples; a third generation unit configured to combine the supplementary triples and the basic target business graph to generate a complete target business graph; a sending unit configured to, in response to generating the complete target business graph, send the complete target business graph to an associated display of the user for display; a control unit configured to, in response to detecting that the associated display is in a display state, control the associated display to superimpose a preset operation interface on the visualized complete target business graph, where the operation functions of the preset operation interface include zooming, folding, and saving.

[0010] Third aspect, some embodiments of the present disclosure provide an electronic device, which includes: one or more processors; a storage device storing one or more programs thereon, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the first aspect above.

[0011] Fourth aspect, some embodiments of the present disclosure provide a computer-readable medium storing a computer program thereon, where the program, when executed by a processor, implements the method described in any implementation manner of the first aspect above.

[0012] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: Through a method for constructing a knowledge graph of the present disclosure, the process of labeling tags and training by calling a large language model can be replaced, and the constructed knowledge graph can be further expanded by extracting from a text library, and a corresponding operation interface for the complete graph can be displayed and provided to users through self-developed software. Thus, the process of constructing the graph can be simplified, the constructed graph can be further improved, and the user experience can be enhanced. Specifically, the reasons for the poor user experience of most graph construction methods are as follows: When there is no ready-made training data for the pre-training method based on the model, a large amount of time is required to label the data, and the graph cannot be further supplemented, resulting in a poor coverage of the graph and a poor user experience. Based on this, the present disclosure provides graph construction methods for some embodiments. First, in response to receiving a user's question, according to the keywords extracted from the user's question, a request text for constructing a target business graph for a target industrial chain is obtained, where the target industrial chain includes a home furnishing industrial chain, an automotive industrial chain, and a logistics industrial chain, and the business graph is a graph in which various elements, relationships, and chronological processes in the industrial chain are presented in a graphical manner. Thus, the user's needs are obtained. Then, format processing is performed on the above-mentioned request text for constructing a target business graph to obtain a processed graph construction request. Thus, the graph construction request is processed through a template, enabling the user's needs to better call the subsequent large language model. Then, based on the above-mentioned processed graph construction request and a preset large language model, a basic target business graph is generated. Thus, the basic target business graph required by the user is generated by calling the large language model. Then, based on the target business-related content in the text vector library and the above-mentioned basic target business graph, a supplementary text set for the basic target business graph is generated. Thus, the constructed basic target business graph can be further improved by extracting from the text set. Then, extraction is performed on the above-mentioned supplementary text set for the basic target business graph to obtain supplementary triples. Then, combining the above-mentioned supplementary triples and the above-mentioned basic target business graph, a complete target business graph is generated. Then, in response to generating the complete target business graph, the above-mentioned complete target business graph is sent to the associated display of the above-mentioned user for display. Then, in response to detecting that the above-mentioned associated display is in a display state, the above-mentioned associated display is controlled to superimpose and display a preset operation interface on the visualized above-mentioned complete target business graph, where the operation functions of the above-mentioned preset operation interface include zooming, folding, and saving. Thus, the user can operate on the generated complete graph. Thus, the above-mentioned obtained supplementary triples can be added to the above-mentioned basic target business graph to generate a graph with a wider coverage. On the one hand, the above-mentioned graph construction method saves the process of data annotation by using a large language model. On the other hand, the above-mentioned graph construction method can further supplement the constructed basic target business graph, improving the coverage of the generated graph.Thus, on the premise of being able to generate a more extensive coverage map, the data annotation process is omitted, and the generated complete map can be further operated on through associated devices, improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In combination with the accompanying drawings and with reference to the following specific embodiments, the above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent. Throughout the accompanying drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the elements and elements are not necessarily drawn to scale.

[0014] Figure 1 is a flowchart of some embodiments of the map construction method according to the present disclosure;

[0015] Figure 2 is a schematic structural diagram of some embodiments of the map construction device according to the present disclosure;

[0016] Figure 3 is a schematic structural diagram of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0017] The embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the accompanying drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.

[0018] In addition, it should be noted that only parts related to the relevant invention are shown in the drawings for the sake of convenience of description. Without conflict, the embodiments in the present disclosure and the features in the embodiments can be combined with each other.

[0019] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules, or units, and are not used to limit the order or interdependence relationship of the functions performed by these devices, modules, or units.

[0020] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly stated in the context, it should be understood as "one or more".

[0021] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.

[0022] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0023] Figure 1 FIG. 100 is a flowchart of some embodiments of a graph construction method according to the present disclosure. The graph construction method includes the following steps:

[0024] Step 101, in response to receiving a user's question, obtain a target business graph construction request text for a target industrial chain according to keywords extracted from the user's question.

[0025] In some embodiments, the execution entity, in response to receiving a user's question, obtains a target business graph construction request text for a target industrial chain according to keywords extracted from the user's question. The target industrial chain includes a home furnishing industrial chain, an automotive industrial chain, and a logistics industrial chain. The business graph is a graph in which various elements, relationships, and temporal processes in the industrial chain are presented in a graphical manner. The user's question may be a picture construction request input by the user. For example, how to construct a home furnishing knowledge graph. The execution entity may extract keywords from the user's question through the TF-IDF algorithm. The execution entity of the graph construction method may be a computer device or an electronic device connected to the computer wirelessly or by wire. It should be noted that the above wireless connection methods may include, but are not limited to, 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other currently known or future-developed wireless connection methods. Among them, the target business graph construction request text may refer to a clear instruction or requirement description text proposed by the user or the system for constructing a knowledge graph in a specific business domain. The specific business domain may include, but is not limited to: industrial chain (such as home furnishing production and automotive manufacturing, etc.) graphs and knowledge (such as poems, movies, and paintings, etc.) chain graphs, etc. The acquisition methods of the target business graph construction request text may include, but are not limited to: typing input and voice conversion, etc.

[0026] Step 102, perform format processing on the target business graph construction request text to obtain a processed graph construction request.

[0027] In some embodiments, the execution entity may perform format processing on the target business graph construction request text to obtain a processed graph construction request. Among them, the format processing may standardize or normalize the graph construction request submitted by the user to make it meet the requirements of internal system processing. In practice, the execution entity may unify the data formats in the request. For example, unify the date format to the ISO standard format and unify the text encoding to UTF-8, etc.

[0028] In some alternative implementations of some embodiments, the above-mentioned execution entity may process the format of the above-mentioned target business graph construction request text through the following steps to obtain a processed graph construction request:

[0029] First step, determine a first engineering template corresponding to the above-mentioned target business graph construction request text. Among them, the above-mentioned first engineering template may be a Prompt engineering template. The above-mentioned Prompt engineering template may be a pre-designed set of prompt information, which stipulates how to input information to tools such as large language models in a suitable manner to guide them to generate knowledge graph construction content that meets specific requirements. In practice, the above-mentioned execution entity may confirm the corresponding first engineering template by identifying words or phrases in the above-mentioned target business graph construction request text. Among them, the corresponding first engineering template may be confirmed by comparing the coincidence degree of keywords or phrases. For example, the target business graph construction request text is a request to construct a knowledge graph about the "smart home industry". There are various Prompt engineering templates stored in the system, such as "Smart Home Industry Knowledge Graph Construction Template", "Intelligent Medical Industry Knowledge Graph Construction Template", "Intelligent Transportation Industry Knowledge Graph Construction Template", etc. The system will accurately locate the "Smart Home Industry Knowledge Graph Construction Template" from the template library based on the keyword "smart home industry" in the request and use it as the preferred Prompt engineering template.

[0030] Step 2: According to the above first engineering template, perform format conversion processing on the above target business graph construction request text to obtain the processed graph construction request. In practice, the above-mentioned execution entity will adjust and transform the original graph construction request according to the requirements such as the prompting method and information organization form specified in the above first engineering template, which may include operations such as rephrasing key information in the request, supplementing necessary context information, and organizing data in the format specified by the template, so as to convert the request into a format suitable for input to the large language model. For example, assume that the above first engineering template requires clearly specifying the specific name of the home furnishing product and the type of attributes to be sorted out in the request. And the above target business graph construction request text only simply mentions "constructing a knowledge graph of smart home products". Then the above target business graph construction request text does not meet the requirements because it does not point out which specific smart home product (such as smart speaker, smart curtain, smart air conditioner, etc.), nor does it clarify the attributes to be sorted out (such as the sound quality characteristics and voice wake-up function of the smart speaker, the opening and closing method and energy efficiency level of the smart curtain, etc.). Then in this step, the above-mentioned execution entity can further ask the user about the specific content of the smart home product to be constructed and organize the request in the format required by the above first engineering template. For example, "Please sort out the smart home device entities (smart lights, smart security cameras, smart door locks), device function entities (remote control switch, brightness adjustment, 24-hour high-definition monitoring, fingerprint unlocking, password unlocking, card swiping unlocking, etc.), control method entities (remote control by mobile APP), and their relationships based on the following smart home-related information: 'This smart home system includes smart lights, smart security cameras, and smart door locks. Among them, the smart lights can be remotely controlled to turn on and off and adjust the brightness through the mobile APP, the smart security camera supports 24-hour high-definition monitoring, and the smart door lock has multiple unlocking methods such as fingerprint, password, and card swiping'." The request processed in this way is more in line with the requirements of the Prompt engineering template and can be directly input to the large language model to generate information related to knowledge graph construction.

[0031] Step 103: Generate a basic target business graph based on the processed graph construction request and a preset large language model.

[0032] In some embodiments, the above-mentioned execution entity can generate a basic target business graph based on the processed graph construction request and a preset large language model. Among them, the above large language model can be chatGPTv3.5. In practice, the above processed graph construction request can be directly sent to the above large language model.

[0033] In some optional implementation manners of some embodiments, the above-mentioned execution entity can generate a basic target business graph based on the above processed graph construction request and a preset large language model:

[0034] Step 1: Input the processed graph construction request into the above-mentioned pre-set large language model to obtain a triple information set. In practice, the above-mentioned pre-set large language model can identify the processed graph construction request, so as to obtain relevant entities and the relationships between them, and output them in the form of triples (entity 1, relationship, entity 2). These triples constitute triple information. Among them, the above-mentioned triple information set can be the collection of all triple information extracted by the above-mentioned large language model. For example, if the processed graph construction request is about the "smart home industry". After sending a request to ChatGPTv3.5, the obtained triple information set may include (smart speaker, function, voice interaction), (smart curtain, control method, mobile APP control), (smart air conditioner, category, smart home device), (intelligent floor cleaning robot, cleaning mode, automatic path planning cleaning), (smart camera, application scenario, home security), etc.

[0035] Step 2: Perform vectorization processing on each triple information in the above triple information set to obtain a vectorized triple information set. Among them, the above vectorization processing can be to convert the triple information in text form into a numerical representation that is easy for a computer to process. In practice, the above-mentioned execution subject can perform vectorization processing on each triple information through a deep learning model framework. Among them, the above deep learning model framework can be a model based on the Transformer architecture (such as BERT (Bidirectional Encoder Representations from Transformers)), which can map each element in the triple to a high-dimensional vector space. For example, for the triple (smart speaker, function, voice interaction), use the BERT model to encode "smart speaker", "function", and "voice interaction" respectively to obtain the corresponding vectors. Suppose the vector corresponding to "smart speaker" is [0.15, 0.22,..., 0.48], the vector corresponding to "function" is [0.33, 0.41,..., 0.62], and the vector corresponding to "voice interaction" is [0.21, 0.34,..., 0.73]. Perform such processing on all triples in the knowledge graph of the smart home industry to obtain the above vectorized triple information set.

[0036] Step 3: Construct a knowledge graph based on the above vectorized triple information to obtain a basic target business knowledge graph. Among them, the above basic target business knowledge graph includes at least one triple. In practice, based on the above vectorized triple information, a graph construction algorithm (such as a construction method based on a graph database) can be used to represent entities as nodes and relationships as edges, constructing a graphical knowledge structure, that is, the above basic target business knowledge graph. For example, according to the vectorized triple information set, entities such as "smart speaker", "smart curtain", "smart air conditioner", "voice interaction", and "mobile APP control" can be represented as nodes, and relationships such as "function", "control method", and "category" can be represented as edges, constructing a simple basic target business knowledge graph to present the association of the smart home industry and its related information in graphical form.

[0037] In some optional implementation manners of some embodiments, the above execution subject may input the processed graph construction request into the above preset large language model to obtain triple information:

[0038] Step 1: Extract information from the above processed graph construction request to obtain key information. Among them, the above key information can be extracted from a large amount of content and can help quickly grasp the key points. For example, "On March 15, 2025, Zhang, a well-known expert in the smart home industry, delivered a keynote speech on the future development trend of smart homes at the Smart Home Exhibition held at the International Convention and Exhibition Center in a certain city, and demonstrated the latest developed smart home appliance control system." The key information may include but is not limited to: date (March 15, 2025), location (International Convention and Exhibition Center in a certain city), person (Zhang), event (delivering a keynote speech on the future development trend of smart homes and demonstrating the latest developed smart home appliance control system), and field of belonging (smart home industry). In practice, the above execution subject can extract information from the above processed graph construction request through an identification model. Among them, the above identification model can be a BiLSTM-CRF model based on deep learning in a named entity recognition (NER) model, which can learn rich text language features through pre-training a large amount of text data, and thus can extract key information from the text. For example, the processed graph construction request is: "Please construct a knowledge graph about the smart door lock, a smart home product, including information such as the brand, model, unlocking method, special features, and compatible door types of the product." After information extraction by the BiLSTM-CRF model, the obtained key information can be "smart door lock", "brand", "model", "unlocking method", "special features", and "compatible door types".

[0039] Step 2: Based on the database of the above large language model, determine the key information knowledge set corresponding to the above key information. Among them, the above large language model has accumulated a large amount of knowledge, and these knowledge are stored in its database. In practice, the above key information can be used to query and match in the database of the large language model to find the knowledge content related to each key information, and the set of these knowledge is the key information knowledge set. For example, for the key information "smart home product, smart door lock", the key information knowledge set found from the large language model database may include, but is not limited to: The smart door lock is a smart home product under a certain company, and there are various models such as Smart Door Lock Pro. The unlocking methods cover fingerprint unlocking, password unlocking, mobile phone NFC unlocking, and Bluetooth key unlocking, etc. The featured functions include real-time monitoring of the door lock status, abnormal alarm reminder, and the door types it adapts to include wooden doors, anti-theft doors, etc.

[0040] Step 3: Extract and process the above key information knowledge set through a preset entity recognition model to obtain an entity set. Among them, the above entity recognition model can be a named entity recognition model based on conditional random field (CRF). The above CRF can be a technology used to identify entities with specific meanings in text, and common entity types include people, organizations, locations, times, works, etc. In practice, a preset named entity algorithm can be used to process the key information knowledge set to identify all entities from it and collect these entities to form an entity set. For example, for the key information knowledge set about "smart door lock", the entity set obtained through entity recognition may include, but is not limited to: "smart door lock" (smart home product entity), "fingerprint unlocking" (unlocking method entity), "password unlocking" (unlocking method entity), "mobile phone APP unlocking" (unlocking method entity), "real-time monitoring" (function entity), "abnormal alarm" (function entity), "wooden door" (door type entity adapted), "metal door" (door type entity adapted), "lithium battery power supply" (power supply method entity), etc.

[0041] Step 4: Perform relation extraction on each entity in the above entity set to obtain a relation set. Among them, the above relation extraction can be to identify the semantic relations between entities from the text. In practice, after obtaining the entity set, the associations between each entity and other entities can be analyzed, and through a preset relation extraction algorithm (such as the Naive Bayes algorithm), the relations between entities are extracted from the key information knowledge set, and these relations are collected to form a relation set. Among them, the above relations can be semantic connections (such as hyponymy and meronymy), logical connections (such as causal relations and association relations), and temporal connections (such as precedence relations) existing between different entities in a knowledge representation structure such as a knowledge graph. For example, for "intelligent door lock" and "fingerprint unlocking" in the entity set, the relation obtained through relation extraction is "unlocking method possessed". For "intelligent door lock" and "real-time monitoring", the relation is "function possessed". For "intelligent door lock" and "wooden door", the relation is "door type adapted to". For "intelligent door lock" and "lithium battery power supply", the relation is "power supply method adopted", etc. These relations constitute the above relation set.

[0042] Step 5: Combine the above entity set and the above relation set to output triple information. In practice, the above entity set and the above relation set can be combined, and each entity and its related relations are sorted in the format of triples to output a series of triple information. For example, according to the above entity set and the above relation set, the output triple information can include but is not limited to: (intelligent door lock, unlocking method possessed, fingerprint unlocking), (intelligent door lock, function possessed, real-time monitoring), (intelligent door lock, door type adapted to, wooden door), (intelligent door lock, power supply method adopted, lithium battery power supply), (intelligent door lock, unlocking method possessed, password unlocking), (intelligent door lock, function possessed, abnormal alarm), etc.

[0043] Optionally, the above execution subject can also perform the following steps:

[0044] Step 1: According to the user request category, obtain the unprocessed training data, where the above unprocessed training data is information related to the above user request category. For example, if the user's request is to construct a furniture industry chain map, then the above unprocessed training data can be a large amount of information related to furniture production and sales companies collected from major websites. Among them, the above related information can include but is not limited to: company basic information (such as company name, establishment time, etc.), production-related information (such as raw material information, production processes and technologies, etc.), and product information (product types and series, etc.). In practice, the original data matching the user request can be collected from data sources (such as databases, file systems, etc.) according to the specific category of the user request.

[0045] In the second step, preprocess the above-mentioned unprocessed training data to obtain processed training data. Among them, the above-mentioned preprocessing can be a process of performing a series of cleaning, transformation, and normalization operations on the unprocessed training data. The above-mentioned preprocessing steps can include, but are not limited to: removing noise data (such as special characters, HTML tags, etc. in the text), handling missing values, performing data standardization (such as normalizing numerical data), word segmentation (for text data), etc.

[0046] In the third step, determine the corresponding lightweight model according to the above-mentioned pre-set large language model. Among them, the above-mentioned lightweight models can include, but are not limited to: DistilGPT, ALBERT, etc. In practice, the above-mentioned execution entity can automatically select a lightweight model. First, the above-mentioned execution entity can first obtain task-related information, where the above-mentioned task-related information can include, but is not limited to: task type, data characteristics, etc. and resource status (such as computing power, storage capacity, etc. converted into quantifiable metrics and parameters). Then, compare the above-mentioned task-related information with the performance parameters, resource requirements, etc. of different lightweight models (such as setting the weights of indicators such as accuracy and speed), and generate a comprehensive score for each model (such as the DistilGPT model score is 83, and the ALBERT model score is 60). Finally, determine the model with the highest score, or screen out the model that meets the conditions and has the best performance according to resource limitations. For example, if the pre-set large language model is GPT-3, for some simple text classification tasks, a lightweight model such as DistilBERT can be selected.

[0047] In the fourth step, initialize the above-mentioned lightweight model through a deep learning framework to obtain an initialized lightweight model. Among them, the above-mentioned deep learning frameworks can include, but are not limited to: TensorFlow, PyTorch. In practice, for example, the PyTorch framework can be used to initialize the DistilBERT model. By defining the structure and parameters of the model, and then calling the corresponding initialization function to complete the initialization operation.

[0048] Step 5: Determine the knowledge distillation loss function based on the basic information of the above large language model and lightweight model. Among them, knowledge distillation is a technique for transferring the knowledge of a large model to a small model. The above knowledge distillation loss function can be used to measure the difference between the output of the lightweight model and the output of the large language model. The above basic information can be the structural features (such as architecture type, number of layers), parameter information (such as parameter distribution, total number of parameters, initialization method, and optimizer type, etc.), and output features (including the dimension and format of the output (such as the length of the output vector, probability distribution, etc.)) of the above large language model and the above lightweight model. In practice, the above executor can determine the knowledge distillation loss function (such as cross-entropy loss function, mean squared error loss function, etc.) by comparing the basic information of the above large language model and the above lightweight model. For example, assume that both the large language model and the lightweight model are based on the Transformer architecture, but the large model has 12 layers, while the lightweight model has only 6 layers. The hidden layer dimensions and the types of attention mechanisms of both are the same, and the output is the Softmax probability distribution for a classification task. Determine the similarity by comparing the following three aspects:

[0049] (1) Architecture similarity: Both are of the Transformer architecture, with the same hidden layer dimensions and attention mechanisms, but different numbers of layers. The similarity is obtained as 85% through quantification (for example, if the hidden layer dimensions and attention mechanisms are the same, the similarity increases by 50%, and if the architectures are the same, it increases by 35%).

[0050] (2) Parameter information: The large model has a larger number of parameters, but the parameter distribution of the lightweight model is similar to that of the large model, and the similarity is obtained as 70%.

[0051] (3) Output features: The outputs of both are Softmax probability distributions with the same dimension (the similarity is obtained as 100%).

[0052] Based on the above parameter information, architecture similarity, and output features (such as the average of the three similarity values), if the combined similarity is higher than the preset threshold (for example, the preset threshold is a similarity of 80%), the above executor can choose the cross-entropy loss function as the knowledge distillation loss function, and if it is lower than the preset threshold, the mean squared error loss function can be chosen.

[0053] Step 6: Load the above large language model according to the attribute information of the large language model to obtain an interface instance of the large language model. Among them, the above attribute information may include, but is not limited to, interface address, access permission, running environment, etc. The above large language model usually exists in the form of pre-training. In practice, the above execution entity can load the above large language model into memory according to the above attribute information. After the loading is completed, an interface instance can be created, which provides an interface for interacting with the large language model and allows input data to be passed to the large language model and its output to be obtained. For example, if the large language model is a pre-trained model on Hugging Face, the model can be loaded using the library provided by Hugging Face and a callable interface instance can be created.

[0054] Step 7: Input the above processed training data into the above large language model, and obtain a soft label set of the training data through the interface instance of the large language model. In practice, the above preprocessed training data can be sequentially input into the interface instance of the above large language model. The large language model will process each input data and output the corresponding prediction results. These prediction results usually appear in the form of probability distributions and are called soft labels. Collecting the soft labels corresponding to all training data, a soft label set of the training data is obtained. For example, for the task of analyzing user reviews of a certain brand of furniture in the home furnishing industry chain, the processed user review texts about this brand of furniture are input into the large language model, and the large language model will output the probability distributions of each comment belonging to different evaluation categories (such as high quality, beautiful design, high cost performance, low quality of materials, rough craftsmanship, expensive price), and these probability distributions can be used as soft labels.

[0055] Step 8: For the lightweight model, perform the following training steps:

[0056] The first sub-step: Batch the above processed training data to obtain grouped training data. In practice, for example, 1000 samples of the above processed training data can be divided into 10 batches with 100 samples in each batch to improve training efficiency and reduce memory occupancy.

[0057] The second sub-step is to input the grouped training data into the lightweight model in a preset order to obtain training results. The above training results may include, but are not limited to: updated model parameters, loss values, and evaluation metrics (such as mean squared error, accuracy, recall, F1 value, etc.) and prediction results (which can be numerical values, class labels, sequences, etc.). In practice, the grouped training data can be input into the initialized lightweight model in a preset order (such as random order or sequential order). The lightweight model can perform forward propagation calculations on each batch of data, make predictions on the input data based on the current model parameters, and obtain corresponding training results. For example, when 80 user review texts about smart sofas in the first batch are input into the above lightweight model, the model will output the evaluation classification prediction results of these 80 reviews on aspects such as the function, comfort, and appearance design of the smart sofa, such as powerful function, average function, lack of function, high comfort, average comfort, poor comfort, exquisite appearance, ordinary appearance, and poor appearance, etc.

[0058] The third sub-step is to input the above training data soft label set and the above training results into the above knowledge distillation loss function to obtain a distillation loss value. In practice, the training data soft label set generated by the above large language model and the training results of the lightweight model can be input into the above knowledge distillation loss function at the same time. Through the above knowledge distillation loss function, the difference between the two can be calculated and a scalar value, that is, the distillation loss value, can be output. The above distillation loss value reflects the gap between the output of the lightweight model and the output of the large language model.

[0059] The fourth sub-step is to update the lightweight model according to the above distillation loss value. In practice, the backpropagation algorithm can be used to calculate the gradients of the model parameters based on the distillation loss value. Then, an optimization algorithm (such as stochastic gradient descent, Adam, etc.) is used to update the parameters of the lightweight model according to the gradients to reduce the distillation loss value.

[0060] The fifth sub-step is to determine the updated lightweight model as the trained lightweight model in response to determining that the execution times of the above training steps reach the preset number of training times. The above preset number of training times can be an integer (such as 100), which represents the total number of rounds that the above lightweight model needs to be trained. In practice, in each round of training, the above steps of dividing batches, inputting data, calculating losses, and updating parameters can be executed in sequence. When the execution times of the training steps reach the preset number of training times, it is considered that the lightweight model has completed training, and the updated model at this time is determined as the trained lightweight model.

[0061] The ninth step is to adjust the lightweight model trained above to obtain an adjusted lightweight model. In practice, after the training is completed, the lightweight model can be further adjusted and optimized. The above adjustment and optimization of the model may include but are not limited to: fine-tuning hyperparameters (such as learning rate, regularization coefficient, etc.), making simple modifications to the structure of the model (such as adding or deleting certain layers), and performing model fusion operations to further improve the performance and generalization ability of the model.

[0062] The above-mentioned first step to ninth step and their related contents serve as an inventive point of an embodiment of the present disclosure, which solves the technical problem that "the speed of constructing a knowledge graph directly using a large language model is slow". The factors that lead to the slow speed of constructing a knowledge graph using a large language model are often as follows: a large language model usually has a large number of parameters, and requires powerful computing resources to support it during operation, so it is slow during operation, affecting the user experience. If the above factors are solved, the speed of constructing a knowledge graph can be improved. In order to achieve this effect, an embodiment of the present disclosure provides a training method for a lightweight model linked to a large language model. The above-mentioned lightweight model structure is relatively simple compared to the large language model and is trained through soft labels provided by the large language model. The matrix operations and parameter updates involved in the calculation process are relatively small, so the reasoning and training speeds are faster, so the speed of graph construction can be improved while ensuring the quality of graph construction. As a result, the speed of graph construction and user experience are improved.

[0063] Step 104, based on the target business related content of the text vector library and the basic target business graph, generate a basic target business graph supplementary text set.

[0064] In some embodiments, the above-mentioned execution subject can generate a basic target business map supplementary text set based on the target business related content of the text vector library and the above-mentioned basic target business map. Among them, the above-mentioned text vector library can be a pre-built library containing a large number of vector representations after text conversion. The above-mentioned target task related content can be information related to the content of the above-mentioned target business map construction request text, which can be searched in the above-mentioned text vector library by retrieval. For example, if it is related to the smart home industry chain, the above-mentioned related information may include but is not limited to: smart home device related text (such as product description, user evaluation and product evaluation), smart home industry chain upstream and downstream related text (such as the relationship between suppliers and manufacturers) and smart home technology and application scenario related text (such as technology application and scenario description). In practice, the most relevant text vector can be screened out and mapped to text by calculating the similarity between the entity node and each text vector in the text vector library, and finally a basic target business map supplementary text set is formed.

[0065] In some alternative implementations of some embodiments, the above-mentioned execution subject may generate a supplementary text set for the basic target business graph based on the target business-related content of the text vector library and the above-mentioned basic target business graph through the following steps:

[0066] First step, determine each triple in the above-mentioned basic target business graph according to the above-mentioned basic target business graph to obtain a triple set. In practice, all triples included in the above-mentioned basic target business graph can be extracted and formed into a set, that is, the triple set. For example, the above-mentioned basic target business graph may be about smart home product knowledge, which includes triples (intelligent sweeping robot, brand, brand A), (intelligent sweeping robot, cleaning mode, edge cleaning), (intelligent air purifier, filter type, HEPA filter), (intelligent air purifier, applicable area, 50 square meters), (intelligent door lock, unlocking method, fingerprint unlocking), (intelligent door lock, special function, remote cat's eye), etc. All these triples are extracted to obtain the triple set.

[0067] Second step, determine the entity nodes corresponding to each triple in the above-mentioned triple set to obtain an entity node set. In practice, the entity part in each triple (that is, entity 1 and entity 2 in the triple) can be extracted. The entities in all triples are summarized and duplicate items are removed to obtain a set containing all entities in the basic target business graph, that is, the entity node set. For example, for the triple set of the basic target business graph of smart home knowledge, the extracted entity node set may include but is not limited to: "intelligent sweeping robot", "path planning function", "mobile APP remote control", "intelligent camera", "infrared sensing function", "voice control instruction", etc.

[0068] Third step, perform the following steps for each entity node in the above-mentioned entity node set:

[0069] The first sub-step, generate the similarity between the entity node and each text vector in the above-mentioned text vector library to obtain a similarity set. In practice, the above-mentioned entity node can be converted into a vector form (a pre-trained word vector model can be used), and then the similarity between the entity node vector and each text vector in the text vector library is generated. Among them, the above-mentioned similarity calculation methods may include but are not limited to: cosine similarity, Euclidean distance, etc. All the calculated similarity values are collected to form a set, that is, the above-mentioned similarity set.

[0070] The second sub-step is to determine a preset number of text vectors with the highest similarity to the above entity node based on the above similarity set, so as to obtain a supplementary text vector set. The above preset number can be adjusted according to actual needs, for example, set to 5 or 10. In practice, these selected text vectors can be formed into a set, that is, the supplementary text vector set. For example, when the preset number is 3, for the entity node "intelligent constant temperature air conditioner", 3 text vectors with the highest similarity are selected from the similarity set, such as the text vectors representing "introduction to the energy-saving mode of the intelligent constant temperature air conditioner", "description of the remote control function of the intelligent constant temperature air conditioner", and "range of room areas suitable for the intelligent constant temperature air conditioner", to form the supplementary text vector set.

[0071] The third sub-step is to map the text vectors in the above supplementary text vector set to corresponding texts to obtain the supplementary text set corresponding to the above entity node. Among them, the text vectors in the above text vector library are numerical representations of texts, and each text vector in the supplementary text vector set needs to be restored to the corresponding original text. In practice, this conversion can be achieved through the pre-recorded mapping relationship between vectors and texts in the text vector library. The texts obtained through the conversion are collected to form a set, that is, the supplementary text set corresponding to this entity node. For example, the vector [0.12, 0.23, …, 0.47] can be mapped back to "intelligent air purifier".

[0072] The fourth step is to generate a basic target business graph supplementary text set based on the obtained supplementary text sets. Among them, the above basic target business graph supplementary text set includes the supplementary text sets of each entity node. In practice, the supplementary text sets corresponding to each entity node in the above entity node set can be summarized to form a set containing the supplementary text information of all entity nodes, that is, the basic target business graph supplementary text set.

[0073] Step 105 is to extract the supplementary text set of the basic target business graph to obtain supplementary triples.

[0074] In some embodiments, the above execution subject can extract the supplementary text set of the basic target business graph to obtain supplementary triples. In practice, the above extraction of the supplementary text set of the basic target business graph can still use the above large language model.

[0075] In an optional implementation manner in some embodiments, the above execution subject can extract the supplementary text set of the basic target business graph to obtain supplementary triples through the following steps:

[0076] Step 1: Supplement the text set according to the above basic target business graph and determine the corresponding second engineering template. Among them, the above second engineering template can also be a Prompt engineering template. In practice, according to the content, theme, structure and other characteristics of the text set supplemented by the above basic target business graph, find the corresponding second engineering template from the template library. Among them, the principle of determining the corresponding second engineering template is the same as that of determining the corresponding first engineering template, which will not be elaborated here.

[0077] Step 2: According to the above second engineering template, adjust the format of the text set supplemented by the above basic target business graph to obtain the adjusted text set supplemented by the basic target business graph. In practice, for example, if the above second engineering template requires that the dates in the text be uniformly in the format of "YYYY-MM-DD", and the date expression in the text set supplemented by the basic target business graph is "MM / DD / YYYY", then the date format needs to be converted.

[0078] Step 3: Based on the above preset large language model, perform the following steps on each text supplemented by the above adjusted basic target business graph:

[0079] The first sub-step: Extract the key information from the text supplemented by the above basic target business graph to obtain the text key information. Among them, the above text key information can be the most core part of the text. For example, for a supplementary text about a certain smart home product, the key information may include, but is not limited to: product name (such as smart air purifier), product model (such as air purifier Pro H), main functions (such as formaldehyde removal, PM2.5 detection, negative ion purification, etc.). In practice, the above large language model can be used to identify the above text key information related to the construction of the target business graph from the adjusted text set supplemented by the basic target business graph. Among them, the above identification can also be achieved through the above CRF.

[0080] The second sub-step: According to the above text key information, determine the supplementary entities in the text supplemented by the above basic target business graph to obtain the supplementary entity set. In practice, the above executor can determine the text in the above text key information that clearly refers to a specific thing as a supplementary entity. For example, the names of specific home furnishing "smart air purifier" and "air purifier Pro H". Concepts associated with smart home can also become supplementary entities, such as "formaldehyde", "PM2.5", and "negative ion" associated with "formaldehyde removal, PM2.5 detection, negative ion purification". Combining business scenarios, such as mentioning "bedroom" and "living room" as applicable, these scenarios are also supplementary entities. The content introduced by the modifiers in the key information, such as "high-efficiency filter", can also be a supplementary entity.

[0081] Fourthly, based on the preset criteria of the above-mentioned second engineering template, determine the relationships between each supplementary entity to obtain an entity relationship set. The above entity relationship set may include, but is not limited to: semantic relationships existing between different entities (such as hyponymy and whole-part relationships), logical relationships (such as causal relationships and association relationships), and temporal relationships (such as precedence relationships). In practice, according to the criteria preset in the above-mentioned second engineering template, identify each determined supplementary entity to obtain the relationships existing between each supplementary entity. Organize these relationships into a set, namely the entity relationship set. For example, between the supplementary entities "intelligent camera" and "human detection function" related to smart home, according to the template criteria, it can be determined that they have a relationship of "function possessed".

[0082] Fifthly, according to the above entity relationship set, generate the relationships between each supplementary entity to obtain supplementary triple information. In practice, based on the above entity relationship set, convert the relationships between entities into explicit relationship expressions and present them in the form of triples (entity 1, relationship, entity 2). For example, according to the "possess" relationship between the "intelligent floor cleaning robot" and the "path planning function" determined by the above entity relationship set, supplementary triple information (intelligent floor cleaning robot, possess, path planning function) can be generated.

[0083] Sixthly, perform vectorization processing on the above supplementary triple information to obtain supplementary triples. Among them, the above vectorization processing can be a process of converting non-vector form data into vector form. For example, a supplementary triple information about the home furnishing industry chain is ("Home Furnishing Brand A", "cooperation relationship", "Furniture Manufacturer B"). The vector of "Home Furnishing Brand A" can be represented as [0.1, 0.2, 0.3, 0.4, 0.5], the vector representation of "Furniture Manufacturer B" can be [0.2, 0.3, 0.4, 0.5, 0.6], and the vector representation of "cooperation relationship" can be [0.3, 0.4, 0.5, 0.6, 0.7].

[0084] In an optional implementation manner in some embodiments, the above-mentioned execution subject can determine the supplementary entities in the supplementary text of the above basic target business graph according to the following steps based on the above text key information to obtain a supplementary entity set:

[0085] Firstly, preprocess the above text key information to obtain the preprocessed key text. Among them, the above preprocessing may include word segmentation, stop word removal, and format conversion, etc.

[0086] Step 2: Input the preprocessed key text into the embedding layer of the entity extraction model to obtain the key text represented by vectors. Among them, the entity extraction model includes an embedding layer, a first extraction layer, a residual connection layer, a second extraction layer, and a tagging layer. Among them, the entity extraction model can be a neural network model that takes the preprocessed key text as input and the supplementary entity set as output. The key text represented by vectors can be a tensor with a shape of [sequence length, word vector dimension]. The embedding layer can be a layer in deep learning used to convert discrete and high-dimensional vocabulary indices into low-dimensional and dense vector representations. The first extraction layer can be a BiLSTM (Bidirectional LSTM). The residual connection layer can perform a residual connection on the embedding layer and the first extraction layer. The second extraction layer can also be a BiLSTM (Bidirectional LSTM). The tagging layer can be a CRF layer (Conditional Random Field Layer).

[0087] Step 3: Input the key text represented by vectors into the first extraction layer to obtain a first feature tensor. Among them, the first feature tensor can be a tensor with a shape of [sequence length, hidden layer dimension * 2]. In practice, the execution subject can process the input sequence through BiLSTM to extract context information.

[0088] Step 4: Perform a splicing process on the first feature tensor and the key text represented by vectors through the residual connection layer to obtain a spliced feature tensor. Among them, the spliced feature tensor can be a tensor with a shape of [sequence length, hidden layer dimension * 2 + word vector dimension]. In practice, the execution subject can splice or sum the output of the first layer BiLSTM and the output of the embedding layer.

[0089] Step 5: Input the spliced feature tensor into the second extraction layer to obtain a high-level feature tensor. Among them, the high-level feature tensor can be a higher-level context feature. In practice, the execution subject can further extract high-level context features through the second layer BiLSTM.

[0090] Step 6: Input the high-level feature tensor into the tagging layer to obtain entity labels. Among them, the entity labels can be an entity label sequence corresponding to each vocabulary. For example, "B-entity", "I-entity", "O", etc. In practice, the execution subject can globally tag the feature sequence through the CRF layer to obtain the optimal entity label sequence.

[0091] Step 7: According to the above entity tags, extract entity terms with specific tags from the preprocessed key text above to generate the above supplementary entity set. Among them, the above supplementary entity set can be an entity set obtained through entity recognition and processing, including various entities identified from key information (such as organization names, product names, place names, etc.). In practice, the above execution subject can extract entity terms with specific tags from the preprocessed key text according to the tag sequence output by the CRF layer to form the above supplementary entity set.

[0092] Step 8: Perform compression processing on the above supplementary entity set to obtain a lightweight supplementary entity set. Among them, the above lightweight supplementary entity set occupies less memory. In practice, the above execution subject can compress the above supplementary entity set through differential compression to obtain a lightweight supplementary entity set.

[0093] Step 9: Store the above lightweight supplementary entity set and control the above associated display to display the above supplementary entity set. In practice, the above execution subject can store the above lightweight supplementary entity set in a graph database.

[0094] The above Steps 1-9 and their related content are an inventive point of the embodiment of the present disclosure, which solves the technical problem of "the quality of the supplementary entity set extracted by the large language model is poor". The factors that lead to the poor quality of the supplementary entity set extracted by the large language model are often as follows: The extraction of supplementary entities corresponding to the large language model is often relatively rough and cannot meet various business needs. If the above factors are solved, the quality of the extracted supplementary entity set can be improved. To achieve this effect, the embodiment of the present disclosure provides a new entity extraction model, which can perform multiple and deep extractions on key text through multiple layers of BiLSTM to improve the text extraction quality, and then improve the quality of the output supplementary text set. Moreover, a compression step is added to the process, so that the extracted supplementary text set can occupy less memory and reduce the storage pressure. Thus, the quality of the extracted supplementary entity set is improved and the memory occupancy is reduced.

[0095] Step 106: Combine the supplementary triples and the basic target business graph to generate a complete target business graph.

[0096] In some embodiments, the above execution subject can combine the above supplementary triples and the above basic target business graph to generate a complete target business graph. In practice, the above supplementary triples can be filled into the above basic target business graph to generate a more comprehensive complete graph. The above filling can be achieved through the following steps:

[0097] First step, retrieve the entities in the supplementary triples in the above basic target business graph. For example, for the supplementary triple (intelligent coffee table, has, wireless charging function), search for "intelligent coffee table" in the basic graph.

[0098] Second step, confirm whether the entities in the above supplementary triples exist in the basic target business graph, and whether the corresponding relationships exist. For example, if the node "intelligent coffee table" does not exist, create a new entity node and the corresponding relationship connection. If the node "intelligent coffee table" exists, continue to search in the above basic target business graph for the "has" relationship and "wireless charging function". If not, create a new entity near the node. If it exists, check whether the relevant information needs to be updated.

[0099] Optionally, the above subject can also perform the following steps:

[0100] First step, perform visualization operations on the above complete target business graph. In practice, dedicated graph visualization tools such as Cytoscape, Gephi, and self-developed software can be used. These tools usually support importing graph data and provide rich visualization configuration options. Taking Cytoscape as an example, the data of the complete graph needs to be converted and imported in the format it supports (such as CSV, JSON, GraphML, etc.), and then the styles of nodes and edges, layout algorithms, etc. are set in the tool to finally generate a visualized graph interface.

[0101] Second step, store the above triple set and the above supplementary triples into a graph database. Among them, a graph database can be a database for storing and processing graph-structured data, which can efficiently store and query information of nodes and edges. The above graph database can include but is not limited to: Neo4j, Janus Graph, etc. In practice, storing the triple set and supplementary triples into a graph database means organizing and storing these triples in the format supported by the graph database for subsequent operations such as querying, updating, and analyzing the graph.

[0102] Step 3: Store the attribute information of the above triple set and the attribute information of the above supplementary triples in a structured database. The attribute information of the above triples may refer to other relevant information except the subject, relationship, and object of the triples themselves. For example, the attributes of an entity (such as name, age, date of birth, etc.), the attributes of a relationship (such as the strength of the relationship, timestamp, etc.). The above structured database may be a relational database (such as MySQL, Oracle), which stores data in the form of tables and can handle structured data well. In practice, taking MySQL as an example, a corresponding database and table can be created first, the fields and data types of the table can be defined, and then the attribute information of the above triples can be converted into a suitable data format, and the data can be stored in the table by executing an SQL insert statement for easy data management and maintenance.

[0103] Step 107: In response to generating a complete target business graph, send the complete target business graph to the associated display of the user for display.

[0104] In some embodiments, the above execution entity may, in response to generating a complete target business graph, send the above complete target business graph to the above associated display of the user for display. The above associated display may be an external electronic device (such as a mobile phone) that is wired or wirelessly connected to the above execution entity.

[0105] Step 108: In response to detecting that the associated display is in a display state, control the associated display to superimpose a preset operation interface on the visualized complete target business graph.

[0106] In some embodiments, the above execution entity may, in response to detecting that the above associated display is in a display state, control the above associated display to superimpose a preset operation interface on the visualized above complete target business graph. The operation functions of the above preset operation interface include zooming, folding, and saving.

[0107] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: through a method for constructing a graph disclosed in the present disclosure, the process of labeling and training the model can be replaced by calling a large language model, and the knowledge graph constructed can be further expanded by extracting the text library, and combined with the self-developed software display and providing the user with a corresponding operation interface for the complete graph. Thus, the process of graph construction can be simplified, the constructed graph can be further improved, and the user experience can be improved. Specifically, the reason for the poor user experience of most graph construction methods is that the model-based pre-training method takes a lot of time to annotate data when there is no ready-made training data, and the graph cannot be further supplemented, resulting in poor coverage of the graph and poor user experience. Based on this, the present disclosure discloses a graph construction method of some embodiments. First, in response to receiving a question from a user, according to the keywords extracted from the question of the above user, a target business graph construction request text for the target industrial chain is obtained, wherein the target industrial chain includes a home furnishing industry chain, an automobile industry chain, and a logistics industry chain. The business graph is a graph in which various elements, relationships, and time series processes in the industrial chain are graphically presented. Thus, the needs of users are obtained. Then, the target business graph construction request text is formatted to obtain a processed graph construction request. Thus, the graph construction request is processed through a template so that the user's needs can better call the subsequent large language model. Then, based on the processed graph construction request and the preset large language model, a basic target business graph is generated. Thus, the basic target business graph required by the user is generated by calling the large language model. Then, based on the target business-related content of the text vector library and the above-mentioned basic target business graph, a basic target business graph supplementary text set is generated. Thus, the constructed basic target business graph can be further improved by extracting the text set. Then, the above-mentioned basic target business graph supplementary text set is extracted to obtain a supplementary triple. Then, the above-mentioned supplementary triple and the above-mentioned basic target business graph are combined to generate a complete target business graph. Then, in response to the generation of the complete target business graph, the above-mentioned complete target business graph is sent to the associated display of the above-mentioned user for display. Then, in response to detecting that the above-mentioned associated display is in a display state, the above-mentioned associated display is controlled to superimpose a preset operation interface on the visualized above-mentioned complete target business graph, wherein the operation functions of the above-mentioned preset operation interface include zooming, folding and saving. In this way, the user can operate the generated complete graph. Thus, the above-mentioned obtained supplementary triples can be added to the above-mentioned basic target business graph to generate a graph with wider coverage. On the one hand, the above-mentioned graph construction method eliminates the process of data annotation by using a large language model. On the other hand, the above-mentioned graph construction method can further supplement the constructed basic target business graph and improve the coverage of the generated image.Thus, on the premise of being able to generate a more comprehensive map, the data annotation process is omitted, and the generated complete map can be further operated on through associated devices, improving the user experience.

[0108] Further reference is made to Figure 2 , as an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a map construction device, and these device embodiments correspond to Figure 1 the method embodiments shown, and the device can be specifically applied to various electronic devices.

[0109] As Figure 2 shown, a map construction device 200 of some embodiments includes: an acquisition unit 201, a format processing unit 202, a first generation unit 203, a second generation unit 204, an extraction unit 205, a third generation unit 206, and sending units 207 and 208. Among them, the acquisition unit 201 is configured to, in response to receiving a user's question, obtain a target business map construction request text for a target industrial chain according to keywords extracted from the user's question, where the target industrial chain includes a home furnishing industrial chain, an automotive industrial chain, and a logistics industrial chain, and the business map is a map in which various elements, relationships, and timing processes in the industrial chain are presented in a graphical manner. The format processing unit 202 is configured to perform format processing on the target business map construction request text to obtain a processed map construction request. The first generation unit 203 is configured to generate a basic target business map based on the processed map construction request and a preset large language model. The second generation unit 204 is configured to generate a supplementary text set for the basic target business map based on the target business-related content in the text vector library and the basic target business map. The extraction unit 205 is configured to extract the supplementary text set for the basic target business map to obtain supplementary triples. The third generation unit 206 is configured to generate a complete target business map by combining the supplementary triples and the basic target business map. The sending unit 207 is configured to, in response to generating a complete target business map, send the complete target business map to the associated display of the user for display. The control unit 208 is configured to, in response to detecting that the associated display is in a display state, control the associated display to superimpose a preset operation interface on the visualized complete target business map, where the operation functions of the preset operation interface include zooming, folding, and saving.

[0110] It can be understood that the various units described in the device 100 correspond to the respective steps in the method described with reference to Figure 1 . Thus, the operations, features, and beneficial effects described above for the method also apply to the device 100 and the units included therein, and will not be repeated here.

[0111] Next, reference is made toFigure 3 , which shows a schematic structural diagram of an electronic device (such as the computing device 101 shown in Figure 1 ) 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure.

[0112] As Figure 3 shown, the electronic device 300 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 301, which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other through a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0113] Generally, the following devices may be connected to the I / O interface 305: an input device 306 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309. The communication device 309 may allow the electronic device 300 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 3 the electronic device 300 with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. More or fewer devices may be alternatively implemented or had. Figure 3 Each block shown in

[0114] may represent a device or, as needed, multiple devices.

[0115] It should be noted that the computer-readable media described in some embodiments of the present disclosure can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and this computer-readable signal medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0116] In some embodiments, the client and the server can communicate using any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks (“LAN”), wide area networks (“WAN”), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed network.

[0117] The above computer-readable medium may be included in the above electronic device; or it may exist separately and not be assembled into the electronic device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by the electronic device, the electronic device is caused to: in response to receiving a user's question, obtain a target business graph construction request text for a target industrial chain according to keywords extracted from the user's question, where the target industrial chain includes a home furnishing industrial chain, an automotive industrial chain, and a logistics industrial chain, and the business graph is a graph presenting various elements, relationships, and temporal processes in the industrial chain in a graphical manner; perform format processing on the above target business graph construction request text to obtain a processed graph construction request; generate a basic target business graph based on the above processed graph construction request and a preset large language model; generate a basic target business graph supplementary text set based on the target business-related content in the text vector library and the above basic target business graph; extract from the above basic target business graph supplementary text set to obtain supplementary triples; combine the above supplementary triples and the above basic target business graph to generate a complete target business graph; in response to generating the complete target business graph, send the above complete target business graph to the associated display of the above user for display; in response to detecting that the above associated display is in a display state, control the above associated display to superimpose a preset operation interface on the visualized above complete target business graph, where the operation functions of the above preset operation interface include zooming, folding, and saving.

[0118] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or combinations thereof. The above programming languages include object-oriented programming languages - such as Java, Smalltalk, C++; and also include conventional procedural programming languages - such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network - including a local area network (LAN) or a wide area network (WAN) - or may be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).

[0119] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0120] The units described in some embodiments of the present disclosure can be implemented in software or in hardware. The described units can also be provided in a processor. For example, it can be described as: a processor includes an acquisition unit, a format processing unit, a first generation unit, a second generation unit, an extraction unit, a third generation unit, a sending unit, and a control unit. Among them, the names of these units do not constitute a limitation on the unit itself in some cases. For example, the acquisition unit can also be described as "the unit that, in response to receiving a user's question, obtains the text of the target business map construction request for the target industrial chain according to the keywords extracted from the user's question."

[0121] The functions described above can be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that can be used include: Field Programmable Gate Array (FPGA), Application Specific Integrated Circuit (ASIC), Application Specific Standard Product (ASSP), System on Chip (SOC), Complex Programmable Logic Device (CPLD), and so on.

[0122] The above description is only some preferred embodiments of the present disclosure and an explanation of the technical principles applied. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the technical solutions formed by mutually replacing the above features with the (but not limited to) technical features having similar functions disclosed in the embodiments of the present disclosure.

Claims

1. A method for constructing a graph, comprising: In response to receiving a question from a user, obtaining a target business graph construction request text for a target industry chain according to keywords extracted from the question from the user, wherein the target industry chain includes a home industry chain, an automobile industry chain, and a logistics industry chain, and the business graph is a graph that presents various elements, relationships, and time-series processes in the industry chain in a graphical manner; Performing format processing on the target business graph construction request text to obtain a processed graph construction request; Generate a basic target business graph based on the processed graph construction request and a preset large language model; Generate a basic target business graph supplementary text set based on the target business related content of the text vector library and the basic target business graph; Extracting a supplementary text set from the basic target business graph to obtain a supplementary triple; Combining the supplementary triples with the basic target business graph to generate a complete target business graph; In response to generating a complete target business graph, sending the complete target business graph to an associated display of the user for display; In response to detecting that the associated display is in a display state, the associated display is controlled to superimpose a preset operation interface on the visualized complete target business map, wherein the operation functions of the preset operation interface include zooming, folding and saving.

2. The method according to claim 1, wherein: The step of formatting the target business graph construction request text to obtain a processed graph construction request includes: Determine a first engineering template corresponding to the target business graph construction request text; According to the first engineering template, the target business graph construction request text is formatted and processed to obtain a processed graph construction request.

3. The method according to claim 1, wherein: The generating a basic target business graph based on the processed graph construction request and the preset large language model includes: Inputting the processed graph construction request into the preset large language model to obtain a triple information set; Performing vectorization processing on each triple information in the triple information set to obtain a vectorized triple information set; A graph is constructed according to the vectorized triplet information to obtain a basic target business graph, wherein the basic target business graph includes at least one triplet.

4. The method according to claim 1, wherein: The target business related content based on the text vector library and the basic target business graph generate a basic target business graph supplementary text set, including: Determine each triple in the basic target business graph according to the basic target business graph to obtain a triple set; Determine the entity node corresponding to each triple in the triple set to obtain an entity node set; The following steps are performed for each entity node in the entity node set: Generate similarities between the entity node and each text vector in the text vector library to obtain a similarity set; According to the similarity set, determining a preset number of text vectors having the highest similarity to the entity node to obtain a supplementary text vector set; Mapping the text vectors in the supplementary text vector set to corresponding texts to obtain a supplementary text set corresponding to the entity node; Based on the obtained supplementary text sets, a basic target business graph supplementary text set is generated, wherein the basic target business graph supplementary text set includes the supplementary text sets of each entity node.

5. The method according to claim 4, wherein: The method further comprises: Storing the triple set and the supplementary triples in a graph database; The attribute information of the triple set and the attribute information of the supplementary triple are stored in a structured database.

6. The method according to claim 3, wherein: The step of inputting the processed graph construction request into the preset large language model to obtain triple information includes: Extracting information from the processed graph construction request to obtain key information; Determining a key information knowledge set corresponding to the key information based on the database of the large language model; The above key information knowledge set is extracted and processed through a preset entity recognition model to obtain an entity set; Extracting a relationship for each entity in the entity set to obtain a relationship set; Combine the entity set and the relationship set to output triple information.

7. The method according to claim 1, wherein: The extracting of the supplementary text set of the basic target business graph to obtain supplementary triples includes: Supplementing the text set according to the basic target business graph, determining a corresponding second engineering template; According to the second engineering template, the format of the basic target business graph supplementary text set is adjusted to obtain an adjusted basic target business graph supplementary text set; Based on the preset large language model, for each basic target business graph supplementary text in the adjusted basic target business graph supplementary text set, the following steps are performed: Extract key information from the basic target business graph supplementary text to obtain text key information; Determine the supplementary entities in the supplementary text of the basic target business graph according to the key information of the text, and obtain a supplementary entity set; Based on the preset standard of the second engineering template, determine the relationship between each supplementary entity to obtain an entity relationship set; According to the entity relationship set, the relationship between each supplementary entity is generated to obtain supplementary triple information; Vectorization is performed on the supplementary triplet information to obtain a supplementary triplet.

8. A graph construction device, comprising: an acquisition unit configured to, in response to receiving a question from a user, acquire a target business graph construction request text for a target industry chain according to keywords extracted from the question from the user, wherein the target industry chain includes a home industry chain, an automobile industry chain, and a logistics industry chain, and the business graph is a graph in which various elements, relationships, and time-series processes in the industry chain are presented in a graphical manner; A format processing unit, configured to perform format processing on the target business graph construction request text to obtain a processed graph construction request; A first generating unit is configured to generate a basic target business graph based on the processed graph construction request and a preset large language model; A second generating unit is configured to generate a basic target business graph supplementary text set based on the target business related content of the text vector library and the basic target business graph; An extraction unit is configured to extract a supplementary text set from the basic target business graph to obtain a supplementary triple; A third generating unit is configured to combine the supplementary triples and the basic target business graph to generate a complete target business graph; A sending unit, configured to, in response to generating a complete target business graph, send the complete target business graph to an associated display of the user for display; The control unit is configured to control the associated display to superimpose a preset operation interface on the visualized complete target business map in response to detecting that the associated display is in a display state, wherein the operation functions of the preset operation interface include zooming, folding and saving.

9. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method and device for constructing Schema model in knowledge graph

    CN115098698A

  • Knowledge graph construction method and device, storage medium and electronic equipment

    CN115391552A

  • Industrial chain analysis application method and device based on science and technology knowledge graph

    CN116502807A

  • Knowledge graph construction method and device, equipment and storage medium

    CN116860997A

  • Industrial science and technology text data pushing method and device, equipment and medium

    CN117131208A