Entity label generation method and device and product

By breaking down entity tag generation into knowledge graph construction and neural network prediction, and utilizing the neural network trained on the entity tag knowledge graph, the problem of high computational overhead and poor accuracy in entity tag generation of large language models is solved, achieving more efficient and accurate tag generation.

CN121599080APending Publication Date: 2026-03-03NEUSOFT CORP
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-09
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

In existing technologies, when using large language models to generate entity labels, the computational cost is high and the generation accuracy is poor. In particular, when processing long text entities, it is easy to produce unrelated labels and illusions.

Method used

The entity tag generation is split into two parts: knowledge graph construction and neural network prediction. The neural network trained on the entity tag knowledge graph is used for processing, avoiding end-to-end reasoning of large language models and focusing on obtaining tag knowledge graphs of object categories, attribute features and relationships.

Benefits of technology

It reduces computational overhead, improves the accuracy of entity label generation, avoids the generation of unrelated labels and illusions, and enhances the accuracy of generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121599080A_ABST
    Figure CN121599080A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an entity label generation method and device and a product, and is applied to the technical field of labels. The method comprises the following steps: processing to-be-predicted data by using a neural network trained by an entity label knowledge graph, and generating an entity label of a target object. The entity label knowledge graph is a label knowledge graph generated after the entity object data source is processed by the large language model, and the same-field object is an entity object belonging to the same scene with the target object in the entity object data source. Entity label generation is split into two parts of knowledge graph construction and neural network prediction, a large language model needs to be focused on obtaining the entity label knowledge graph corresponding to the object category, the attribute feature and the incidence relation, so that the calculation overhead can be reduced, the neural network is trained through the entity label knowledge graph, and the neural network prediction efficiency is improved. Semantic boundaries can be provided, and entity tag generation precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of label technology, and in particular to a method, apparatus and product for generating physical labels. Background Technology

[0002] Entity tags are structured semantic identifiers that describe entity objects. Entity tags include object category tags, attribute feature tags, and relationship tags. Object category tags define the abstract category to which the entity object belongs; attribute feature tags describe the inherent attributes or dynamic states of the entity object; and relationship tags define the relationships between the entity object and other entity objects. For example, taking patient A as an entity object, patient A's object category tags might be "outpatient" or "chronic disease patient"; patient A's attribute feature tags might be "male," "heart rate 72 beats / min," and "recovery stage"; and relationship tags might be, for example, the relationship tag between patient B and coronary heart disease, "confirmed to have." Entity tags, as the core carrier of structured knowledge, play a crucial role in social service fields such as healthcare, smart elderly care, and precision employment.

[0003] Currently, large language models can be used to generate entity labels. Specifically, large language models are used to perform full reasoning on long text entities to generate entity labels. For example, a large language model can be used to perform semantic decoding and feature mapping on a patient's diagnostic log (i.e., long text entities) and output entity labels such as "chronic disease patient," "hypertension risk," and "requires regular blood glucose monitoring." However, this end-to-end label generation method suffers from high computational overhead and poor entity label generation accuracy. Summary of the Invention

[0004] This application provides a method, apparatus, and product for generating entity tags, which reduces computational overhead and improves the accuracy of entity tag generation.

[0005] In a first aspect, embodiments of this application provide a method for generating entity tags, the method comprising:

[0006] Obtain the data to be predicted; the data to be predicted indicates the entity data for generating entity tags for the target object;

[0007] The data to be predicted is processed using a neural network to generate entity labels for the target object; the entity labels for the target object include object category labels, attribute feature labels, and relationship labels for the target object.

[0008] The neural network is trained using an entity label knowledge graph; the entity label knowledge graph is a label knowledge graph generated by processing entity object data sources using a large language model, and the entity label knowledge graph includes object category labels, attribute feature labels, and association relationship labels for objects in the same domain; the objects in the same domain are entity objects in the entity object data source that belong to the same scene as the target object.

[0009] In some examples, the method for generating the entity tag knowledge graph includes:

[0010] The large language model is used to process the entity object data source to generate a knowledge graph framework pattern; the knowledge graph framework pattern includes the domain concept of the objects in the same domain, and the domain concept includes the object category definition, attribute feature definition, and association relationship definition;

[0011] Based on the knowledge graph framework pattern, the domain knowledge of the same domain objects is extracted from the entity object data source using the large language model. The domain knowledge includes object category labels, attribute feature labels, and association relationship labels.

[0012] The domain knowledge of the objects in the same domain is filled into the knowledge graph framework pattern to obtain the entity tag knowledge graph.

[0013] In some examples, if the knowledge graph framework schema is a Resource Description Framework schema (RDF Schema), before processing the entity object data source using the large language model to generate the knowledge graph framework schema, the method further includes:

[0014] Get the first prompt word;

[0015] The first prompt word is used to enable the large language model to obtain the domain concept of the same domain object from the entity object data source, standardize the domain concept of the same domain object, and output the standardized domain concept; the standardized domain concept is a domain concept that conforms to the RDF syntax definition;

[0016] The process of using the large language model to process entity object data sources and generate a knowledge graph framework pattern includes:

[0017] Using the large language model and the first prompt word as an instruction, the entity object data source is processed to generate the RDF Schema.

[0018] In some examples, if the knowledge graph framework schema is RDF Schema, the step of extracting domain knowledge of the target entity object from the entity object data source using the large language model includes:

[0019] The large language model is used to process the entity object data source and the RDF schema to generate a second prompt word;

[0020] The second prompt word is used to enable the large language model to extract the object category, attribute features, and association relationships of the same domain object from the entity object data source; and to map the object category, attribute features, and association relationships of the same domain entity object into object category labels, attribute feature labels, and association relationship labels that conform to the RDF syntax definition.

