A message content extraction method and device, computer equipment and storage medium
By combining keyword extraction, domain classification, and business knowledge graphs, and utilizing long short-term memory networks and conditional random field models, the accuracy and efficiency issues of message content extraction in existing technologies have been solved, and automated key entity identification and structured processing have been achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2026-06-23
AI Technical Summary
Existing message content extraction technologies rely on manually compiled rules or templates, which are difficult to adapt to different text formats and require a lot of manpower and resources to maintain, resulting in missed or false reports in the extraction results. Furthermore, the rules have poor portability.
By combining keyword extraction and vector transformation with a pre-trained domain classification model and business domain knowledge graph, and utilizing long short-term memory networks and conditional random field models, key entities, attributes, and relationships are automatically identified.
It improves the accuracy and efficiency of message content extraction, can automatically identify key entities, attributes and relationships, adapts to different text formats, and reduces the investment of human and material resources.
Smart Images

Figure CN119202126B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of big data technology, specifically relating to a message content extraction method, apparatus, computer equipment, and storage medium. Background Technology
[0002] Outreach verification refers to a series of review processes conducted before sending specific information (such as promotional information, notifications, event details, etc.) to target customers via channels such as SMS, WeChat, and in-app messages. The purpose of this process is to ensure that the sent information is compliant, accurate, and error-free, and reaches target customers in an appropriate format and at the right time, thereby avoiding any inconvenience, loss, or adverse effects on customers due to misdelivery, incorrect delivery, or inappropriate delivery.
[0003] When faced with a large volume of messages, content extraction technology can quickly filter out key information points that require attention. It can accurately extract crucial content, such as time, location, and promotional details, from large amounts of text information, helping reviewers quickly locate problems and improve review efficiency. Current content extraction technologies mainly rely on manually compiled rules or templates to extract specific information from text. These rules or templates are typically defined based on text structure, keywords, sentence patterns, and other features to identify and extract content that meets specific conditions. However, rule-based content extraction methods require rule design for specific knowledge domains or text formats. Therefore, the rules have poor portability and are difficult to apply directly to text in other domains or formats. Furthermore, developing comprehensive and accurate rules requires deep domain knowledge and significant time investment. Additionally, rules may not cover all linguistic phenomena, leading to missed or false positives in the extraction results. As text formats and content continue to change, existing rules need continuous updating and maintenance to maintain the accuracy and reliability of the extraction results. Summary of the Invention
[0004] The purpose of this application is to provide a message content extraction method, apparatus, computer device, and storage medium, aiming to provide a scheme for message content extraction that combines domain classification and business domain knowledge graph, thereby improving the accuracy and efficiency of message content extraction and enabling the automatic identification of key entities, attributes, and relationships.
[0005] To address the aforementioned technical problems, this application provides a message content extraction method, employing the following technical solution:
[0006] A message content extraction method, comprising:
[0007] Keyword extraction is performed on the messages to be reviewed, and the extracted keywords are then transformed into keyword vectors.
[0008] Based on keyword vectors and a pre-trained domain classification model, the message to be reviewed is classified by domain to obtain the domain classification result;
[0009] Based on the domain classification results, determine the target business domain knowledge graph that matches the message to be reviewed, and generate a vector representation of the target business domain knowledge graph to obtain the target knowledge graph vector;
[0010] By combining the target knowledge graph vector, a pre-set long short-term memory network model is used to semantically encode the message to be reviewed, generating a semantic representation vector;
[0011] Based on semantic representation vectors, a conditional random field model is used to identify key entities, entity attributes, and entity relationships in messages to be reviewed.
[0012] Furthermore, the domain classification model is configured with several classification labels for different domains. Based on keyword vectors and a pre-trained domain classification model, the message to be reviewed is classified by domain to obtain the domain classification results, including:
[0013] Calculate the similarity between the keyword vector and the classification label in the domain classification model to obtain the first similarity, and use the first similarity value as the domain classification confidence of the message to be reviewed;
[0014] Sort the domain classification confidence scores of the messages to be reviewed in descending order to obtain the first category confidence score sequence;
[0015] The business domain to which the message to be reviewed belongs is determined based on the first category confidence sequence, and the domain classification result is obtained.
[0016] Furthermore, the business domain to which the message to be reviewed belongs is determined based on the classification confidence sequence, resulting in domain classification results, including:
[0017] Obtain the maximum classification confidence from the classification confidence sequence, where the maximum classification confidence is the maximum value in the classification confidence sequence;
[0018] Compare the maximum classification confidence with the preset confidence threshold;
[0019] When the maximum classification confidence is greater than or equal to the confidence threshold, the classification label corresponding to the maximum classification confidence is obtained, and the business domain represented by the classification label is determined as the business domain to which the message to be reviewed belongs, thus obtaining the domain classification result.
[0020] Furthermore, the classification labels configured in the domain classification model include parent domain labels and child domain labels. The similarity between the keyword vector and the classification labels in the domain classification model is calculated, and the similarity value is used as the domain classification confidence score for the message to be reviewed, including:
[0021] Determine the target parent domain tag that matches the keyword vector;
[0022] Retrieve all child domain tags under the target parent domain tag to obtain the target child domain tag;
[0023] Calculate the similarity between keyword vectors and target subdomain tags to obtain the similarity score;
[0024] The similarity value is used as the confidence level for the domain classification of the message to be reviewed.
[0025] Furthermore, a vector representation of the target business domain knowledge graph is generated, resulting in the target knowledge graph vector, including:
[0026] Obtain the entities associated with the message to be reviewed from the knowledge graph of the target business domain to obtain the associated entities;
[0027] Obtain the relationships between related entities to obtain a set of entity relationships;
[0028] By utilizing the topological structure information of the target business domain knowledge graph, the structural position of the entity relationship set in the target business domain knowledge graph is calculated, and the topological structure of the entity relationship is obtained.
[0029] Semantically represent the topological structure of entities and entity relationships in the target business domain knowledge graph, and generate target knowledge graph vectors.
[0030] Furthermore, the Long Short-Term Memory (LSTM) network model includes an encoding layer, LTM units, and a knowledge fusion unit. Combining the target knowledge graph vector, the pre-defined LTM network model is used to semantically encode the message to be reviewed, generating a semantic representation vector, including:
[0031] Obtain the message text of the message to be reviewed, and load the target knowledge graph vector and the message text into the long short-term memory network model;
[0032] The message text is encoded through an encoding layer to obtain a message text vector;
[0033] The input message text vector is processed using a long short-term memory unit to obtain a hidden state vector;
[0034] The knowledge fusion unit is used to fuse the target knowledge graph vector and the hidden state vector to obtain the semantic representation vector.
[0035] Furthermore, based on semantic representation vectors, a conditional random field model is used to identify key entities, entity attributes, and entity relationships in the messages to be reviewed, including:
[0036] The message to be reviewed is segmented into words and tagged with parts of speech to obtain a lexical tag sequence;
[0037] Feature extraction is performed on the labeled word sequence using a conditional random field model to obtain several word feature vectors;
[0038] Semantic analysis is performed on each word feature vector based on semantic representation vectors, and key entities, entity attributes and entity relationships are determined based on the semantic analysis results.
[0039] Semantic analysis is performed on each word feature vector based on its semantic representation vector. Based on the semantic analysis results, key entities, entity attributes, and entity relationships are determined, including:
[0040] Based on semantic representation vectors, semantic analysis algorithms are used to perform semantic analysis on each word feature vector to obtain the semantic features corresponding to each word feature vector.
[0041] Key entities in the message to be reviewed are identified by semantic features, and a list of key entities is obtained.
[0042] Based on the list of key entities, the entity attributes and entity relationships contained in each key entity are identified according to the semantic representation vector.
[0043] To address the aforementioned technical problems, this application also provides a message content extraction device, which employs the following technical solution:
[0044] A message content extraction device, comprising:
[0045] The keyword processing module is used to extract keywords from messages to be reviewed and to perform vector transformation on the extracted keywords to obtain keyword vectors.
[0046] The domain classification module is used to classify the messages to be reviewed based on keyword vectors and pre-trained domain classification models, and obtain the domain classification results.
[0047] The graph vectorization module is used to determine the target business domain knowledge graph that matches the message to be reviewed based on the domain classification results, and generate a vector representation of the target business domain knowledge graph to obtain the target knowledge graph vector.
[0048] The semantic encoding module is used to combine the target knowledge graph vector with a preset long short-term memory network model to perform semantic encoding on the message to be reviewed, and generate a semantic representation vector.
[0049] The content extraction module is used to identify key entities, entity attributes, and entity relationships in messages to be reviewed based on semantic representation vectors and using a conditional random field model.
[0050] To address the aforementioned technical problems, this application also provides a computer device that employs the following technical solution:
[0051] A computer device includes a memory and a processor, the memory storing computer-readable instructions, the processor executing the computer-readable instructions to implement the steps of the message content extraction method as described in any of the preceding claims.
[0052] To address the aforementioned technical problems, this application also provides a computer-readable storage medium, employing the technical solution described below:
[0053] A computer-readable storage medium storing computer-readable instructions, which, when executed by a processor, implement the steps of the message content extraction method as described in any one of the preceding descriptions.
[0054] Compared with the prior art, the embodiments of this application have the following main advantages:
[0055] This application discloses a message content extraction method, apparatus, computer device, and storage medium, relating to the field of big data technology. First, the message to be reviewed is converted into a keyword vector through keyword extraction and vector transformation. Then, a pre-trained domain classification model is used to classify the keyword vectors by domain, determining the business domain to which the message belongs. Based on the domain classification results, a matching target business domain knowledge graph is selected, and its vector representation is generated. Next, combined with this vector representation, a pre-set long short-term memory network model is used to semantically encode the message, generating a semantic representation vector. Finally, based on this semantic representation vector, a conditional random field model is used to accurately identify key entities, attributes, and relationships in the message. Combining domain classification and business domain knowledge graphs for message content extraction, and incorporating the contextual semantic information of the message content, improves the accuracy and efficiency of message content extraction by enabling the automatic identification of key entities, attributes, and relationships. Attached Figure Description
[0056] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0057] Figure 1 An exemplary system architecture diagram is shown, in which this application can be applied;
[0058] Figure 2 A flowchart of one embodiment of the message content extraction method according to this application is shown;
[0059] Figure 3A schematic diagram of one embodiment of the message content extraction apparatus according to this application is shown;
[0060] Figure 4 A schematic diagram of the structure of one embodiment of a computer device according to this application is shown. Detailed Implementation
[0061] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.
[0062] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0063] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0064] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0065] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.
[0066] Terminal devices 101, 102, and 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc.
[0067] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on terminal devices 101, 102, and 103. The server can be a standalone server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0068] It should be noted that the message content extraction method provided in this application embodiment is generally executed by the server, and correspondingly, the message content extraction device is generally set in the server.
[0069] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0070] Continue to refer to Figure 2 The diagram illustrates a flowchart of an embodiment of the message content extraction method according to this application. Embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) is a theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0071] Foundational artificial intelligence technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly include computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning. The aforementioned message content extraction method includes the following steps:
[0072] S201: Extract keywords from the message to be reviewed, and then perform vector transformation on the extracted keywords to obtain keyword vectors.
[0073] Specifically, the process begins by employing keyword extraction techniques, such as TF-IDF, TextRank, or deep learning-based methods, to automatically identify the most representative words or phrases from the text as keywords. These keywords summarize the main content or core ideas of the text. Subsequently, vector transformation techniques, such as word embedding models like Word2Vec, GloVe, or BERT's embedding layer, are used to map each keyword into a high-dimensional vector space, forming keyword vectors. These vectors not only preserve the semantic information of the words but also reflect the similarity and relationships between words to a certain extent.
[0074] S202, based on keyword vectors and a pre-trained domain classification model, performs domain classification on messages to be reviewed, and obtains domain classification results.
[0075] Specifically, the process begins by using keyword extraction technology to extract key information from the messages to be reviewed and converting it into vector form, i.e., keyword vectors. These vectors are then fed into a pre-trained domain classification model. The domain classification model uses deep learning algorithms (such as Convolutional Neural Networks (CNNs), Recurrent Neural Networks (RNNs) or their variants LSTM / GRU, or even Transformer structures) to efficiently and accurately process the keyword vectors, thereby identifying the specific domain or category to which the message belongs. This process fully leverages the feature representation capabilities learned by the pre-trained model on a large amount of domain-related data, as well as the semantic information contained in the keyword vectors, achieving automation and intelligence in the domain classification of messages to be reviewed, significantly improving the accuracy and efficiency of classification.
[0076] Domain classification models are machine learning models used to identify the domain to which text belongs. They can automatically categorize text into predefined domains, such as news, technology, and entertainment, based on its content and features. These models learn text features from different domains through training, thus achieving accurate classification of new text.
[0077] S203. Based on the domain classification results, determine the target business domain knowledge graph that matches the message to be reviewed, and generate a vector representation of the target business domain knowledge graph to obtain the target knowledge graph vector.
[0078] Specifically, firstly, messages are accurately classified using a domain classification model to determine their respective business domains. Then, based on this classification result, a target business domain knowledge graph matching the message to be reviewed is selected. As a collection of structured data, the business domain knowledge graph contains comprehensive information about entities, attributes, and relationships within that domain. For subsequent processing, the system also needs to generate a vector representation of the target business domain knowledge graph, i.e., the target knowledge graph vector. Using graph embedding techniques such as TransE and Node2Vec, nodes and relationships in the knowledge graph are transformed into vectors in a high-dimensional space, facilitating efficient computation and reasoning by the computer. In this way, the system can fully utilize the rich information of the domain knowledge graph.
[0079] Domain Knowledge Graph (DKG) is a knowledge graph built for a specific domain or industry. It's a graph-based data structure that organizes information through nodes (representing entities) and edges (representing relationships between entities), forming a comprehensive and structured representation of knowledge within that domain. For example, an insurance product knowledge graph is built around insurance products, containing basic information such as product name, type, coverage, premium, and sum insured, as well as terms and conditions, underwriting requirements, and claims procedures. Another example is a claims process knowledge graph, which details the procedures, standards, and requirements for insurance claims, including each stage such as reporting, investigation, loss assessment, claims processing, and payment.
[0080] S204 combines the target knowledge graph vector with a pre-defined long short-term memory network model to semantically encode the message to be reviewed, generating a semantic representation vector.
[0081] Specifically, this method combines target knowledge graph vectors with a Long Short-Term Memory (LSTM) network model to perform deep semantic encoding on messages to be reviewed. First, knowledge from the target domain is abstracted into vector form—target knowledge graph vectors—using knowledge graph technology. These vectors contain rich domain knowledge and contextual information. Then, the message to be reviewed is combined with these vectors as input to the LSTM model. The LSTM model, a special type of recurrent neural network (RNN), effectively captures long-distance dependencies in text and processes sequential information through its internal "gating" mechanism. During this process, the LSTM model utilizes the domain knowledge provided by the target knowledge graph vectors to perform deeper semantic understanding and analysis of the message to be reviewed, ultimately generating a semantic representation vector that accurately expresses the core semantics of the message, significantly improving the accuracy and efficiency of text semantic encoding.
[0082] S205, based on semantic representation vectors, uses a conditional random field model to identify key entities, entity attributes, and entity relationships in messages to be reviewed.
[0083] Specifically, in Natural Language Processing (NLP), a Conditional Random Field (CRF) model combined with semantic representation vectors is used to identify key entities, entity attributes, and entity relationships in messages to be reviewed. First, the semantic representation vectors obtained through the steps described above are used. Then, this vector is input into the CRF model, a sequence labeling model that considers dependencies between labels, thereby optimizing the labeling results globally. During the recognition process, the CRF model not only focuses on the semantic information of the current word but also considers the context, combining domain knowledge from the semantic representation vectors to accurately identify key entities in the message, their attributes, and the relationships between them, effectively improving the accuracy and robustness of entity and relationship recognition.
[0084] In the above embodiments, this application discloses a message content extraction method, relating to the field of big data technology. First, the message to be reviewed is converted into a keyword vector through keyword extraction and vector transformation. Then, a pre-trained domain classification model is used to classify the keyword vector into different domains to determine the business domain to which the message belongs. Based on the domain classification results, a matching target business domain knowledge graph is selected, and its vector representation is generated. Next, combined with this vector representation, a pre-set long short-term memory network model is used to semantically encode the message, generating a semantic representation vector. Finally, based on this semantic representation vector, a conditional random field model is used to accurately identify key entities, attributes, and relationships in the message. Combining domain classification and business domain knowledge graphs for message content extraction, and incorporating the contextual semantic information of the message content, improves the accuracy and efficiency of message content extraction by enabling the automatic identification of key entities, attributes, and relationships.
[0085] Furthermore, the domain classification model is configured with several classification labels for different domains. Based on keyword vectors and a pre-trained domain classification model, the message to be reviewed is classified by domain to obtain the domain classification results, including:
[0086] Calculate the similarity between the keyword vector and the classification label in the domain classification model to obtain the first similarity, and use the first similarity value as the domain classification confidence of the message to be reviewed;
[0087] Sort the domain classification confidence scores of the messages to be reviewed in descending order to obtain the first category confidence score sequence;
[0088] The business domain to which the message to be reviewed belongs is determined based on the first category confidence sequence, and the domain classification result is obtained.
[0089] In the above embodiment, firstly, by calculating the similarity (i.e., the first similarity) between the keyword vector and each classification label in the pre-trained domain classification model, a domain classification confidence score is assigned to the message to be reviewed. This fully utilizes the spatial characteristics of vectors to effectively measure the degree of association between the message content and each domain. Subsequently, the confidence scores are sorted in descending order to form a first classification confidence score sequence, which intuitively demonstrates the strength of the match between the message and each domain. Finally, based on this sequence, the business domain to which the message belongs is determined, ensuring the accuracy and rationality of the domain classification.
[0090] In the above embodiments, this application determines the domain classification by assigning a confidence level to the message to be reviewed, which not only improves the accuracy of the classification but also enhances the interpretability of the classification process.
[0091] In the above embodiments, a hierarchical classification label system is introduced in the domain classification process, including parent domain labels and sub-domain labels. By introducing a hierarchical classification label system, not only is the accuracy of classification improved, but the classification results are also made to better meet the needs of actual business scenarios, because there may be significant differences between different sub-domains, which directly affect the subsequent knowledge graph matching and semantic encoding processes.
[0092] Furthermore, the business domain to which the message to be reviewed belongs is determined based on the classification confidence sequence, resulting in domain classification results, including:
[0093] Obtain the maximum classification confidence from the classification confidence sequence, where the maximum classification confidence is the maximum value in the classification confidence sequence;
[0094] Compare the maximum classification confidence with the preset confidence threshold;
[0095] When the maximum classification confidence is greater than or equal to the confidence threshold, the classification label corresponding to the maximum classification confidence is obtained, and the business domain represented by the classification label is determined as the business domain to which the message to be reviewed belongs, thus obtaining the domain classification result.
[0096] In the above embodiments, firstly, the maximum value is selected from the classification confidence sequence as the maximum classification confidence, ensuring that the selected domain best matches the message to be reviewed. Then, a clear judgment criterion is introduced by comparing it with a preset confidence threshold to evaluate the reliability of the classification results. When the maximum classification confidence meets the threshold requirement (i.e., the maximum classification confidence is greater than or equal to the confidence threshold), the classification result is considered to have high credibility. At this time, the corresponding classification label is directly used as the business domain of the message to be reviewed, ensuring the accuracy and effectiveness of the domain classification results. When the maximum classification confidence is less than the confidence threshold, an alarm message is output indicating that the classification confidence is less than the confidence threshold. This informs the processor that there are no sub-labels matching the current keyword vector in the classification label set, and matching label registration is required to generate parent and sub-labels matching the current keyword vector in the classification label set.
[0097] In the above embodiments, by setting a confidence comparison mechanism, the business domain to which the message to be reviewed belongs is determined, which not only improves the accuracy of classification, but also enhances the stability and reliability of the classification results.
[0098] Furthermore, the classification labels configured in the domain classification model include parent domain labels and child domain labels. The similarity between the keyword vector and the classification labels in the domain classification model is calculated, and the similarity value is used as the domain classification confidence score for the message to be reviewed, including:
[0099] Determine the target parent domain tag that matches the keyword vector;
[0100] Retrieve all child domain tags under the target parent domain tag to obtain the target child domain tag;
[0101] Calculate the similarity between keyword vectors and target subdomain tags to obtain the similarity score;
[0102] The similarity value is used as the confidence level for the domain classification of the message to be reviewed.
[0103] In the above embodiment, firstly, a matching mechanism is used to identify the parent domain label that best matches the keyword vector from a predefined classification label system. Then, for that parent domain, all sub-domain labels are traversed and obtained to achieve a more refined classification of the message content. Next, similarity calculation methods (such as cosine similarity, Euclidean distance, etc.) are used to calculate similarity, quantifying the degree of association between the keyword vector and each target sub-domain label, generating similarity values. Finally, these similarity values are directly used as confidence indicators to measure the accuracy of the domain classification of the message to be reviewed, thereby assisting decision-makers or the system in automatically completing the message classification process, improving the accuracy and efficiency of classification.
[0104] Through the above steps, this application achieves high-precision determination of the domain classification of messages to be reviewed by combining a refined domain classification system (including parent and child domain labels) with the similarity calculation of keyword vectors and classification labels. Through layer-by-layer matching and similarity evaluation, it not only ensures the breadth of classification coverage but also improves the depth and accuracy of classification, providing high-confidence domain classification results for message processing and enhancing the intelligence and automation level of the system.
[0105] Furthermore, when the maximum classification confidence score calculated by the system fails to reach the preset confidence threshold, it indicates that no sub-domain label highly matching the input keyword vector has been found in the current classification label set. To address this, the system outputs an alarm message to clearly communicate the classification failure to the processing personnel and point out the lack of a corresponding match in the classification label set. This step not only improves the system's transparency and user-friendliness but also facilitates subsequent label registration. Based on the alarm message, the processing personnel need to register new matching labels, including parent and child labels, to expand the classification label set, ensuring that the system can more accurately handle similar keyword vectors encountered in the future, thereby improving the overall accuracy and efficiency of classification.
[0106] Furthermore, a vector representation of the target business domain knowledge graph is generated, resulting in the target knowledge graph vector, including:
[0107] Obtain the entities associated with the message to be reviewed from the knowledge graph of the target business domain to obtain the associated entities;
[0108] Obtain the relationships between related entities to obtain a set of entity relationships;
[0109] By utilizing the topological structure information of the target business domain knowledge graph, the structural position of the entity relationship set in the target business domain knowledge graph is calculated, and the topological structure of the entity relationship is obtained.
[0110] Semantically represent the topological structure of entities and entity relationships in the target business domain knowledge graph, and generate target knowledge graph vectors.
[0111] In the above embodiments, firstly, entities directly related to the message to be reviewed are extracted from the target business domain knowledge graph. These entities are key to understanding and analyzing the message content. Then, the complex relationships between these related entities are identified, forming a set of entity relationships to reveal the business logic and context behind the message. Next, the topological structure information of the knowledge graph is used to calculate the position of these entity relationships within the graph, i.e., their topological structure. By identifying the position of entity relationships in the graph, the direct correlation of entity relationships is confirmed, and the overall structural characteristics of the knowledge graph are incorporated, providing rich contextual information for subsequent semantic representation. Finally, by performing high-level semantic representation on the topological structure of entities and their relationships, a target knowledge graph vector is generated. Semantic representation of the topological structure of entities and entity relationships captures and expresses the deep logic and contextual information of these entities and relationships in the knowledge graph, enabling machine learning models to more accurately understand the meaning and patterns in the data, thereby improving the performance of tasks such as classification and reasoning.
[0112] The topological structure of entity relationships refers to the spatial or logical structure formed by the interconnectedness of entities through relationships in a knowledge graph or network graph. This structure does not consider the specific size or shape of entities and relationships, but rather focuses on their connection methods and relative positions. Through topological structure, the interactions and dependencies between entities can be clearly displayed, thus providing strong support for tasks such as knowledge reasoning and data analysis. The topological structure of entity relationships is an important consideration when constructing knowledge graphs or conducting network analysis.
[0113] Calculating the structural position of a set of entity relationships within a knowledge graph of the target business domain typically involves analyzing the connection paths, distances, and hierarchical levels of entities within the graph. First, the entities associated with the message to be reviewed and the direct and indirect relationships between them are identified. Second, graph theory algorithms (such as Dijkstra's algorithm) are used to calculate the shortest paths or distances between these entities. Finally, based on the entities' hierarchical levels or parent-child relationships within the graph, their specific positions within the structure are determined. This process helps in understanding the relative importance and interactions between entities, providing a foundation for subsequent semantic representation.
[0114] In the above embodiments, this application generates a target knowledge graph vector by identifying the topological structure of entity relationships and semantically representing the topological structure of entities and entity relationships. This target knowledge graph vector not only captures key entities and relationships related to the message, but also incorporates deep structural information of the knowledge graph, providing powerful and semantically rich feature inputs for subsequent machine learning models or algorithms, thereby improving the accuracy and efficiency of tasks such as domain classification and information retrieval.
[0115] Furthermore, the Long Short-Term Memory (LSTM) network model includes an encoding layer, LTM units, and a knowledge fusion unit. Combining the target knowledge graph vector, the pre-defined LTM network model is used to semantically encode the message to be reviewed, generating a semantic representation vector, including:
[0116] Obtain the message text of the message to be reviewed, and load the target knowledge graph vector and the message text into the long short-term memory network model;
[0117] The message text is encoded through an encoding layer to obtain a message text vector;
[0118] The input message text vector is processed using a long short-term memory unit to obtain a hidden state vector;
[0119] The knowledge fusion unit is used to fuse the target knowledge graph vector and the hidden state vector to obtain the semantic representation vector.
[0120] In the above embodiments, the semantic understanding and representation capabilities of messages awaiting review are effectively improved by combining a Long Short-Term Memory (LSTM) network model with a target business domain knowledge graph. First, by inputting the message text and the target knowledge graph vector into the LSTM model, initial integration of textual information and domain knowledge is achieved. At the encoding layer, the message text is converted into a vectorized representation. Subsequently, the LSTM unit utilizes its unique gating mechanism to perform deep processing on the message text vector, thereby extracting richer contextual dependency information and generating hidden state vectors. Finally, the knowledge fusion unit fuses the target knowledge graph vectors with the hidden state vectors. This process not only preserves the semantic information of the text itself but also incorporates the deep structure and logical relationships of the domain knowledge graph, making the generated semantic representation vectors more comprehensive and accurate.
[0121] Long Short-Term Memory (LSTM) networks are a special type of recurrent neural network (RNN) designed to address the vanishing or exploding gradient problems that traditional RNNs encounter when processing long sequences of data. LSTMs introduce three control units—a forget gate, an input gate, and an output gate—allowing the network to selectively forget or retain information while capturing long-term dependencies. This structure makes LSTMs particularly effective in processing time-series and text data, enabling them to capture more complex sequence features.
[0122] The hidden state vector is a key concept in recurrent neural networks (RNNs) and their variants (such as LSTM and GRU). It represents the internal information or memory contained in the input sequence up to the current time step when the network processes sequential data. The hidden state vector is passed through the network's recurrent connections, enabling the network to capture the temporal dependencies and contextual information in the sequence. In generation tasks, the hidden state vector can also be used to generate the output for the next time step. In short, the hidden state vector is a data structure used by RNNs and their variants to store and pass internal information when processing sequential data.
[0123] In the above embodiments, knowledge fusion of the target knowledge graph vector and the latent state vector helps to combine domain knowledge with the semantic information of the text itself. The latent state vector captures the contextual dependencies and internal information of the text sequence, while the target knowledge graph vector represents the structured knowledge within the domain. By fusing these two vectors, a more comprehensive and accurate semantic representation vector can be generated. This vector contains both the specific meaning of the text and incorporates the constraints and context of domain knowledge, thereby improving the accuracy and efficiency of subsequent tasks (such as classification, reasoning, etc.).
[0124] Furthermore, based on semantic representation vectors, a conditional random field model is used to identify key entities, entity attributes, and entity relationships in the messages to be reviewed, including:
[0125] The message to be reviewed is segmented into words and tagged with parts of speech to obtain a lexical tag sequence;
[0126] Feature extraction is performed on the labeled word sequence using a conditional random field model to obtain several word feature vectors;
[0127] Semantic analysis is performed on each word feature vector based on semantic representation vectors, and key entities, entity attributes, and entity relationships are determined based on the semantic analysis results.
[0128] In the above embodiments, by combining semantic representation vectors with a conditional random field (CRF) model, accurate identification of key entities, entity attributes, and relationships in the message to be reviewed is achieved. First, word segmentation and part-of-speech tagging techniques are used to transform the message text into an easily processed sequence of lexical tags. Then, leveraging the sequence modeling capabilities of the CRF model, rich lexical feature vectors are extracted from the lexical tag sequence. These feature vectors contain contextual information and grammatical rules between words. Furthermore, based on the previously generated semantic representation vectors, in-depth semantic analysis is performed on each lexical feature vector. By integrating the semantic information of the text with domain knowledge, key entities, their attributes, and the complex relationships between them can be identified more accurately.
[0129] Conditional Random Fields (CRFs) are discriminative probabilistic undirected graphical models used to model and infer the conditional probability distribution of sequential data. They are particularly suitable for labeling or analyzing sequential data, such as natural language text, by considering the dependencies between elements in the sequence to improve labeling accuracy. CRFs break the assumptions of Hidden Markov Models, enabling them to better capture the contextual information of sequential data and the dependencies between labels, thus finding wide application in fields such as natural language processing and computer vision.
[0130] In the above embodiments, by integrating semantic and statistical models, the accuracy and efficiency of entity relation extraction are significantly improved.
[0131] Semantic analysis is performed on each word feature vector based on its semantic representation vector. Based on the semantic analysis results, key entities, entity attributes, and entity relationships are determined, including:
[0132] Based on semantic representation vectors, semantic analysis algorithms are used to perform semantic analysis on each word feature vector to obtain the semantic features corresponding to each word feature vector.
[0133] Key entities in the message to be reviewed are identified by semantic features, and a list of key entities is obtained.
[0134] Based on the list of key entities, the entity attributes and entity relationships contained in each key entity are identified according to the semantic representation vector.
[0135] In the above embodiments, by deeply fusing semantic representation vectors and semantic analysis algorithms, precise extraction of key entities, entity attributes, and relationships from messages is achieved. First, semantic analysis algorithms are used to interpret lexical feature vectors, extracting the semantic features behind each word. Then, based on these rich semantic features, key entities in the message are accurately identified, and a list of key entities is constructed. Finally, by further analyzing the correlation between semantic representation vectors and the list of key entities, not only are the specific attributes of each key entity identified, but the intricate entity relationships between key entities are also revealed.
[0136] Identifying key entities in messages awaiting review through semantic features primarily relies on semantic analysis algorithms to deeply analyze lexical feature vectors. These semantic feature vectors capture the deeper meaning and contextual information of words, enabling the model to distinguish which words are crucial in a specific context. The semantic analysis algorithm analyzes these feature vectors and matches them with predefined entity types or patterns, thereby identifying key entities such as names of people, places, and organizations in the message. This process combines semantic understanding and pattern recognition techniques, improving the accuracy and efficiency of entity recognition.
[0137] In this embodiment, the message content extraction method runs on an electronic device (e.g., Figure 1 The server shown can receive instructions or acquire data via wired or wireless connection. It should be noted that the aforementioned wireless connection methods may include, but are not limited to, 3G / 4G connections, WiFi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB (ultra-wideband) connections, and other currently known or future wireless connection methods.
[0138] It should be emphasized that, to further ensure the privacy and security of the aforementioned messages awaiting review, these messages can also be stored in a node of a blockchain.
[0139] The blockchain referred to in this application is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.
[0140] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware through computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium. When executed, the computer-readable instructions can include the processes of the embodiments of the above methods. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).
[0141] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0142] Further reference Figure 3 As a response to the above Figure 2To implement the method shown, this application provides an embodiment of a message content extraction device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0143] like Figure 3 As shown, the message content extraction device 300 described in this embodiment includes:
[0144] The keyword processing module 301 is used to extract keywords from the messages to be reviewed and to perform vector transformation on the extracted keywords to obtain keyword vectors.
[0145] Domain classification module 302 is used to classify the message to be reviewed based on keyword vectors and a pre-trained domain classification model, and obtain the domain classification result;
[0146] The graph vectorization module 303 is used to determine the target business domain knowledge graph that matches the message to be reviewed based on the domain classification results, and generate a vector representation of the target business domain knowledge graph to obtain the target knowledge graph vector.
[0147] The semantic encoding module 304 is used to combine the target knowledge graph vector and use a preset long short-term memory network model to perform semantic encoding on the message to be reviewed, and generate a semantic representation vector.
[0148] The content extraction module 305 is used to identify key entities, entity attributes and entity relationships in the message to be reviewed based on semantic representation vectors and using a conditional random field model.
[0149] Furthermore, the domain classification model is configured with several classification labels for different domains. The domain classification module 302 is specifically used for:
[0150] Calculate the similarity between the keyword vector and the classification label in the domain classification model to obtain the first similarity, and use the first similarity value as the domain classification confidence of the message to be reviewed; sort the domain classification confidence of the message to be reviewed in descending order to obtain the first classification confidence sequence; determine the business domain to which the message to be reviewed belongs based on the first classification confidence sequence to obtain the domain classification result.
[0151] Furthermore, the domain classification module 302 is further used for:
[0152] Obtain the first category confidence score from the first category confidence score sequence, where the first category confidence score is the maximum value in the first category confidence score sequence; compare the first category confidence score with a preset confidence score threshold; when the first category confidence score is greater than or equal to the confidence score threshold, obtain the category label corresponding to the first category confidence score, and determine the business domain represented by the category label as the business domain to which the message to be reviewed belongs, thus obtaining the domain classification result.
[0153] Furthermore, the classification labels configured in the domain classification model include parent domain labels and child domain labels, and the domain classification module 302 is further used for:
[0154] Filter subdomain labels that match the keyword vectors to obtain the first subdomain label; calculate the similarity between the keyword vector and the first subdomain label.
[0155] Domain classification module 302 is also used for:
[0156] When the confidence score of the first category is less than the confidence threshold, the target parent domain label matching the keyword vector is determined; all sub-domain labels under the target parent domain label are obtained to obtain the second sub-domain label; the similarity between the keyword vector and the second sub-domain label is calculated to obtain the second similarity score, and the second similarity score is used as the domain classification confidence score of the message to be reviewed; the domain classification confidence scores of the message to be reviewed are sorted in descending order to obtain the second category confidence score sequence; the second category confidence score is obtained from the second category confidence score sequence, where the second category confidence score is the maximum value in the second category confidence score sequence; the second category confidence score is compared with the preset confidence threshold; when the second category confidence score is greater than or equal to the confidence threshold, the category label corresponding to the second category confidence score is obtained, and the business domain represented by the category label is determined as the business domain to which the message to be reviewed belongs, thus obtaining the domain classification result.
[0157] Furthermore, the graph vectorization module 303 is specifically used for:
[0158] In the target business domain knowledge graph, obtain the entities associated with the message to be reviewed, and obtain the associated entities; obtain the relationships between the associated entities, and obtain the entity relationship set; use the topological structure information of the target business domain knowledge graph to calculate the structural position of the entity relationship set in the target business domain knowledge graph, and obtain the topological structure of the entity relationship; perform semantic representation on the topological structure of the entities and entity relationships in the target business domain knowledge graph, and generate the target knowledge graph vector.
[0159] Furthermore, the Long Short-Term Memory (LSTM) network model includes an encoding layer, LSM units, and knowledge fusion units. The semantic encoding module 304 is specifically used for:
[0160] The system retrieves the message text of the message to be reviewed and loads the target knowledge graph vector and the message text into a long short-term memory network model. The message text is encoded through an encoding layer to obtain a message text vector. The input message text vector is processed using a long short-term memory unit to obtain a hidden state vector. The target knowledge graph vector and the hidden state vector are fused using a knowledge fusion unit to obtain a semantic representation vector.
[0161] Furthermore, the content extraction module 305 is specifically used for:
[0162] The message to be reviewed is segmented and tagged with parts of speech to obtain a word tag sequence. The word tag sequence is then used to extract features from the word tag sequence using a conditional random field model to obtain several word feature vectors. Semantic analysis is then performed on each word feature vector based on the semantic representation vector, and key entities, entity attributes, and entity relationships are determined based on the semantic analysis results.
[0163] Content extraction module 305 is further used for:
[0164] Based on semantic representation vectors, a semantic analysis algorithm is used to perform semantic analysis on each word feature vector to obtain the semantic features corresponding to each word feature vector; key entities in the message to be reviewed are identified through semantic features to obtain a list of key entities; based on the list of key entities, the entity attributes and entity relationships contained in each key entity are identified according to the semantic representation vectors.
[0165] In the above embodiments, this application discloses a message content extraction device, relating to the field of big data technology. First, the message to be reviewed is converted into a keyword vector through keyword extraction and vector transformation. Then, a pre-trained domain classification model is used to classify the keyword vectors by domain, determining the business domain to which the message belongs. Based on the domain classification results, a matching target business domain knowledge graph is selected, and its vector representation is generated. Next, combined with this vector representation, a preset long short-term memory network model is used to semantically encode the message, generating a semantic representation vector. Finally, based on this semantic representation vector, a conditional random field model is used to accurately identify key entities, attributes, and relationships in the message. Combining domain classification and business domain knowledge graphs for message content extraction, and incorporating the contextual semantic information of the message content, improves the accuracy and efficiency of message content extraction by enabling the automatic identification of key entities, attributes, and relationships.
[0166] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0167] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected via a system bus. It should be noted that only the computer device 4 with components 41-43 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0168] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.
[0169] The memory 41 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as the hard disk or memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 4. Of course, the memory 41 may include both the internal storage unit and its external storage device of the computer device 4. In this embodiment, the memory 41 is typically used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions for message content extraction methods. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or will be output.
[0170] In some embodiments, the processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to execute computer-readable instructions stored in the memory 41 or to process data, for example, to execute computer-readable instructions for the message content extraction method.
[0171] The network interface 43 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 4 and other electronic devices.
[0172] In the above embodiments, this application discloses a computer device relating to the field of big data technology. First, the message to be reviewed is converted into a keyword vector through keyword extraction and vector transformation. Then, a pre-trained domain classification model is used to classify the keyword vector into different domains to determine the business domain to which the message belongs. Based on the domain classification results, a matching target business domain knowledge graph is selected, and its vector representation is generated. Next, combined with this vector representation, a pre-set long short-term memory network model is used to semantically encode the message, generating a semantic representation vector. Finally, based on this semantic representation vector, a conditional random field model is used to accurately identify key entities, attributes, and relationships in the message. Combining domain classification and business domain knowledge graphs for message content extraction, and incorporating the contextual semantic information of the message content, improves the accuracy and efficiency of message content extraction by enabling the automatic identification of key entities, attributes, and relationships.
[0173] This application also provides another embodiment, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the message content extraction method described above.
[0174] In the above embodiments, this application discloses a computer-readable storage medium, relating to the field of big data technology. First, the message to be reviewed is converted into a keyword vector through keyword extraction and vector transformation. Then, a pre-trained domain classification model is used to classify the keyword vector into different domains to determine the business domain to which the message belongs. Based on the domain classification results, a matching target business domain knowledge graph is selected, and its vector representation is generated. Next, combined with this vector representation, a preset long short-term memory network model is used to semantically encode the message, generating a semantic representation vector. Finally, based on this semantic representation vector, a conditional random field model is used to accurately identify key entities, attributes, and relationships in the message. Combining domain classification and business domain knowledge graphs for message content extraction, and incorporating the contextual semantic information of the message content, improves the accuracy and efficiency of message content extraction by enabling the automatic identification of key entities, attributes, and relationships.
[0175] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0176] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0177] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.
Claims
1. A method for extracting message content, characterized in that, include: Extract keywords from the messages to be reviewed, and then perform vector transformation on the extracted keywords to obtain keyword vectors; Based on the keyword vector and the pre-trained domain classification model, the message to be reviewed is classified by domain to obtain the domain classification result; Based on the domain classification results, a target business domain knowledge graph matching the message to be reviewed is determined, and a vector representation of the target business domain knowledge graph is generated to obtain the target knowledge graph vector; Combining the target knowledge graph vector, a preset long short-term memory network model is used to semantically encode the message to be reviewed, generating a semantic representation vector; Based on the semantic representation vector, the key entities, entity attributes, and entity relationships in the message to be reviewed are identified using a conditional random field model. The process of generating a vector representation of the target business domain knowledge graph, resulting in a target knowledge graph vector, includes: Obtain the entity associated with the message to be reviewed from the knowledge graph of the target business domain to obtain the associated entity; Obtain the association relationships between the associated entities to obtain a set of entity association relationships; Using the topological structure information of the target business domain knowledge graph, the structural position of the entity relationship set in the target business domain knowledge graph is calculated to obtain the topological structure of the entity relationship; Semantically represent the topological structure of entities and entity relationships in the target business domain knowledge graph to generate the target knowledge graph vector; The Long Short-Term Memory (LSTM) network model includes an encoding layer, LTM units, and a knowledge fusion unit. The step of combining the target knowledge graph vector with the preset LTM network model to semantically encode the message to be reviewed, generating a semantic representation vector, including: Obtain the message text of the message to be reviewed, and load the target knowledge graph vector and the message text into the long short-term memory network model; The message text is encoded through the encoding layer to obtain a message text vector; The long short-term memory unit is used to process the input message text vector to obtain the hidden state vector; The knowledge fusion unit is used to fuse the target knowledge graph vector and the hidden state vector to obtain the semantic representation vector.
2. The message content extraction method as described in claim 1, characterized in that, The domain classification model is configured with several classification labels for different domains. Based on the keyword vector and the pre-trained domain classification model, the message to be reviewed is classified by domain to obtain the domain classification result, including: Calculate the similarity between the keyword vector and the classification label in the domain classification model to obtain a similarity value, and use the similarity value as the domain classification confidence of the message to be reviewed; The domain classification confidence scores of the messages to be reviewed are sorted in descending order to obtain a classification confidence score sequence; The business domain to which the message to be reviewed belongs is determined based on the classification confidence sequence, and the domain classification result is obtained.
3. The message content extraction method as described in claim 2, characterized in that, The step of determining the business domain to which the message to be reviewed belongs based on the classification confidence sequence, and obtaining the domain classification result, includes: Obtain the maximum classification confidence from the classification confidence sequence, wherein the maximum classification confidence is the maximum value in the classification confidence sequence; Compare the maximum classification confidence level with a preset confidence threshold; When the maximum classification confidence score is greater than or equal to the confidence score threshold, the classification label corresponding to the maximum classification confidence score is obtained, and the business domain represented by the classification label is determined as the business domain to which the message to be reviewed belongs, thus obtaining the domain classification result.
4. The message content extraction method as described in claim 3, characterized in that, The classification labels configured in the domain classification model include parent domain labels and child domain labels. The calculation of the similarity between the keyword vector and the classification labels in the domain classification model, obtaining a similarity value, and using this similarity value as the domain classification confidence score of the message to be reviewed, includes: Determine the target parent domain label that matches the keyword vector; Obtain all subdomain tags under the target parent domain tag to obtain the target subdomain tag; Calculate the similarity between the keyword vector and the target subdomain label to obtain the similarity value; The similarity value is used as the domain classification confidence score for the message to be reviewed.
5. The message content extraction method as described in claim 1, characterized in that, The step of identifying key entities, entity attributes, and entity relationships in the message to be reviewed using a conditional random field model based on the semantic representation vector includes: The message to be reviewed is segmented and tagged with parts of speech to obtain a lexical tagging sequence; The word labeling sequence is subjected to feature extraction using the conditional random field model to obtain several word feature vectors; Based on the semantic representation vector, a semantic analysis algorithm is used to perform semantic analysis on each of the word feature vectors to obtain the semantic features corresponding to each of the word feature vectors. The key entities in the message to be reviewed are identified by the semantic features, and a list of key entities is obtained. Based on the list of key entities, the entity attributes and entity relationships contained in each key entity are identified according to the semantic representation vector.
6. A message content extraction device, characterized in that, The message content extraction device implements the steps of the message content extraction method as described in any one of claims 1 to 5, and the message content extraction device includes: The keyword processing module is used to extract keywords from messages to be reviewed and to perform vector transformation on the extracted keywords to obtain keyword vectors. The domain classification module is used to classify the message to be reviewed based on the keyword vector and the pre-trained domain classification model, and obtain the domain classification result. The graph vectorization module is used to determine the target business domain knowledge graph that matches the message to be reviewed based on the domain classification result, and generate a vector representation of the target business domain knowledge graph to obtain the target knowledge graph vector; The semantic encoding module is used to combine the target knowledge graph vector and use a preset long short-term memory network model to perform semantic encoding on the message to be reviewed, generating a semantic representation vector. The content extraction module is used to identify key entities, entity attributes, and entity relationships in the message to be reviewed based on the semantic representation vector and using a conditional random field model.
7. A computer device, characterized in that, The method includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the message content extraction method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the message content extraction method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Non-structured data-oriented domain knowledge extraction method
CN115510245A
Entity relationship extraction method and system for knowledge graph construction in helicopter assembly field
CN117520561A