[0021] Using the large language model and the second prompt word as an instruction, the entity object data source is processed to generate domain knowledge of the same domain object.

[0022] In some examples, if the data to be predicted is entity data including temporal features, the neural network includes a convolutional neural network (CNN) and a long short-term memory network (LSTM).

[0023] The step of processing the data to be predicted using a neural network to generate entity labels for the target object includes:

[0024] The data to be predicted is processed using a CNN to obtain the local feature vector corresponding to the data to be predicted;

[0025] The entity label is obtained by processing the local feature vector using the LSTM.

[0026] In some examples, the LSTM includes a coupled forget gate and an input gate, wherein the sum of the activation values ​​of the input gate and the forget gate is 1;

[0027] The process of using the LSTM to process the local feature vector to obtain the entity label includes:

[0028] The local feature vector is processed using the forget gate and the input gate;

[0029] The entity label is obtained based on the processed local feature vector.

[0030] In some examples, the method further includes: filtering the data to be predicted using a recursive average filtering algorithm;

[0031] The step of processing the local feature vector using the LSTM to obtain the entity label includes: processing the local feature vector and the filtered data to be predicted using the LSTM to obtain the entity label.

[0032] In some examples, the LSTM includes an input gate, a forget gate, an output gate, and a memory unit; the LSTM is used to process the local feature vector to obtain the entity label, including:

[0033] The temporal features required to generate the entity label are obtained according to the following formula;

[0034]

[0035]

[0036]

[0037]

[0038]

[0039]

[0040] Where t is a positive integer, Let be the activation value of the forget gate at time t. For activation function, , , These are the weight vectors for the forget gate, input gate, and output gate, respectively. , , These are the biases for the forget gate, input gate, and output gate, respectively. Let be the activation value of the input gate at time t. The state of the memory unit at time t. The temporal characteristics of the LSTM output at time t. Let t represent the candidate states of the memory cells at time t. Let be the activation value of the output gate at time t. For the local feature vector, For time t, the data to be predicted is processed by recursive averaging filtering. The temporal characteristics of the LSTM output at time t-1;

[0041] The entity label is obtained based on the time sequence characteristics.

[0042] Secondly, embodiments of this application provide an entity label generation apparatus, characterized in that the apparatus includes:

[0043] An acquisition unit is used to acquire data to be predicted; the data to be predicted indicates entity data for generating entity tags for target objects;

[0044] The tag generation unit is used to process the data to be predicted using a neural network to generate entity tags for the target object; the entity tags for the target object include object category tags, attribute feature tags, and association relationship tags for the target object;

[0045] The neural network is trained using an entity label knowledge graph; the entity label knowledge graph is a label knowledge graph generated by processing entity object data sources using a large language model, and the entity label knowledge graph includes object category labels, attribute feature labels, and association relationship labels for objects in the same domain; the objects in the same domain are entity objects in the entity object data source that belong to the same scene as the target object.

[0046] Thirdly, embodiments of this application provide an electronic device, including:

[0047] Memory, used to store computer programs;

[0048] A processor for executing the computer program to implement the method as described in any one of the first aspects.

[0049] Fourthly, embodiments of this application provide a computer program that, when run on a computer, causes the computer to perform the method in any of the possible implementations of any of the above aspects.

[0050] Fifthly, embodiments of this application provide a computer-readable storage medium storing a computer program (also referred to as code or instructions) that, when run on a computer, causes the computer to perform the method in any of the possible implementations of any of the above aspects.

[0051] Sixthly, embodiments of this application provide a chip system including one or more processors for calling and executing instructions stored in memory, causing the methods in any of the above aspects or possible implementations to be executed. The chip system may be composed of chips or may include chips and other discrete devices.

[0052] This application provides an entity tag generation method, apparatus, and product. The method includes: processing the data to be predicted using a neural network trained on an entity tag knowledge graph to generate entity tags for the target object. The entity tag knowledge graph is a tag knowledge graph generated by a large language model processing entity object data sources. The entity tag knowledge graph includes object category tags, attribute feature tags, and association relationship tags for objects in the same domain. Objects in the same domain are entity objects in the entity object data source that belong to the same scene as the target object. This application splits entity tag generation into two parts: knowledge graph construction and neural network prediction. The large language model does not need to perform end-to-end reasoning; it only needs to focus on obtaining the entity tag knowledge graph corresponding to object categories, attribute features, and association relationships, thus reducing computational overhead. Furthermore, this application uses a neural network trained on an entity tag knowledge graph to process the data to be predicted. Compared to a large language model, it does not need to call all parameters for semantic decoding, thus further reducing computational overhead. Moreover, training the neural network on an entity tag knowledge graph can provide semantic boundaries, avoid generating unrelated tags, prevent illusions, and improve the accuracy of entity tag generation. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1 This is a flowchart illustrating an entity tag generation method according to an embodiment of this application;

[0055] Figure 2 A flowchart illustrating a method for generating an entity tag knowledge graph, as provided in an embodiment of this application;

[0056] Figure 3 This is a schematic diagram illustrating a method for constructing an entity tag knowledge graph, as provided in an embodiment of this application.

[0057] Figure 4 This is a schematic diagram illustrating the implementation of processing data to be predicted using a neural network, as provided in an embodiment of this application.

[0058] Figure 5 This is a schematic diagram of the structure of an entity label generation device provided in an embodiment of this application. Detailed Implementation

[0059] To enable those skilled in the art to better understand the present application, the technical solutions in this embodiment will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0060] In the implementation of this application, the collection and processing of relevant data should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.

[0061] As mentioned earlier, large language models can currently be used to perform end-to-end full reasoning on long text entities to generate entity labels. Specifically, long text entities are directly input into a large language model, and the semantic understanding and reasoning capabilities of the large language model are used to directly output entity labels. However, this label generation method, which uses large language models for end-to-end full reasoning on long text entities, suffers from computational overhead and poor accuracy in generating entity labels.

[0062] The inventors discovered through analysis that the computational cost of a large language model is positively correlated with the length of the input text. Long text entities often contain a massive amount of information. For example, a long text entity is a medical log, which contains a year's worth of medical records for the entity. Processing long text entities using a large language model often requires a large amount of computing resources.

[0063] Furthermore, large language models are susceptible to semantic illusions. When performing full reasoning on long text entities, they may generate fictitious labels unrelated to the actual attributes of the entities. For example, in a medical context, a patient may only have the symptom of "high blood sugar." However, a large language model might generate a fictitious label like "risk of hypertension" because high blood sugar is often associated with high blood pressure, which is unrelated to the patient's actual attributes.

[0064] In view of this, embodiments of this application provide an entity label generation method that breaks down entity label generation into two parts: knowledge graph construction and neural network prediction. The large language model does not require end-to-end reasoning; it only needs to focus on acquiring the entity label knowledge graph corresponding to object categories, attribute features, and relationships, thus reducing computational overhead. Furthermore, this application uses a neural network trained on the entity label knowledge graph to process the data to be predicted. Compared to the large language model, it does not require calling all parameters for semantic decoding, thus further reducing computational overhead. Moreover, training the neural network on the entity label knowledge graph provides semantic boundaries, avoids the generation of unrelated labels, prevents illusions, and improves the accuracy of entity label generation.

[0065] It should be noted that the entity tag generation method provided in this application embodiment can be applied to various social service fields such as medical and health care, precision elderly care, and precision employment. Through the entity tag generation method in this application embodiment, the generation accuracy of entity tags can be improved while reducing computational overhead, significantly enhancing the service efficiency and quality of business scenarios such as personalized treatment recommendations, elderly care plan matching, and precise job posting.

[0066] The entity tag generation methods provided in the embodiments of this application can be executed by an intelligent service platform, a data processing engine, a knowledge graph construction system, or an automated tag generation platform. The intelligent service platform, data processing engine, or automated tag generation platform can be distributed nodes deployed in a cloud-native architecture. The entity tag generation methods in the embodiments of this application can be executed by a single distributed node as a tag processing node, or by multiple collaborative distributed nodes working together, with some nodes responsible for knowledge graph construction and others responsible for generating tags through neural networks, depending on the deployment architecture of the business system and the data processing load requirements.

[0067] In this embodiment, the tag processing node can be implemented as an electronic device, which can be a terminal or a server. In one implementation, the electronic device for implementing the entity tag generation method provided in this embodiment can be any terminal with data processing and model inference capabilities, such as a smart workstation, edge computing device, or desktop computer. In another implementation, the electronic device provided in this embodiment can also be implemented as a server, which can be an independent physical server, a server cluster consisting of multiple physical servers, or a distributed system. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this embodiment does not impose any restrictions.

[0068] The entity label generation method provided in this application embodiment will be described in detail below with reference to the accompanying drawings.

[0069] Appendix Figure 1 This is a flowchart illustrating an entity label generation method according to an embodiment of this application. The following will be combined with... Figure 1 The steps shown will be explained. It should be noted that... Figure 1 The entity tag generation method in this example is illustrated using an electronic device as the executing entity. Figure 1 As shown, the method includes the following steps S101 to S102:

[0070] S101, Obtain the data to be predicted.

[0071] The data to be predicted indicates the entity data for generating entity labels for the target object. For example, the data to be predicted is patient A's examination report, such as a test report specifically stating "Patient A's blood routine results are: white blood cell count 8.5 × 10⁻⁶". 9 / L, red blood cell count 4.2×10¹² / L; electrocardiogram showed sinus rhythm.

[0072] S102, The neural network is used to process the data to be predicted to generate entity labels for the target objects. The entity labels for the target objects include object category labels, attribute feature labels, and relationship labels.

[0073] The entity tag knowledge graph is a tag knowledge graph generated by the large language model after processing entity object data sources. The entity tag knowledge graph includes object category tags, attribute feature tags, and relationship tags for objects in the same domain. Objects in the same domain are entity objects in the entity object data source that belong to the same scenario as the target object. The entity object data source is the original data carrier that supports the large language model in automatically identifying object categories, object attribute features, and relationships, including but not limited to entity description text, structured data tables, and entity object metadata.

[0074] Example description: The entity description text is "Patient B, male, 56 years old, was admitted to the hospital due to chest pain and was diagnosed with coronary heart disease. He underwent stent intervention on November 1, 2025. After the procedure, he took aspirin once a day and his heart rate was maintained at 70-75 beats / min."

[0075] The structured data table contains the medical records of patient B, as shown in Table 1:

[0076] Table 1

[0077]

[0078] The entity object metadata is shown in Table 2:

[0079] Table 2

[0080]

[0081] The target audience is patient B, and the system filters for related individuals based on the scenario tag "medical and health". For example, related individuals include patient B, cardiologists, and top-tier hospitals.

[0082] In this embodiment, a large language model can be used to process the entity object data source to generate an entity tag knowledge graph. For example, for the entity object data source being the entity description text shown above for patient B, Table 1, and Table 2, the resulting entity tag knowledge graph contains three types of tags: object category tags, attribute feature tags, and association relationship tags, as shown in Table 3:

[0083] Table 3

[0084]

[0085] In some examples, embodiments of this application also provide a process for generating entity-labeled knowledge graphs using large language models, see [link to relevant documentation]. Figure 2 As shown, Figure 2 The method for generating an entity tag knowledge graph is shown, which can be implemented through steps S1021 to S1023:

[0086] S1021 utilizes a large language model to process entity object data sources and generate a knowledge graph framework pattern.

[0087] A knowledge graph framework pattern is a structured template for defining domain concepts of objects in the same domain. It does not contain specific entity instances, but only stipulates the rules for "how entity objects are classified, what attributes and characteristics they have, and what relationships exist between them".

[0088] Domain concepts are abstract semantic conventions for objects within the same domain, including object category definitions, attribute feature definitions, and association relationship definitions. Specifically, object category definitions define the classification system for objects within the same domain, attribute feature definitions define the attribute characteristics of objects within the same domain, and association relationship definitions define the semantic relationships between objects within the same domain, such as "patient-received treatment-treatment method".

[0089] In some examples, the knowledge graph framework schema is a Resource Description Framework Schema (RDF Schema). That is, domain concepts must conform to RDF syntax definitions. Specifically, object class definitions are defined using RDF:class, and attribute features and relationships are defined using RDF:Property.

[0090] The knowledge graph framework pattern is a "framework" for constructing entity-labeled knowledge graphs. It ensures the consistency of knowledge across different contexts, preventing the mixing of cross-domain concepts and thus avoiding the introduction of illusion problems when processing prediction data using neural networks trained on the generated entity-labeled knowledge graph. Furthermore, the knowledge graph framework pattern predefines the syntax rules for knowledge filling; subsequent knowledge filling only requires template matching without needing to restructure the data structure, thereby reducing the structural cost of knowledge filling.

[0091] In this embodiment of the application, the electronic device can use a large language model to process the entity object data source to obtain a knowledge graph framework pattern.

[0092] In some examples, electrons can acquire knowledge graph framework patterns in the following manner. See also Figure 3 As shown, Figure 3 A schematic diagram illustrating a method for constructing an entity tag knowledge graph is shown. For example... Figure 3 As shown, step ① of this method is used to generate an RDF schema, and includes the following steps:

[0093] First, the first prompt word is obtained. This first prompt word, also known as the domain concept generation prompt word, is used to enable the large language model to obtain domain concepts of objects in the same domain from the entity object data source, standardize these domain concepts, and output the standardized domain concepts. The standardized domain concepts conform to the RDF syntax definition.

[0094] In some examples, the first prompt includes background information and historical input, a task description, and the output format. Specifically, the background information and historical input state: You are building a machine-understandable entity label knowledge graph, which includes object categories, attribute features, and relationships of various entity objects. The task description lists all domain concepts for objects in the same domain from the target scenario, avoiding specific instances of these concepts. Relationship types and object categories should be as detailed as possible. The output format converts the domain concepts of objects in the same domain into explicit concept definitions, categorizing them into object category definitions, attribute feature definitions, and relationship definitions based on concept classification. These three types of definitions are then mapped to object categories and attribute features that conform to RDF syntax.

[0095] Next, the electronic device inputs the first prompt word and the entity object data source into the large language model. Using the large language model, and with the first prompt word as the instruction, the electronic device processes the entity object data source to generate an RDF schema. For example, Figure 3As shown, the entity object data source consists of an entity object data table and entity tag cases. The electronic device processes the entity object data table and entity tag cases using the first prompt word as an instruction to obtain an RDF schema. Using the first prompt word as an instruction can guide the large language model to generate a more accurate knowledge graph framework pattern.

[0096] S1022, Based on the knowledge graph framework pattern, the domain knowledge of the same domain objects is extracted from the entity object data source using the large language model.

[0097] In this embodiment, the electronic device can extract domain knowledge of objects in the same domain from an entity object data source according to a knowledge graph framework. The domain knowledge of objects in the same domain includes object category tags, attribute feature tags, and association relationship tags corresponding to the objects in the same domain.

[0098] It should be noted that in the embodiments of this application, the domain knowledge of objects within the same domain is structured knowledge, conforming to the grammatical requirements of the knowledge graph framework pattern. In some examples, if the knowledge graph framework pattern is RDF Schema, then the domain knowledge conforms to the RDF grammatical requirements. Compared to extracting directly from entity object data sources without adhering to the knowledge graph framework pattern, cross-domain knowledge contamination can be avoided, semantic ambiguity can be eliminated, knowledge consistency can be ensured, and thus the problem of poor generation accuracy caused by illusion can be avoided.

[0099] In some examples, electronic devices can use RDF schema and entity object data source as source text (i.e., entity object data source) and input them into a large language model. The large language model then processes the RDF schema and source text to generate a second prompt word.

[0100] The second prompt word, also known as the data extraction prompt word, is used to enable the large language model to extract the object category, attribute features, and relationships of the same domain object from the entity object data source; and to map the object category, attribute features, and relationships of the same domain entity object into object category labels, attribute feature labels, and relationship labels that conform to the RDF syntax definition.

[0101] In some examples, the second cue word includes background information and historical input, task description, and output format. The background information and historical input consist of: extracting key entities, their object categories, attribute characteristics, and relationships from the specific source text based on the established RDF schema and historical input, and integrating them into an RDF file that conforms to the RDF syntax specification.

[0102] Task Description: Accurately identify the object categories and entity instances of objects within the same domain mentioned in the source text. If the source text is a data table, identify all object IDs or entity identifier columns as entity objects. Extract the attribute feature labels carried by each entity object. If the source text is a data table, supplement the already determined domain concepts with all column names except the entity identifier column, based on their type, and assign them corresponding RDF names. Use the table content excluding the entity identifier column as the attribute values ​​describing the entity in the corresponding row. Extract the relationships between entity objects, such as containment, adjacency, and dependency relationships.

[0103] Output format: Based on the current RDF schema, each identified entity is assigned letters and numbers, and the entity object is associated with its domain concept using RDF syntax. For example, based on the currently determined domain concept, each entity-label pair and each triple (entity→relation→entity) is described using RDF syntax, and finally a complete RDF is output.

[0104] For example, the background information of the second prompt word and its historical input: the object category definition in the frame pattern constraint, for example...<http: / / medical.org / Patient> (Patients)<http: / / medical.org / Disease> (Disease category)<http: / / medical.org / Treatment> (Treatment method class); attribute feature definition, for example,<http: / / medical.org / age> (Patient class - Age, value type: Integer)<http: / / medical.org / diseaseName> (Disease Class - Disease Name, Value Type: Text); Association definition, for example, as...<http: / / medical.org / hasDisease> (Patient - suffers from - disease)<http: / / medical.org / receivesTreatment> (Patient - Treatment Received - Treatment Method). Source text: (doc_1, doc_2, ..., doc_n), where n is a positive integer.

[0105] Task Description: Identify specific entity instances in the source text and assign a unique Uniform Resource Identifier (URI) to each instance, for example, a URI like http: / / medical.org / category / instanceID. Extract attribute features of entity objects: match the attribute definitions in the framework and label the attribute value types. Extract the relationships between entity objects: clearly define the subject-relationship-object, and the subject / object must belong to the corresponding category in the framework.

[0106] Output format: Categorized into "Entity Instance Definition → Attribute Knowledge → Relationship Knowledge", with each category annotated with structured text to represent the corresponding source text.

[0107] The electronic device inputs the second prompt word into the large language model, which then uses the second prompt word as an instruction to process the entity object data source and generate domain knowledge for objects in the same domain.

[0108] In some examples, the computing device uses a second prompt word as an instruction to guide the large language model to retrieve knowledge about objects in the same domain from a single entity object data source, following the constraints of a knowledge graph framework. By binding the second prompt word to an RDF schema, it ensures that the domain knowledge extracted by the large language model is uniformly described, thereby achieving the requirements of being domain-specific, unambiguous, and structured.

[0109] S1023, fill the knowledge graph framework pattern with domain knowledge of objects in the same domain to obtain the entity tag knowledge graph.

[0110] In this process, the electronic device transfers the domain knowledge of the acquired objects in the same domain to the knowledge graph framework pattern to generate an entity tag knowledge graph.

[0111] For example, see [link to previous article] Figure 3 The electronic device uses entity tag cases and entity object data tables as source text. By inputting the source text and RDF Schema into the large language model, a second prompt word can be obtained, as shown in step ②. By inputting the second prompt word into the large language model, domain knowledge of objects in the same domain is obtained. The domain knowledge is then transferred to RDF Schema to obtain the entity tag knowledge graph.

[0112] This application's embodiments, based on the scene attributes of entity object data sources, determine object category definitions, attribute feature definitions, and relationship definitions, which can unify domain concept boundaries and avoid semantic confusion. When the large language model extracts domain knowledge, it uses a framework pattern as a basis to filter cross-domain knowledge and avoid semantic ambiguity. Thus, it reduces the amount of illusory knowledge generated during the entity tag knowledge graph generation process.

[0113] In this embodiment, the electronic device first uses an entity tag knowledge graph as structured knowledge training samples to train a neural network, enabling the network to learn how to generate corresponding entity tags based on the data features of entity data. Then, the trained neural network processes the data to be predicted to generate entity tag data. Because the trained neural network focuses on key information related to domain knowledge, the generated entity tags can avoid the influence of irrelevant noise, improving generation accuracy.

[0114] In one specific implementation, the data to be predicted can be entity data including temporal features, such as continuous monitoring data of patient A at multiple time points, specifically: patient A's white blood cell count was 8.5 × 10⁻⁶ at 08:00 on 2025-11-01. 9 / L, red blood cell count 4.2×10¹² / L; white blood cell count 8.2×10¹² / L at 08:00 on 2025-11-02. 9 / L, red blood cell count 4.1×10¹² / L; white blood cell count 8.0×10¹² / L at 08:00 on 2025-11-03. 9 / L, red blood cell count 4.0×10¹² / L; simultaneous electrocardiograms showed sinus rhythm in all cases, with heart rates of 75 bpm, 78 bpm, and 72 bpm, respectively. Furthermore, the data to be predicted also included a large amount of noise; how to achieve more accurate entity label generation remains a technical problem to be solved.

[0115] In some examples, the neural network can include a Convolutional Neural Network (CNN) and a Long Short-Term Memory Network (LSTM). Specifically, CNNs are used to extract local features from the data to be predicted, while simultaneously reducing data dimensionality and noise interference, making subsequent time-series modeling more stable. CNNs can also learn long-term relationships, memorize key historical information, and capture potential patterns in entity labels. LSTMs are used to process the local features obtained by the CNN to obtain entity labels.

[0116] In some examples, considering that the forgotten and retained information of the local features input to the LSTM are relative, the forget gate and the input gate can be coupled. The sum of the activation values ​​of the coupled input gate and the forget gate is 1. This reduces the number of computational parameters by allowing the input value at the new time step to directly affect the state of the forgotten information.

[0117] In other examples, electronic devices can also utilize recursive averaging filtering to filter the data to be predicted, thereby removing periodic interference. Specifically, a queue of length len is set up, and the arithmetic mean of the data to be predicted in the queue at time t-1 is denoted as... At time t, the queue data is updated synchronously by discarding the first data and using the acquired data as the tail data, ensuring that the queue data is always len. The formula for calculating the recursive average is shown in formula (1):

[0118] (1)

[0119] in, This represents the first data item in the queue at time t-1. This represents the tail data in the queue at time t. Let t be the possible filtering results for the data to be predicted at time t, where t is an integer greater than 1.

[0120] For example, let's take the daily monitoring of a patient's complete blood count after surgery to assess the effectiveness of anti-infection treatment. Here, len=3, and the data to be predicted is the white blood cell count (unit: ×10⁻¹⁰). 9 For example, if time t-1 is time 3, and the queue data is [8.5, 8.3, 8.1], the filtering result is... The value is 8.3, and the data collected at time 4 is 8.0. Therefore, the filtering result at time 4 is... The value was 8.13. Through recursive averaging filtering, the white blood cell count for patient C changed from 8.3 to 8.13 to 7.97 to 7.8, which more clearly shows that the white blood cell count is steadily decreasing.

[0121] In some examples, to better preserve long-term memory and improve long-term memory capabilities in the LSTM model, two additional aperture connections were added, allowing the forget gate to accept... Information state of memory units at any given moment As input, the output gate can accept Information state of the memory unit at any time As input, it enables temporal memory enhancement, which plays a crucial role in subsequent data processing.

[0122] Among them, information status The local feature vector obtained after processing the data to be predicted using CNN at time t-1.

[0123] To enable those skilled in the art to better understand the neural networks provided in the embodiments of this application, the following description is provided in conjunction with the appendix. Figure 4 Detailed explanation. See also Figure 4 , Figure 4 A schematic diagram illustrating the implementation of using a neural network to process data to be predicted is shown.

[0124] The data to be predicted is the input sequence. Where N is the data length and is a positive integer. The input sequence X is fed into the CNN, which processes X to obtain the local feature vectors corresponding to the data to be predicted. .

[0125] By processing the data to be predicted using the recursive average filtering described above, we obtain the filtering result at time t. .

[0126] Local feature vectors Filtering results at time t And the temporal characteristics of the LSTM output at time t-1. The input is fed into the LSTM for processing. The specific calculation formulas are shown in formulas (2) to (7):

[0127] (2)

[0128] (3)

[0129] (4)

[0130] (5)

[0131] (6)

[0132] (7)

[0133] in, Let be the activation value of the forget gate at time t. For activation function, , , These are the weight vectors for the forget gate, input gate, and output gate, respectively. , , These are the biases for the forget gate, input gate, and output gate, respectively. Let be the activation value of the input gate at time t, where =1- , The state of the memory unit at time t. Let be the temporal characteristics of the LSTM output at time t. Let t represent the candidate states of the memory unit. Let be the activation value of the output gate at time t. This represents the local feature vector output by the CNN at time t-1. Let t be the data to be predicted after processing by recursive average filtering.

[0134] In this embodiment, entity labels can be obtained based on temporal features. In some examples, electronic devices can input temporal features into a classification module or a regression module to generate entity labels that match the data to be predicted.

[0135] By introducing CNNs and LSTMs into the entity labeling task, we can efficiently extract local features from time-series data, while reducing data dimensionality and noise interference, making subsequent time-series modeling more stable. Furthermore, it can learn long-term temporal dependencies, memorize key historical information, and capture the potential patterns in label evolution. By coupling the forget gate and input gate of the LSTM unit and connecting them to the memory unit, we can improve the memory capacity of time-series data and enhance the ability to process noisy time-series data. Therefore, introducing neural networks with CNNs and LSTMs can achieve more accurate entity label generation.

[0136] In summary, the method provided in this application utilizes a neural network trained on an entity label knowledge graph to process the data to be predicted and generate entity labels for the target object. The entity label knowledge graph is a label knowledge graph generated by a large language model after processing the entity object data source. The entity label knowledge graph includes object category labels, attribute feature labels, and relationship labels for objects in the same domain. Objects in the same domain are entity objects in the entity object data source that belong to the same scene as the target object. By splitting entity label generation into two parts—knowledge graph construction and neural network prediction—the large language model does not need to perform end-to-end reasoning; it only needs to focus on obtaining the entity label knowledge graph corresponding to the object category, attribute features, and relationship, thus reducing computational overhead. Furthermore, this application uses a neural network trained on an entity label knowledge graph to process the data to be predicted. Compared to a large language model, it does not need to call all parameters for semantic decoding, thus further reducing computational overhead. Moreover, training the neural network on an entity label knowledge graph provides semantic boundaries, avoids the generation of unrelated labels, prevents illusions, and improves the accuracy of entity label generation.

[0137] In addition, this application also provides an entity label generation device.

[0138] Appendix Figure 5 This is a schematic diagram of a physical label generation device provided in an embodiment of this application. The device 500 includes:

[0139] The acquisition unit 501 is used to acquire the data to be predicted; the data to be predicted indicates the entity data for generating entity tags of the target object;

[0140] The tag generation unit 502 is used to process the data to be predicted using a neural network to generate entity tags for the target object; the entity tags for the target object include object category tags, attribute feature tags, and association relationship tags for the target object;

[0141] The neural network is trained using an entity label knowledge graph; the entity label knowledge graph is a label knowledge graph generated by processing entity object data sources using a large language model, and the entity label knowledge graph includes object category labels, attribute feature labels, and association relationship labels for objects in the same domain; the objects in the same domain are entity objects in the entity object data source that belong to the same scene as the target object.

[0142] Optionally, the device 500 further includes a graph generation unit, which is used to: process the entity object data source using the large language model to generate a knowledge graph framework pattern; the knowledge graph framework pattern includes the domain concept of the objects in the same domain, and the domain concept includes object category definition, attribute feature definition and association relationship definition;

[0143] Based on the knowledge graph framework pattern, the domain knowledge of the same domain objects is extracted from the entity object data source using the large language model. The domain knowledge includes object category labels, attribute feature labels, and association relationship labels.

[0144] The domain knowledge of the objects in the same domain is filled into the knowledge graph framework pattern to obtain the entity tag knowledge graph.

[0145] Optionally, if the knowledge graph framework pattern is a resource description framework pattern RDF Schema, before processing the entity object data source using the large language model to generate the knowledge graph framework pattern, the following steps are also included:

[0146] Get the first prompt word;

[0147] The first prompt word is used to enable the large language model to obtain the domain concept of the same domain object from the entity object data source, standardize the domain concept of the same domain object, and output the standardized domain concept; the standardized domain concept is a domain concept that conforms to the RDF syntax definition;

[0148] The process of using the large language model to process entity object data sources and generate a knowledge graph framework pattern includes:

[0149] Using the large language model and the first prompt word as an instruction, the entity object data source is processed to generate the RDF Schema.

[0150] Optionally, if the knowledge graph framework schema is RDF Schema, the step of extracting domain knowledge of the target entity object from the entity object data source using the large language model includes:

[0151] The large language model is used to process the entity object data source and the RDF schema to generate a second prompt word;

[0152] The second prompt word is used to enable the large language model to extract the object category, attribute features, and association relationships of the same domain object from the entity object data source; and to map the object category, attribute features, and association relationships of the same domain entity object into object category labels, attribute feature labels, and association relationship labels that conform to the RDF syntax definition.

[0153] Using the large language model and the second prompt word as an instruction, the entity object data source is processed to generate domain knowledge of the same domain object.

[0154] Optionally, if the data to be predicted is entity data including time-series features, the neural network includes a convolutional neural network (CNN) and a long short-term memory network (LSTM).

[0155] The data to be predicted is processed using a CNN to obtain the local feature vector corresponding to the data to be predicted;

[0156] The entity label is obtained by processing the local feature vector using the LSTM.

[0157] Optionally, the LSTM includes a coupled forget gate and an input gate, wherein the sum of the activation values ​​of the input gate and the forget gate is 1;

[0158] The process of using the LSTM to process the local feature vector to obtain the entity label includes:

[0159] The local feature vector is processed using the forget gate and the input gate;

[0160] The entity label is obtained based on the processed local feature vector.

[0161] Optionally, the label generation unit 502 is further configured to: perform filtering processing on the data to be predicted using a recursive average filtering algorithm;

[0162] The step of processing the local feature vector using the LSTM to obtain the entity label includes: processing the local feature vector and the filtered data to be predicted using the LSTM to obtain the entity label.

[0163] Optionally, the LSTM includes an input gate, a forget gate, an output gate, and a memory unit; the LSTM is used to process the local feature vector to obtain the entity label, including:

[0164] The temporal features required to generate the entity label are obtained according to the following formula;

[0165]

[0166]

[0167]

[0168]

[0169]

[0170]

[0171] Where t is a positive integer, Let be the activation value of the forget gate at time t. For activation function, , , These are the weight vectors for the forget gate, input gate, and output gate, respectively. , , These are the biases for the forget gate, input gate, and output gate, respectively. Let be the activation value of the input gate at time t. The state of the memory unit at time t. The temporal characteristics of the LSTM output at time t. Let t represent the candidate states of the memory cells at time t. Let be the activation value of the output gate at time t. For the local feature vector, For time t, the data to be predicted is processed by recursive averaging filtering. The temporal characteristics of the LSTM output at time t-1;

[0172] The entity label is obtained based on the time sequence characteristics.

[0173] The apparatus provided in this application uses a neural network trained on an entity label knowledge graph to process the data to be predicted and generate entity labels for the target object. The entity label knowledge graph is a label knowledge graph generated by a large language model after processing the entity object data source. The entity label knowledge graph includes object category labels, attribute feature labels, and relationship labels for objects in the same domain. Objects in the same domain are entity objects in the entity object data source that belong to the same scene as the target object. By splitting entity label generation into two parts—knowledge graph construction and neural network prediction—the large language model does not need to perform end-to-end reasoning; it only needs to focus on obtaining the entity label knowledge graph corresponding to the object category, attribute features, and relationship, thus reducing computational overhead. Furthermore, this application uses a neural network trained on an entity label knowledge graph to process the data to be predicted. Compared to a large language model, it does not need to call all parameters for semantic decoding, thus further reducing computational overhead. Moreover, training the neural network on an entity label knowledge graph provides semantic boundaries, avoids the generation of unrelated labels, prevents illusions, and improves the accuracy of entity label generation.

[0174] According to the method provided in the embodiments of this application, this application also provides a chip system, which includes one or more processors for calling and executing instructions stored in memory, thereby causing the method described in the embodiments of this application to be executed. The chip system may be composed of chips or may include chips and other discrete devices.

[0175] The chip system may include input circuits or interfaces for transmitting information or data, and output circuits or interfaces for receiving information or data.

[0176] According to the method provided in the embodiments of this application, this application also provides a computer program product, which includes: computer program code, which, when run on a computer, causes the computer to execute the various steps or processes executed by the network device or terminal device in any of the foregoing method embodiments.

[0177] According to the method provided in the embodiments of this application, this application also provides a computer-readable storage medium storing program code, which, when run on a computer, causes the computer to execute the various steps or processes executed by the network device or terminal device in any of the foregoing method embodiments.

[0178] The computer-readable storage medium may be the aforementioned volatile memory or non-volatile memory, or it may include both volatile memory and non-volatile memory.

[0179] In the embodiments of this application, the terms and English abbreviations are exemplary examples given for ease of description and should not be construed as limiting the application in any way. This application does not preclude the possibility of defining other terms that can achieve the same or similar functions in existing or future agreements.

[0180] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When these computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated.

[0181] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

Claims

1. A method for generating entity tags, characterized in that, The method includes: Obtain the data to be predicted; the data to be predicted indicates the entity data for generating entity tags for the target object; The data to be predicted is processed using a neural network to generate entity labels for the target object; the entity labels for the target object include object category labels, attribute feature labels, and relationship labels for the target object. The neural network is trained using an entity label knowledge graph; the entity label knowledge graph is a label knowledge graph generated by processing entity object data sources using a large language model, and the entity label knowledge graph includes object category labels, attribute feature labels, and association relationship labels for objects in the same domain; the objects in the same domain are entity objects in the entity object data source that belong to the same scene as the target object.

2. The method according to claim 1, characterized in that, The method for generating the entity tag knowledge graph includes: The large language model is used to process the entity object data source to generate a knowledge graph framework pattern; the knowledge graph framework pattern includes the domain concept of the objects in the same domain, and the domain concept includes object category definition, attribute feature definition and association relationship definition; Based on the knowledge graph framework pattern, the domain knowledge of the same domain objects is extracted from the entity object data source using the large language model. The domain knowledge includes object category labels, attribute feature labels, and association relationship labels. The domain knowledge of the objects in the same domain is filled into the knowledge graph framework pattern to obtain the entity tag knowledge graph.

3. The method according to claim 2, characterized in that, If the knowledge graph framework pattern is a resource description framework pattern RDF Schema, before processing the entity object data source using the large language model to generate the knowledge graph framework pattern, the method further includes: Get the first prompt word; The first prompt word is used to enable the large language model to obtain the domain concept of the same domain object from the entity object data source, standardize the domain concept of the same domain object, and output the standardized domain concept; the standardized domain concept is a domain concept that conforms to the RDF syntax definition; The process of using the large language model to process entity object data sources and generate a knowledge graph framework pattern includes: Using the large language model and the first prompt word as an instruction, the entity object data source is processed to generate the RDF Schema.

4. The method according to claim 2, characterized in that, If the knowledge graph framework pattern is RDF Schema, the step of extracting domain knowledge of the target entity object from the entity object data source using the large language model includes: The large language model is used to process the entity object data source and the RDF schema to generate a second prompt word; The second prompt word is used to enable the large language model to extract the object category, attribute features, and association relationships of the same domain object from the entity object data source; and to map the object category, attribute features, and association relationships of the same domain entity object into object category labels, attribute feature labels, and association relationship labels that conform to the RDF syntax definition. Using the large language model and the second prompt word as an instruction, the entity object data source is processed to generate domain knowledge of the same domain object.

5. The method according to claim 1, characterized in that, If the data to be predicted is entity data including time-series features, the neural network includes a convolutional neural network (CNN) and a long short-term memory network (LSTM). The step of processing the data to be predicted using a neural network to generate entity labels for the target object includes: The data to be predicted is processed using a CNN to obtain the local feature vector corresponding to the data to be predicted; The entity label is obtained by processing the local feature vector using the LSTM.

6. The method according to claim 5, characterized in that, The LSTM includes a coupled forget gate and an input gate, and the sum of the activation values ​​of the input gate and the forget gate is 1. The process of using the LSTM to process the local feature vector to obtain the entity label includes: The local feature vector is processed using the forget gate and the input gate; The entity label is obtained based on the processed local feature vector.

7. The method according to claim 5 or 6, characterized in that, The method further includes: using a recursive average filtering algorithm to filter the data to be predicted; The step of processing the local feature vector using the LSTM to obtain the entity label includes: processing the local feature vector and the filtered data to be predicted using the LSTM to obtain the entity label.

8. The method according to claim 5, characterized in that, The LSTM includes an input gate, a forget gate, an output gate, and a memory unit; the LSTM is used to process the local feature vector to obtain the entity label, including: The temporal features required to generate the entity label are obtained according to the following formula; Where t is a positive integer, Let be the activation value of the forget gate at time t. For activation function, , , These are the weight vectors for the forget gate, input gate, and output gate, respectively. , , These are the biases for the forget gate, input gate, and output gate, respectively. Let be the activation value of the input gate at time t. The state of the memory unit at time t. The temporal characteristics of the LSTM output at time t. Let t be the candidate state of the memory cell at time t. Let be the activation value of the output gate at time t. For the local feature vector, For time t, the data to be predicted is processed by recursive averaging filtering. The temporal characteristics of the LSTM output at time t-1; The entity label is obtained based on the time sequence characteristics.

9. A physical label generating device, characterized in that, The device includes: An acquisition unit is used to acquire data to be predicted; the data to be predicted indicates entity data for generating entity tags for target objects; The tag generation unit is used to process the data to be predicted using a neural network to generate entity tags for the target object; the entity tags for the target object include object category tags, attribute feature tags, and association relationship tags for the target object; The neural network is trained using an entity label knowledge graph; the entity label knowledge graph is a label knowledge graph generated by processing entity object data sources using a large language model, and the entity label knowledge graph includes object category labels, attribute feature labels, and association relationship labels for objects in the same domain; the objects in the same domain are entity objects in the entity object data source that belong to the same scene as the target object.

10. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Text processing method, system and device based on knowledge graph and large language model

    CN119938931A

  • Automated label generation using a machine-learned language model

    US20250200356A1