Knowledge graph fused semantic feature expression method and device

Through the method of fusion of knowledge graphs and combined with deep learning technology to express semantic features, the problem of low correlation and accuracy of semantic feature expression in the prior art is solved, and more efficient understanding and utilization of complex data is achieved.

CN119514551APending Publication Date: 2025-02-25BEIJING RES CENT FOR INFORMATION TECH & AGRI
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411358464.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

In the prior art, semantic feature expression methods have problems with low correlation and accuracy, and it is difficult to effectively integrate and utilize various forms of complex data.

Method used

Through the method of fusion knowledge graph, a two-way long and short-term memory network and conditional random field are used for naming entity recognition, a pre-trained language representation model is used for relationship extraction, and a deep feature representation is extracted through the RoBERTa model. Finally, a fusion semantic feature vector is generated based on entity linkage and feature fusion.

Benefits of technology

It improves the accuracy and relevance of semantic feature expression, can understand and utilize complex data more effectively, and enhances the accuracy and robustness of text processing tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119514551A_ABST
    Figure CN119514551A_ABST
Patent Text Reader

Abstract

The invention provides a semantic feature expression method and device for fusing a knowledge graph, and the method comprises the steps: carrying out the preprocessing of multi-source heterogeneous data, and obtaining a text sequence; performing named entity recognition on the text sequence through a bidirectional long-short-term memory network and a conditional random field to obtain an entity of the text sequence; performing relation extraction on the text sequence through a pre-trained language representation model to obtain an entity relation of the text sequence; mapping knowledge domain embedding generation is carried out based on the entity and entity relation, and mapping knowledge domain entity vectors are obtained; performing feature extraction on the text sequence through a RoBERTa model to obtain deep feature representation of the text sequence; performing entity recognition on the deep feature representation to obtain a text feature entity vector of the deep feature representation; performing entity linking and feature fusion based on the text feature entity vector and the knowledge graph entity vector to obtain a fused semantic feature vector; according to the invention, the accuracy and relevance of feature representation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of natural language processing technology, and in particular to a semantic feature expression method and device integrating a knowledge graph. Background Art

[0002] Rural characteristic industries and social service resources involve various forms of data, including text, pictures, videos, etc. The data volume is large, the types are diverse, and the complexity is high, which requires effective feature extraction and representation.

[0003] In related technologies, since semantic networks currently lack standard terminology and conventions, semantic interpretation relies heavily on the programs that operate the network, which results in a complex network structure and makes it difficult to establish and maintain a knowledge base. This makes the results of semantic analysis likely to have greater uncertainty, reducing the relevance and accuracy of semantic expression.

[0004] It can be seen from this that the semantic feature expression method in the related art has technical problems of low relevance and accuracy of semantic feature expression. Summary of the invention

[0005] The present invention provides a semantic feature expression method and device integrated with a knowledge graph, so as to solve the defects of the semantic feature expression method in the prior art, that is, the relevance and accuracy of the semantic feature expression are low, and realizes the integration of the relationship in the knowledge graph into the feature extraction process, thereby improving the accuracy and relevance of the feature representation.

[0006] The present invention provides a semantic feature expression method integrating knowledge graph, comprising the following steps.

[0007] Preprocess multi-source heterogeneous data to obtain a text sequence; perform named entity recognition on the text sequence through a bidirectional long short-term memory network and a conditional random field to obtain entities of the text sequence; perform relationship extraction on the text sequence through a pre-trained language representation model to obtain entity relationships of the text sequence; perform knowledge graph embedding generation based on the entities and the entity relationships to obtain knowledge graph entity vectors; perform feature extraction on the text sequence through a RoBERTa model to obtain a deep feature representation of the text sequence; perform entity recognition on the deep feature representation to obtain a text feature entity vector of the deep feature representation; perform entity linking and feature fusion based on the text feature entity vector and the knowledge graph entity vector to obtain a fused semantic feature vector.

[0008] According to a semantic feature expression method integrating knowledge graph provided by the present invention, the text sequence is subjected to named entity recognition through a bidirectional long short-term memory network and a conditional random field to obtain entities of the text sequence, including: inputting the text sequence into the bidirectional long short-term memory network to obtain a hidden state sequence output by the bidirectional long short-term memory network; inputting a score matrix corresponding to the hidden state sequence into the conditional random field to obtain an optimal label sequence output by the conditional random field, wherein the optimal label sequence is used to represent a predicted entity label corresponding to each word in the text sequence; and determining the entities of the text sequence based on the predicted entity labels.

[0009] According to a semantic feature expression method for integrating knowledge graphs provided by the present invention, after entity linking and feature fusion are performed based on the text feature entity vector and the knowledge graph entity vector to obtain a fused semantic feature vector, the method further includes: preprocessing the type attributes, location attributes and time attributes in the multi-source heterogeneous data to obtain other attribute features; performing feature dimensionality reduction and discretization on the fused semantic feature vector, and discretizing the other attribute features to obtain a resource item set; and determining the association rules of the resource item set through the FP-Growth algorithm.

[0010] According to a semantic feature expression method for integrating knowledge graphs provided by the present invention, after entity linking and feature fusion are performed based on the text feature entity vector and the knowledge graph entity vector to obtain a fused semantic feature vector, the method further includes: extracting spatiotemporal features from the multi-source heterogeneous data, using the longitude and latitude information of the multi-source heterogeneous data as spatial features, and using the timestamp information of the multi-source heterogeneous data as temporal features; and constructing a feature data set based on the spatial features, the temporal features, and the fused semantic feature vector.

[0011] According to a semantic feature expression method for integrating knowledge graphs provided by the present invention, after constructing a feature data set based on the spatial feature, the temporal feature and the integrated semantic feature vector, the method further includes: traversing each feature data point in the feature data set, measuring based on the temporal distance and spatial distance of each feature data point, to obtain the spatiotemporal distance of each feature data point; determining the number of neighbor points of each feature data point, wherein the number of neighbor points is the number of feature data points within the spatiotemporal distance of each feature data point; and taking the feature data points whose number of neighbor points is greater than a preset minimum point count threshold as core points.

[0012] According to a semantic feature expression method for integrating knowledge graphs provided by the present invention, after taking the feature data point whose neighbor point number is greater than a preset minimum point number threshold as a core point, the method further includes: determining the clustering result of the core point based on the spatiotemporal distance between the core point and the core point; taking the feature data point whose appearance number in the clustering result is greater than a preset number threshold as the target spatiotemporal pattern data point; performing semantic similarity analysis on the target spatiotemporal pattern data point to obtain the semantic pattern of the clustering result.

[0013] The present invention also provides a semantic feature expression device integrated with a knowledge graph, comprising the following modules: a preprocessing module, used to preprocess multi-source heterogeneous data to obtain a text sequence; a first recognition module, used to perform named entity recognition on the text sequence through a bidirectional long short-term memory network and a conditional random field to obtain entities of the text sequence; an extraction module, used to perform relationship extraction on the text sequence through a pre-trained language representation model to obtain entity relationships of the text sequence; a generation module, used to perform knowledge graph embedding generation based on the entities and the entity relationships to obtain knowledge graph entity vectors; an extraction module, used to perform feature extraction on the text sequence through a RoBERTa model to obtain a deep feature representation of the text sequence; a second recognition module, used to perform entity recognition on the deep feature representation to obtain a text feature entity vector of the deep feature representation; a fusion module, used to perform entity linking and feature fusion based on the text feature entity vector and the knowledge graph entity vector to obtain a fused semantic feature vector.

[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for expressing semantic features of the fused knowledge graph as described in any one of the above is implemented.

[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the semantic feature expression method of integrating knowledge graphs as described in any one of the above.

[0016] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the semantic feature expression methods for integrating knowledge graphs as described above.

[0017] The semantic feature expression method and device of the integrated knowledge graph provided by the present invention can convert data from different sources and in different formats into text sequences through preprocessing; utilize the combination of bidirectional long short-term memory network and conditional random field, combine the advantages of bidirectional long short-term memory network in sequence modeling and the ability of conditional random field in label sequence prediction, and improve the accuracy and efficiency of named entity recognition; extract relations from text sequences through pre-trained language representation model, and deeply understand the semantic information in the text, so as to more accurately identify the relations between entities; embed knowledge graph based on entities and entity relations, so that the semantic relations between entities and relations are The system is retained, which can improve the accuracy and relevance of feature representation; the text sequence is feature extracted through the RoBERTa model to obtain a deep feature representation; entity recognition is performed on the deep feature representation to obtain a text feature entity vector of the deep feature representation; and the text feature entity vector is entity linked and feature fused with the knowledge graph entity vector to achieve the combination of text information and knowledge graph information. This not only enriches the semantic information of the text representation, but also improves the accuracy and robustness of the text processing task; and thus solves the technical problem of the semantic feature expression method in the related technology, that is, the relevance and accuracy of the semantic feature expression are not high. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced one by one below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 It is a flow chart of the semantic feature expression method of the integrated knowledge graph provided by the present invention.

[0020] Figure 2 It is a schematic diagram of the rural socialized resource knowledge graph framework provided by the present invention.

[0021] Figure 3 It is a framework diagram for extracting and representing semantic features of rural social service resources provided by the present invention.

[0022] Figure 4 This is the association rule mining flow chart provided by the present invention.

[0023] Figure 5 This is a spatiotemporal analysis framework diagram provided by the present invention.

[0024] Figure 6 It is an overall flow chart of the semantic feature expression method of integrating knowledge graph provided by the present invention.

[0025] Figure 7 It is a structural schematic diagram of the semantic feature expression device integrated with the knowledge graph provided by the present invention.

[0026] Figure 8 It is a schematic diagram of the physical structure of the electronic device provided by the present invention. DETAILED DESCRIPTION

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

[0028] Rural characteristic industries and social service resources involve various forms of data, including text, pictures, videos, etc. The data volume is large, the types are diverse, and the complexity is high, which requires effective feature extraction and representation. There is an urgent need to understand and analyze the inherent laws and correlations of rural characteristic industries and social service resources, realize precise management of resources and intelligent decision-making, improve decision-making efficiency and accuracy, and provide on-demand data resource support for agricultural characteristic industry social services.

[0029] Therefore, in view of the problems of information fragmentation and difficulty in effective integration and utilization in the traditional management of rural industries and social service resources, the present invention proposes a semantic feature expression method that integrates knowledge graphs, and extracts and represents features at the semantic level to better understand and utilize these resources. Natural language processing and machine learning techniques are used to semantically understand rural characteristic industries and social service resources, identify and understand key information, concepts, relationships and contexts, and establish more accurate semantic representations. Feature extraction is performed based on deep learning, and a semantic level representation model suitable for rural characteristic industries and social service resources is established, and the extracted features are mapped to the semantic space.

[0030] In the related technology, an information management system and method based on big data feature mining are proposed. A one-dimensional user behavior information input vector, a one-dimensional social media information input vector and a one-dimensional position input vector are obtained by performing a one-dimensional arrangement preprocessing operation on user behavior data, social media data and location data at multiple predetermined time points. Then, feature extraction and analysis are performed on them respectively through a convolutional neural network model in deep learning to obtain a user information semantic understanding feature matrix. Finally, feature analysis is performed on the user information semantic understanding feature matrix to obtain a classification result indicating whether the product is pushed to the user to be pushed.

[0031] However, the one-dimensional user behavior information input vector, social media information input vector, and location input vector mentioned in the above technology may not be able to fully capture the complex relationship between the data, especially when it comes to spatiotemporal correlation, the one-dimensional feature vector may not be able to express the complexity of time and space.

[0032] In the related art, a search engine ranking method and system based on data mining and deep learning is proposed, which relates to the field of search engine technology. The invention includes a web crawler module, an index building module, a quality ranking module, a feature extraction module, a feature optimization module, a semantic understanding module, a semantic matching module and a return module. The present invention can effectively improve the efficiency, accuracy, intelligence and user experience of the search engine.

[0033] However, the above-mentioned technology only involves the field of search engine technology, and does not take into account the analysis of the spatiotemporal correlation relationship of the social service resources of rural characteristic industries. Therefore, it cannot meet the needs of comprehensive management and optimization of social service resources of characteristic industries.

[0034] In the related art, a method and system for integrating agricultural resources based on big data are proposed. Feature extraction and feature fusion are performed based on the acquired soil data and weather data to obtain the soil-weather interaction feature vector, and then the soil-weather interaction feature vector is used to recommend the type of fruit trees to be planted. In this way, the synergistic relationship between the data contained in the multi-dimensional agricultural resource data is captured, so as to intelligently recommend the appropriate type of fruit trees to achieve effective integration of agricultural resources.

[0035] However, the above technology only involves the feature extraction and fusion of soil data and weather data, which is used to recommend the types of fruit trees to be planted, but does not take into account other factors of socialized service resources of rural characteristic industries, such as service links, varieties, etc. Therefore, the scope of application of this method is limited, and it is impossible to comprehensively consider the diversity and complexity of rural characteristic industry services.

[0036] In the related technology, a method for analyzing user evaluation data of agricultural social service quality is proposed. This method processes user evaluation data with unified labels, sets a sentiment analysis layer-strong learner, and determines the user's evaluation characteristics of agricultural product service quality in each sentiment object dimension. The invention combines coarse-grained and fine-grained sentiment analysis through ensemble learning, accurately predicts and evaluates sentiment tendencies from the perspective of multiple fine-grained sentiment objects, and improves the generalization ability of sentiment analysis.

[0037] However, the above technologies only focus on analyzing the characteristics of users' service quality evaluation of agricultural products, but do not take into account the multi-source heterogeneity of service resources, as well as the impact of factors such as spatiotemporal characteristics, varieties, and service links on service quality evaluation. At the same time, there is also a lack of spatiotemporal correlation analysis, which makes it impossible to fully understand the relationship and characteristics between service resources.

[0038] In the related technology, a global spatiotemporal meteorological agricultural disaster prediction method based on key influencing factors is proposed. This method fuses heterogeneous data according to time and space to form a spatiotemporal data cube, and constructs a second neural network for agricultural disaster prediction with global spatiotemporal characteristics based on a two-dimensional feature plane set to calculate the probability of agricultural disasters. This method can globally analyze meteorological and agricultural observations in specific regions and time periods from both time and space, and more accurately predict agricultural disasters that may occur in the future.

[0039] However, the above technology is limited to the prediction of agricultural disasters, and does not take into account the diversity and complexity of the socialized service resources of rural characteristic industries, and cannot solve problems in other service areas. Although the patent integrates spatiotemporal data cubes, it lacks in-depth analysis of the spatiotemporal correlation of service resources.

[0040] In summary, the above-mentioned related technologies often only focus on specific aspects, such as user evaluation, credit rating generation, etc., but fail to fully consider the complexity and diversity of the social service resources of rural characteristic industries, and lack a comprehensive analysis method. Most patents do not involve the analysis of the spatiotemporal correlation of service resources, while in the social service of rural characteristic industries, spatiotemporal correlation is crucial for the management and optimization of service resources.

[0041] The present invention proposes a semantic feature expression method integrating knowledge graph, which expresses the features of rural socialized service resources more deeply and accurately, and improves the efficiency and accuracy of data analysis. Through natural language processing and deep learning technology, the semantic information of multi-source heterogeneous service resources is converted into high-quality feature representation, and a knowledge graph is constructed to improve accuracy. The FP-Growth algorithm is used to discover frequent item sets and potential associations between service resources, providing guidance for service optimization and decision-making. The ST-DBSCAN algorithm is used to model spatiotemporal associations, optimize resource allocation and layout, and improve resource utilization efficiency, so as to fully understand and optimize the diversity, complexity and personalized needs of socialized services for rural characteristic industries.

[0042] Optionally, the semantic feature expression method of the fused knowledge graph of the embodiment of the present application can be executed by a server, or by a terminal device, or jointly by a server and a terminal device, taking the execution of the semantic feature expression method of the fused knowledge graph in this embodiment by a server as an example.

[0043] Figure 1 It is a flow chart of the semantic feature expression method of the fusion knowledge graph provided by the present invention, such as Figure 1 As shown, the method includes the following steps.

[0044] Step 101, preprocessing multi-source heterogeneous data to obtain a text sequence.

[0045] Here, multi-source heterogeneous data is preprocessed. Web crawlers and API interfaces can be used to automatically collect multi-source data, including text data, geographic data, and image data. Data cleaning preprocessing operations include data cleaning (processing missing values ​​and duplicate values), format conversion (unified time format, text normalization), data normalization (standardized numerical data), and heterogeneous data integration (word segmentation, part-of-speech tagging, coordinate system conversion, image processing). Finally, the relational database MySQL, the NoSQL database MongoDB, and the spatiotemporal database PostGIS are used for data storage and management to ensure data consistency and high quality.

[0046] Step 102, performing named entity recognition on the text sequence through a bidirectional long short-term memory network and a conditional random field to obtain entities in the text sequence.

[0047] In an embodiment of the present invention, a bidirectional long short-term memory network and conditional random field (BiLSTM-CRF) are used for named entity recognition. This model combines the advantages of a bidirectional long short-term memory network (BiLSTM) and a conditional random field (CRF) to capture contextual information in an input sequence and predict the label of each word.

[0048] The text sequence (usually a series of words or characters) is converted into a dense vector representation through the embedding layer. Then, the vector is sent to the bidirectional LSTM layer. The bidirectional LSTM layer can capture the forward and backward information of the sequence at the same time, generate a hidden state for each time step (i.e., each word), and then map each hidden state to a score vector through a linear layer (also called a fully connected layer or projection layer), and use the combination of all score vectors as a score matrix.

[0049] The CRF layer receives the output of the BiLSTM layer, that is, the score matrix corresponding to the hidden state of each time step; based on the score matrix and the transfer matrix, the CRF layer determines the matching degree or confidence of the given input sequence (text sequence) and the annotation sequence, calculates the scores of all possible annotation sequences, and uses dynamic programming to determine the annotation sequence with the highest score as the prediction result, that is, the entity label of each word in the text sequence.

[0050] Step 103: extract relations from the text sequence using a pre-trained language representation model to obtain entity relations of the text sequence.

[0051] In the embodiment of the present invention, a pre-trained language representation model (BERT (Bidirectional Encoder Representations from Transformers) is used for relation extraction, and the vector representation h of the sentence is obtained by the BERT model for the input sequence X (text sequence). cls (Use BERT's [CLS] token to represent the entire sentence) and perform relationship classification through the linear layer. For details, please refer to the following formula (1):

[0052] y=softmax(Wh cls +b) (1)

[0053] Among them, y represents the linear relationship, softmax represents the normalized exponential function, W represents the weight of the linear layer, b represents the bias of the linear layer, and h cls A vector representation of a text sequence.

[0054] Step 104, generate knowledge graph embedding based on entities and entity relationships to obtain knowledge graph entity vectors.

[0055] In an embodiment of the present invention, the TransE (Translating Embeddings for Modeling Multi-relational Data) algorithm is used to embed entities and relationships in the knowledge graph. TransE maps entities and relationships in the knowledge graph to a low-dimensional vector space and learns the embedding representation by minimizing the loss function. For details, please refer to the following formula (2):

[0056]

[0057] Where (h, r, t) represents a triple in the knowledge graph, S represents the set of all positive triples, d represents the distance metric function (such as Euclidean distance), γ represents a hyperparameter, [] + Indicates a positive value operation, h is the head entity, r is the relationship, and t is the tail entity; h ′ and t′ represent entities other than those already existing in S, which are used to generate negative samples.

[0058] The TransE algorithm can learn a low-dimensional vector representation of each entity and relationship.

[0059] Step 105, extracting features from the text sequence using the RoBERTa model to obtain a deep feature representation of the text sequence.

[0060] In the embodiment of the present invention, the RoBERTa (A Robustly Optimized BERT Pretraining Approach) model is used to extract text features. RoBERTa is a deep learning model based on the Transformer architecture, which can capture long-distance dependencies and contextual information in text. Its specific steps include:

[0061] Perform word segmentation and encoding on the input text sequence (text) to convert the text into a word vector sequence.

[0062] The word vector sequence is input into the RoBERTa model, and feature extraction is performed through a multi-layer Transformer encoder to obtain a deep feature representation of the text sequence.

[0063] Step 106, performing entity recognition on the deep feature representation to obtain a text feature entity vector of the deep feature representation.

[0064] In an embodiment of the present invention, entity recognition is performed on the deep feature representation (text features) of the text sequence extracted by the RoBERTa model, and the entities in the text are identified using the Name Entity Recognition (NER) technology.

[0065] Step 107, perform entity linking and feature fusion based on the text feature entity vector and the knowledge graph entity vector to obtain a fused semantic feature vector.

[0066] In an embodiment of the present invention, the identified entities are matched and linked with entities in the knowledge graph to obtain corresponding knowledge graph feature vectors. The entity linking process includes entity disambiguation and mapping to ensure that text entities can accurately correspond to entities in the knowledge graph.

[0067] The entity vector obtained from the knowledge graph (i.e., the knowledge graph entity vector) is fused with the text feature vector extracted by RoBERTa (i.e., the text feature entity vector) to generate the final semantic feature vector (i.e., the fused semantic feature vector). The fusion method adopts a weighted fusion strategy. For details, please refer to the following formula (3):

[0068] f=αt text +(1-α)t kg (3)

[0069] Among them, f represents the final semantic feature vector (fused semantic feature vector), t text represents the text feature vector (text feature entity vector) extracted by RoBERTa, t kg Represents the entity vector obtained from the knowledge graph (knowledge graph entity vector), and α represents the fusion weight coefficient.

[0070] In some embodiments, after entity linking and feature fusion are performed based on the text feature entity vector and the knowledge graph entity vector to obtain a fused semantic feature vector, the generated semantic feature vector (fused semantic feature vector) is stored in the FAISS (Facebook AI Similarity Search) vector library. FAISS is an efficient similarity search library that supports fast retrieval and clustering operations of large-scale vectors. By storing semantic feature vectors in FAISS, fast similarity searches and correlation calculations can be performed, thereby improving the query efficiency and response speed of the system.

[0071] refer to Figure 2 , Figure 2 It is a schematic diagram of the framework of the rural socialized resource knowledge graph provided by the present invention, which includes production entities (collective economic organizations) and socialized service organizations. The production entities and socialized service organizations together include agricultural information services, agricultural machinery leasing, financial services, production operation services, agricultural supplies procurement and distribution, and consulting and training.

[0072] Production entities include products (including meteorological ecology, soil environment, and industrial varieties), directory information (including industrial varieties), credit data (including overall credit and credit records), and market data (including sales data and market analysis).

[0073] Socialized service organizations include agricultural machinery data (agricultural machinery operators), agricultural inputs data (seeds, fertilizers, pesticides, agricultural tools), agricultural technology data, directory information (including industry varieties), credit data (including overall credit, credit records) and market data (including sales data, market analysis).

[0074] In an embodiment of the present invention, the process of semantic feature extraction and representation modeling of rural social service resources includes the following main processes: First, data collection and preprocessing are performed to ensure the quality of multi-source heterogeneous data. Next, feature extraction is performed using the deep learning-based model RoBERTa to convert the semantic information of service resources into high-quality feature vectors. At the same time, a knowledge graph of rural social service resources is constructed, and the relationships in the knowledge graph are integrated into the feature extraction process through the TransE algorithm, thereby improving the accuracy and relevance of feature representation.

[0075] refer to Figure 3 , Figure 3 It is a framework diagram for extracting and representing semantic features of rural social service resources provided by the present invention.

[0076] like Figure 3As described, the rural social service resources are represented by RoBERTa features to obtain a text feature vector, entity recognition is performed on the text feature vector, and entity linking is performed with the knowledge graph, and the knowledge graph vector is obtained through TransE knowledge graph embedding and knowledge graph vector space, and the knowledge graph vector is fused with the text feature vector to obtain a semantic feature vector, which is stored in the vector database Faiss.

[0077] Through the above steps of the embodiment of the present invention, multi-source heterogeneous data is preprocessed to obtain a text sequence; through a bidirectional long short-term memory network and a conditional random field, named entity recognition is performed on the text sequence to obtain entities of the text sequence; through a pre-trained language representation model, relationship extraction is performed on the text sequence to obtain entity relationships of the text sequence; knowledge graph embedding generation is performed based on entities and entity relationships to obtain knowledge graph entity vectors; through the RoBERTa model, feature extraction is performed on the text sequence to obtain a deep feature representation of the text sequence; entity recognition is performed on the deep feature representation to obtain a text feature entity vector of the deep feature representation; entity linking and feature fusion are performed based on the text feature entity vector and the knowledge graph entity vector to obtain a fused semantic feature vector. The combination of text information and knowledge graph information is realized, thereby not only enriching the semantic information of the text representation, but also improving the accuracy and robustness of the text processing task; thereby solving the technical problem that the semantic feature expression method in the related technology has low relevance and accuracy of the semantic feature expression.

[0078] According to a semantic feature expression method integrated with a knowledge graph provided by the present invention, named entity recognition is performed on a text sequence through a bidirectional long short-term memory network and a conditional random field to obtain entities of the text sequence, including:

[0079] Input the text sequence into the bidirectional long short-term memory network to obtain the hidden state sequence output by the bidirectional long short-term memory network;

[0080] The score matrix corresponding to the hidden state sequence is input into the conditional random field to obtain the optimal label sequence output by the conditional random field, where the optimal label sequence is used to represent the predicted entity label corresponding to each word in the text sequence;

[0081] Determine entities in a text sequence based on predicted entity labels.

[0082] In an embodiment of the present invention, named entity recognition is performed through BiLSTM-CRF (Bidirectional Long Short-Term Memory Network-Conditional Random Field).

[0083] For an input text sequence, a hidden state h is generated by a bidirectional LSTM i , which can be specifically expressed by the following formula (4):

[0084] h i =BiLSTM(x i ) (4)

[0085] Among them, h i represents the hidden state corresponding to the i-th word (phrase) in the text sequence, x i represents the i-th word in the text sequence, and BiLSTM represents a bidirectional long short-term memory network.

[0086] Subsequently, there is often a linear layer (also called a fully connected layer or projection layer) that transforms each hidden state h i Mapped to a score vector p i , where p i The dimension is equal to the size of the label set. This score vector p i Each element p in i,j It represents the score of labeling the i-th word as the j-th label. The score vectors of all words are combined to form the score matrix P.

[0087] The score S(Y|X) of the labeled sequence is calculated at the CRF layer. For details, please refer to the following formula (5):

[0088]

[0089] Among them, Y is a possible label sequence, X is an input sequence (text sequence), represents the score of transferring from the start tag to the first word tag, Represents the score matrix obtained from BiLSTM.

[0090] The CRF layer receives the output of the BiLSTM layer, that is, the score matrix corresponding to the hidden state of each time step; based on the score matrix and the transfer matrix, the CRF layer determines the matching degree or confidence of the given input sequence (text sequence) and the annotation sequence, calculates the scores of all possible annotation sequences, and uses dynamic programming to determine the annotation sequence with the highest score as the prediction result, that is, the entity label of each word in the text sequence.

[0091] According to a semantic feature expression method for integrating knowledge graph provided by the present invention, after entity linking and feature fusion are performed based on text feature entity vectors and knowledge graph entity vectors to obtain a fused semantic feature vector, the method further includes:

[0092] Preprocess the type attributes, location attributes, and time attributes in multi-source heterogeneous data to obtain other attribute features;

[0093] Perform feature dimension reduction and discretization processing on the fused semantic feature vector, and discretize other attribute features to obtain a resource item set;

[0094] The association rules of resource item sets are determined by FP-Growth algorithm.

[0095] refer to Figure 4 , Figure 4 It is an association rule mining flow chart provided by the present invention, which includes a semantic feature extraction representation model, feature engineering processing, combining semantic feature vectors and discretized features into a transaction item set, and an association relationship mining FP-Growth algorithm.

[0096] The semantic feature extraction representation model is used to determine the semantic feature vector based on the introduction of service items and service subjects, and perform feature dimension reduction and discretization processing on the semantic feature vector.

[0097] Feature engineering processing is used to normalize numerical features, annual turnover, and establishment time; to classify categorical features, service crop types, and service locations; to extract time features for time features, service time, and release time, and then to discretize the data.

[0098] The semantic feature vector obtained is combined with the discretized features into a transaction item set through the FP-Growth algorithm for association mining. The data set is scanned to generate an FP tree, and frequent item sets and association rules are discovered.

[0099] Social service resource information includes long text information such as service crops, service items, and service subject introductions. Through the above semantic feature extraction representation model, each item will be converted into a semantic-level feature vector. Feature engineering is performed for attribute information such as service crop type, location, and time. This includes appropriate processing of different types of attributes such as numerical, categorical, and time types, numerical normalization, category coding, and time series processing to ensure that all attributes can be analyzed in a unified feature space. Feature dimensionality reduction and discretization are performed on semantic feature vectors, and other attribute features are discretized. The two are combined to form a service subject resource item set. After completing feature engineering, the FP-Growth algorithm is used to mine association rules on the processed data. The FP-growth algorithm is an extension of the Apriori algorithm. Since the algorithm only scans the data set twice, it is very efficient in the discovery of frequent item sets.

[0100] In the application, select "Service Organization Name", "Service Item", "Service Location", "Service Time", "Service Crop Type", "Service Subject Type", "Service Subject Introduction", "Annual Turnover", "Establishment Time (Year)" and other attributes to form an attribute set. Among them, annual turnover and establishment time (year) are in numerical form. According to the probability distribution, the values ​​are discretized according to the interval. Categorical attributes form item sets according to each value of each attribute, and are represented by category coding. For example, production service types include pruning, fertilizing, spraying, weeding, harvesting, full trusteeship, and others. The form of a single service resource item set after feature engineering is:

[0101] {

[0102] "Service item semantic vector": [0.1, 0.3, 0.5, ..., 0.2],

[0103] "Service subject introduction semantic vector": [0.2, 0.4, 0.1, ..., 0.3],

[0104] "Service Crop Type":1,

[0105] "Service Location":2,

[0106] "Service Time_Year":2023,

[0107] "Service Time_Month":5,

[0108] "Service Time_Day":1,

[0109] "Annual turnover":"500,000-1.5 million",

[0110] "Establishment time": "1-10 years"

[0111] }

[0112] All user data sets are I, association rules The support of is the probability of A and B appearing at the same time, that is, the ratio of the number of data where A and B appear at the same time to the total number of records. For details, please refer to the following formula (6):

[0113] Support(A→B)=count(A∪B) / count(I) (6)

[0114] Among them, Support(A→B) means that the support of association rule A→B is the probability of A and B appearing at the same time, count(A∪B) means the number of data where A and B appear at the same time, and count(I) means the ratio of the total number of records.

[0115] The confidence level is the probability of B appearing when A appears, that is, the ratio of the number of data where A and B appear at the same time to the number of records where A appears. For details, please refer to the following formula (7):

[0116] Confidence(A→B)=count(A∪B) / count(I) (7)

[0117] Among them, Confidence(A→B) represents the probability of B appearing when the confidence is A, count(A∪B) represents the number of data where A and B appear at the same time, and count(I) represents the ratio of the total number of records.

[0118] The lift indicates whether the appearance of A has a positive or negative effect on the appearance of B, that is, the ratio of the confidence of A→B to the support of B. For details, please refer to the following formula (8). In the application, a strong association rule with a lift greater than 3 is a valid association rule.

[0119] Lift(A→B)=Confidence(A→B) / Support(B) (8)

[0120] Among them, Lift(A→B) indicates whether the appearance of A has a positive or negative effect on the appearance of B, Confidence(A→B) indicates the probability of B appearing when the confidence level is A, and Support(B) indicates the support level of B.

[0121] The FP-Growth algorithm executes the following steps:

[0122] Step 1: traverse the data set and calculate the frequency based on each possible value of each attribute.

[0123] Step 2: Calculate the minimum data item threshold according to the support, delete the data items that are less than the threshold, put them into the item header table, and sort them in descending order.

[0124] Step 3, traverse the data set and delete the itemsets deleted in step 2. Insert data into the FP tree in order of support.

[0125] Step 4: Traverse the item header table in reverse order to find the corresponding conditional pattern base to obtain frequent item sets.

[0126] Step 5: For each non-empty subset of the frequent itemsets, calculate the confidence and obtain the strong association rules according to the confidence threshold.

[0127] Step 6: For each strong association rule, calculate the lift and output the association rule if the threshold is met.

[0128] Through the embodiments of the present invention, the potential associations between different service resources on the rural social service platform can be revealed. For example, it is possible to find patterns in which certain service items are more likely to be used together in specific locations and time periods. These findings can provide important guidance for the optimization and decision-making of service resources, such as adjusting the configuration of service resources, optimizing the combination of service items, improving the timing of service provision, etc., thereby improving the overall effectiveness of the rural social service platform.

[0129] According to a semantic feature expression method for integrating knowledge graph provided by the present invention, after entity linking and feature fusion are performed based on text feature entity vectors and knowledge graph entity vectors to obtain a fused semantic feature vector, the method further includes:

[0130] Extract spatiotemporal features from multi-source heterogeneous data, using the longitude and latitude information of the multi-source heterogeneous data as spatial features and the timestamp information of the multi-source heterogeneous data as temporal features;

[0131] A feature dataset is constructed based on spatial features, temporal features and fused semantic feature vectors.

[0132] refer to Figure 5 , Figure 5 It is a spatiotemporal analysis framework diagram provided by the present invention, which includes: feature extraction representation, spatiotemporal correlation analysis and pattern analysis decision support.

[0133] Here, feature extraction means including extracting semantic features to obtain semantic feature vectors, and extracting spatiotemporal features to obtain latitude, longitude and timestamps.

[0134] The spatiotemporal association analysis included forming clusters using the ST-DBSCAN algorithm.

[0135] Pattern analysis decision support includes extracting spatiotemporal patterns, intra-cluster similarity analysis, and optimizing service resource configuration rules and recommendations.

[0136] In an embodiment of the present invention, the rural social service resource semantic feature extraction representation model is first used to process the text information of the social service resource, extract the semantic features, and convert the text into a semantic vector representation. Then, the spatiotemporal features of the service resources are extracted. The longitude and latitude information of the service location is used as the spatial feature, and the timestamp of the service time is used as the temporal feature. These spatiotemporal features are combined with the text semantic vector to form a complete feature data set. For the processing of spatiotemporal data, the longitude and latitude information of the service resources is converted into standard two-dimensional geographic coordinates, and the timestamp format is ensured to be unified to facilitate subsequent spatiotemporal analysis.

[0137] For example, there are three service information, including service content, service location and service time, which can be specifically referred to in Table 1 below:

[0138] Table 1

[0139] Service Content Service Location(Lat,Lon) Service Hours "Garden Pruning and Fertilizing" (39.13,115.30) 2024 / 4 / 1 10:00 "Flying spray preventer" (39.12,115.18) 2024 / 4 / 2 11:00 "Fertilization and irrigation" (39.15,115.22) 2024 / 5 / 2 9:00

[0140] The feature data sets formed are as follows:

[0141] T1=(Vtext1,(39.13,115.30),2024 / 4 / 1 10:00)

[0142] T2=(Vtext2,(39.12,115.18),2024 / 4 / 2 11:00)

[0143] T3=(Vtext3,(39.15,115.22),2024 / 5 / 2 9:00)

[0144] According to a semantic feature expression method for integrating knowledge graph provided by the present invention, after constructing a feature data set based on spatial features, temporal features and integrated semantic feature vectors, the method further includes:

[0145] Traverse each feature data point in the feature data set, measure the time distance and space distance of each feature data point, and obtain the time and space distance of each feature data point;

[0146] Determine the number of neighbor points of each feature data point, wherein the number of neighbor points is the number of feature data points within the spatiotemporal distance of each feature data point;

[0147] The feature data points whose neighbor points are greater than the preset minimum point count threshold are regarded as core points.

[0148] In the embodiment of the present invention, the ST-DBSCAN (Spatio-Temporal Density-Based Spatial Clustering of Applications with Noise) algorithm is used to mine spatiotemporal association relationships.

[0149] First, by traversing each service resource data point, the number of neighbor points within its spatial radius and time radius is calculated. If the number of neighbor points is greater than or equal to MinPts (i.e., the preset minimum point threshold), the point is marked as a core point.

[0150] Then, starting from each core point, its neighboring points are gradually expanded to form clusters. In this process, points that cannot be classified into any cluster are marked as noise points. Through the clustering results of the ST-DBSCAN algorithm, the association between different service resources in the time and space dimensions is identified.

[0151] Specifically, these clustering results can reveal which service items have a significant concentration trend in a specific geographical location and time period, and which service item combinations are highly correlated in time and space. By analyzing these spatiotemporal clustering patterns, the spatiotemporal distribution characteristics of frequently occurring service resources are discovered, providing a scientific basis for optimizing service resource allocation.

[0152] Among them, ST-DBSCAN (Spatial-Temporal DBSCAN) is a clustering algorithm for processing spatiotemporal data. It is an extension of the DBSCAN (Density-Based Spatial Clustering of Applications with Noise) algorithm on spatiotemporal data. In ST-DBSCAN, in addition to considering spatial distance (controlled by ∈), temporal distance is also considered (usually defined by ∈′).

[0153] In some embodiments, the parameters of the ST-DBSCAN algorithm can be set to ∈=0.02, ∈′=3600 seconds, MinPts=2, where ∈=0.02 defines the spatial distance threshold. In ST-DBSCAN, if the spatial distance between two data points is less than or equal to ∈, they are considered to be spatially adjacent; ∈′=3600 defines the temporal distance threshold, indicating that two data points are considered to be adjacent in time if the time difference between them is less than or equal to 3600 seconds (i.e., 1 hour). This setting allows the algorithm to identify clusters that are close in time but may be dispersed in space; MinPts=2 means that the preset minimum point count threshold (the minimum number of points required to form a dense area) is 2.

[0154] The specific space-time distance measurement formula can refer to the following formula (9):

[0155]

[0156] Among them, d s represents the spatial distance (using Euclidean distance), d t Indicates the time distance (using the absolute value of the timestamp difference), (p 1 ,t 1 ) represent the spatial distance and time distance of the first data point, respectively, (p 2 ,t 2 ) represent the spatial distance and temporal distance of the second data point respectively.

[0157] According to a semantic feature expression method for integrating knowledge graph provided by the present invention, after taking a feature data point whose number of neighbor points is greater than a preset minimum point threshold as a core point, the method further includes:

[0158] Determine the clustering results of the core points based on the spatiotemporal distance between the core points;

[0159] The feature data points whose occurrence times in the clustering results are greater than a preset number threshold are used as target spatiotemporal pattern data points;

[0160] Perform semantic similarity analysis on the target spatiotemporal pattern data points to obtain the semantic pattern of the clustering results.

[0161] In the embodiment of the present invention, pattern analysis and decision support are performed based on the mining results of spatiotemporal association relationships.

[0162] First, frequently occurring spatiotemporal patterns are extracted from the clustering results, and semantic feature vectors are used to perform semantic similarity analysis within the clusters to further interpret and identify semantic patterns in the clusters. For details, please refer to the following formula (10):

[0163]

[0164] Among them, cosine similarity (V text1 ,V text2 ) represents the semantic similarity between the semantic feature vector of the first target spatiotemporal pattern data point and the semantic feature vector of the second target spatiotemporal pattern data point, V text1 Represents the semantic feature vector of the first target spatiotemporal pattern data point, V text2 The semantic feature vector representing the second target spatiotemporal pattern data point.

[0165] Then, based on these patterns, rules and suggestions are generated to optimize the allocation of service resources, such as increasing resource input in high-demand areas or optimizing service arrangements during specific peak hours. Through these optimization measures, the overall effectiveness of the rural social service platform is improved, service coverage and response efficiency are improved, and the service needs of rural residents are better met.

[0166] In summary, through semantic feature extraction, spatiotemporal feature processing, and spatiotemporal correlation mining of the ST-DBSCAN algorithm, we can comprehensively analyze the correlation between rural social service resources in the spatiotemporal dimensions and provide strong support for service optimization and decision making.

[0167] refer to Figure 6 , Figure 6 It is an overall flow chart of the semantic feature expression method of the integrated knowledge graph provided by the present invention, which includes: rural social service resource data collection and preprocessing, semantic feature extraction and representation, association relationship mining and spatiotemporal relationship modeling.

[0168] Among them, the data collection and preprocessing of rural social service resources includes: data cleaning, normalization and preprocessing of multi-source heterogeneous data.

[0169] Semantic feature extraction and representation include: generating feature vectors through machine learning or deep learning, embedding them into knowledge graphs through TransE, obtaining semantic features after fusion, and storing them in a vector database.

[0170] Association relationship mining includes: feature engineering processing and association rule mining through FP-Growth algorithm.

[0171] Spatiotemporal relationship modeling includes: spatiotemporal feature extraction and spatiotemporal correlation mining through the ST-DBSCAN algorithm.

[0172] The present invention uses innovative semantic-level feature space expression technology to express the characteristics of service resources more deeply and accurately, and improve the efficiency and accuracy of data analysis. The main scheme includes three parts: semantic feature extraction and representation, association mining, and spatiotemporal association modeling.

[0173] Step 1: Extraction and representation of semantic features: Implement an algorithmic model for extracting semantic features from multi-source heterogeneous service resource data. Through natural language processing, machine learning, and deep learning, the semantic information of service resources is converted into computable feature representations. Use a vector database to store feature representations. Build a knowledge graph of rural social service resources to improve the accuracy of semantic feature extraction. Provide high-quality semantic feature vectors, laying a data foundation for subsequent association mining and spatiotemporal association modeling.

[0174] Step 2: Association mining: Based on the semantic feature representation vector of rural social service resources, the attribute information of service items, locations, time, etc. is integrated to perform feature engineering on the attribute information of service resources. The association rule mining algorithm FP-Growth algorithm is used to discover frequent item sets and association rules. The rural social service platform discovers the potential relationship between service resources and provides guidance for service optimization and decision making.

[0175] Step 3: Modeling the spatiotemporal relationship: Design a method to capture the spatiotemporal relationship of socialized service resources of rural characteristic industries. By collecting spatiotemporal data and performing feature engineering, the spatiotemporal characteristics of socialized service resources are extracted. Through the spatiotemporal data mining algorithm ST-DBSCAN, the spatiotemporal relationship is mined to describe the relationship between different service resources in the spatiotemporal dimension. This will optimize the allocation and layout of resources and improve resource utilization efficiency.

[0176] This paper proposes an innovative semantic-level feature space expression technology. Through semantic feature extraction and representation, association mining, and spatiotemporal association modeling, it conducts in-depth analysis of rural social service resources and improves the efficiency and accuracy of data analysis. High-quality semantic feature vectors are extracted through natural language processing and deep learning technologies, and knowledge graphs are constructed to improve accuracy. The FP-Growth algorithm is used to mine associations and discover potential relationships, providing guidance for service optimization and decision-making. The ST-DBSCAN algorithm is used to model spatiotemporal associations, optimize resource allocation and layout, and improve resource utilization efficiency.

[0177] The method proposed by the present invention has the following characteristics:

[0178] Feature extraction based on comprehensive semantics and knowledge graph: The RoBERTa model and knowledge graph are combined to extract semantic features, which improves the accuracy and relevance of feature representation and is suitable for complex rural social service resource data.

[0179] Association rule mining based on feature vectors: Use the FP-Growth algorithm to mine association rules on feature vectors, quickly identify frequent item sets and potential association rules, and ensure that different types of attributes (numerical, categorical, and temporal) are analyzed in a unified feature space by processing feature vectors.

[0180] Combining spatiotemporal clustering analysis with semantic features: Use the ST-DBSCAN algorithm to perform spatiotemporal clustering analysis, and combine semantic features to conduct in-depth analysis of clustering results to provide more comprehensive insights into spatiotemporal correlation relationships.

[0181] Clustering result analysis combined with semantic features: After clustering is completed, the semantic feature vector is used to perform semantic similarity analysis within the cluster to identify the semantic patterns in the cluster. The content similarity and theme of the service items within the cluster are analyzed by calculating the cosine similarity.

[0182] The present invention uses innovative semantic-level feature space expression technology to conduct in-depth analysis of rural social service resources, significantly improving the efficiency and accuracy of data analysis. First, through advanced technologies such as natural language processing, machine learning, and deep learning, high-quality semantic features are extracted from multi-source heterogeneous service resource data, and converted into computable feature representations and stored in a vector database. This process not only improves the accuracy of semantic feature extraction, but also enhances the relevance and comprehensiveness of feature representation with the help of knowledge graph construction. These high-quality semantic feature vectors lay a solid data foundation for subsequent association mining and spatiotemporal association modeling.

[0183] In the association mining stage, based on the semantic feature representation vector of rural social service resources, combined with attribute information such as service items, locations, and time, the FP-Growth algorithm is used to discover frequent item sets and association rules. The work in this stage reveals the potential relationship between service resources and provides important guidance for service optimization and decision-making. Through feature engineering processing, different types of attributes (numerical, categorical, and temporal) are analyzed in a unified feature space, making the data association mining more comprehensive and accurate.

[0184] In the spatiotemporal correlation modeling stage, the present invention designs a method for capturing the spatiotemporal correlation of socialized service resources of rural characteristic industries. By collecting spatiotemporal data and performing feature engineering processing, the spatiotemporal features of service resources are extracted, and the ST-DBSCAN algorithm is used to mine spatiotemporal data. This process can identify and describe the correlation between different service resources in the spatiotemporal dimension, thereby optimizing resource allocation and layout and improving resource utilization efficiency. Based on the mining results of the spatiotemporal correlation, the present invention further performs pattern analysis and decision support. Frequently occurring spatiotemporal patterns are extracted from the clustering results, and semantic feature vectors are used to perform semantic similarity analysis within the clusters, and further interpret and identify semantic patterns in the clusters. Through this in-depth analysis, common patterns and abnormal phenomena of service resources in specific time and space can be identified, revealing hidden spatiotemporal laws and service demand characteristics. Then, based on these spatiotemporal and semantic patterns, rules and suggestions for optimizing service resource configuration are generated, providing a solid basis for efficient resource utilization and scientific planning.

[0185] In general, the present invention effectively solves the challenges brought by the diversity, complexity and personalized needs of rural social service resources, and provides a systematic and intelligent solution. Through the comprehensive analysis of semantic features, association relationships and spatiotemporal relationships, it not only optimizes resource allocation and improves resource utilization efficiency, but also provides strong technical support and decision-making basis for the development of rural characteristic industries. Ultimately, the present invention will significantly improve the quality and level of rural social services and promote the sustainable development of the rural economy.

[0186] The semantic feature expression device of the fused knowledge graph provided by the present invention is described below. The semantic feature expression device of the fused knowledge graph described below and the semantic feature expression method of the fused knowledge graph described above can be referenced to each other.

[0187] refer to Figure 7 , Figure 7It is a structural schematic diagram of the semantic feature expression device for integrating knowledge graph provided by the present invention, which includes: a preprocessing module 701, a first recognition module 702, an extraction module 703, a generation module 704, an extraction module 705, a second recognition module 706 and a fusion module 707.

[0188] A preprocessing module 701 is used to preprocess multi-source heterogeneous data to obtain a text sequence;

[0189] A first recognition module 702 is used to perform named entity recognition on the text sequence through a bidirectional long short-term memory network and a conditional random field to obtain entities in the text sequence;

[0190] An extraction module 703 is used to extract relations from the text sequence using a pre-trained language representation model to obtain entity relations of the text sequence;

[0191] A generation module 704 is used to generate a knowledge graph embedding based on the entity and the entity relationship to obtain a knowledge graph entity vector;

[0192] An extraction module 705 is used to extract features from the text sequence using a RoBERTa model to obtain a deep feature representation of the text sequence;

[0193] A second recognition module 706 is used to perform entity recognition on the deep feature representation to obtain a text feature entity vector of the deep feature representation;

[0194] The fusion module 707 is used to perform entity linking and feature fusion based on the text feature entity vector and the knowledge graph entity vector to obtain a fused semantic feature vector.

[0195] Specifically, the semantic feature expression device for integrating knowledge graphs provided by the present invention can implement all the method steps implemented in the semantic feature expression method embodiment for integrating knowledge graphs, and can achieve the same technical effects. The parts and beneficial effects that are the same as those in the method embodiment will not be described in detail herein.

[0196] Figure 8 is a schematic diagram of the physical structure of the electronic device provided by the present invention, such as Figure 8As shown, the electronic device may include: a processor (processor) 810, a communication interface (Communications Interface) 820, a memory (memory) 830 and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 can call the logic instructions in the memory 830 to execute the semantic feature expression method of the fused knowledge graph, which includes: preprocessing multi-source heterogeneous data to obtain a text sequence; performing named entity recognition on the text sequence through a bidirectional long short-term memory network and a conditional random field to obtain entities of the text sequence; performing relationship extraction on the text sequence through a pre-trained language representation model to obtain entity relationships of the text sequence; performing knowledge graph embedding generation based on entities and entity relationships to obtain knowledge graph entity vectors; performing feature extraction on the text sequence through a RoBERTa model to obtain a deep feature representation of the text sequence; performing entity recognition on the deep feature representation to obtain a text feature entity vector of the deep feature representation; performing entity linking and feature fusion based on the text feature entity vector and the knowledge graph entity vector to obtain a fused semantic feature vector.

[0197] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0198] On the other hand, the present invention also provides a computer program product, which includes a computer program, and the computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the semantic feature expression method of the fused knowledge graph provided by the above methods, and the method includes: preprocessing multi-source heterogeneous data to obtain a text sequence; performing named entity recognition on the text sequence through a bidirectional long short-term memory network and a conditional random field to obtain entities of the text sequence; performing relationship extraction on the text sequence through a pre-trained language representation model to obtain entity relationships of the text sequence; performing knowledge graph embedding generation based on entities and entity relationships to obtain knowledge graph entity vectors; performing feature extraction on the text sequence through a RoBERTa model to obtain a deep feature representation of the text sequence; performing entity recognition on the deep feature representation to obtain a text feature entity vector of the deep feature representation; performing entity linking and feature fusion based on the text feature entity vector and the knowledge graph entity vector to obtain a fused semantic feature vector.

[0199] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the semantic feature expression method of the fused knowledge graph provided by the above-mentioned methods, the method comprising: preprocessing multi-source heterogeneous data to obtain a text sequence; performing named entity recognition on the text sequence through a bidirectional long short-term memory network and a conditional random field to obtain entities of the text sequence; performing relationship extraction on the text sequence through a pre-trained language representation model to obtain entity relationships of the text sequence; performing knowledge graph embedding generation based on entities and entity relationships to obtain knowledge graph entity vectors; performing feature extraction on the text sequence through a RoBERTa model to obtain a deep feature representation of the text sequence; performing entity recognition on the deep feature representation to obtain a text feature entity vector of the deep feature representation; performing entity linking and feature fusion based on the text feature entity vector and the knowledge graph entity vector to obtain a fused semantic feature vector.

[0200] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0201] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0202] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A semantic feature expression method integrating knowledge graph, characterized in that: include: Preprocess multi-source heterogeneous data to obtain text sequences; Performing named entity recognition on the text sequence through a bidirectional long short-term memory network and a conditional random field to obtain entities of the text sequence; Extracting relations from the text sequence using a pre-trained language representation model to obtain entity relations of the text sequence; Based on the entity and the entity relationship, a knowledge graph embedding is generated to obtain a knowledge graph entity vector; By using the RoBERTa model, feature extraction is performed on the text sequence to obtain a deep feature representation of the text sequence; Performing entity recognition on the deep feature representation to obtain a text feature entity vector of the deep feature representation; Entity linking and feature fusion are performed based on the text feature entity vector and the knowledge graph entity vector to obtain a fused semantic feature vector.

2. The semantic feature expression method of fusion knowledge graph according to claim 1 is characterized in that: The method of performing named entity recognition on the text sequence by using a bidirectional long short-term memory network and a conditional random field to obtain entities of the text sequence includes: Inputting the text sequence into the bidirectional long short-term memory network to obtain a hidden state sequence output by the bidirectional long short-term memory network; Inputting the score matrix corresponding to the hidden state sequence into the conditional random field to obtain an optimal label sequence output by the conditional random field, wherein the optimal label sequence is used to represent the predicted entity label corresponding to each word in the text sequence; Based on the predicted entity label, an entity of the text sequence is determined.

3. The semantic feature expression method of fusion knowledge graph according to claim 1 is characterized in that: After performing entity linking and feature fusion based on the text feature entity vector and the knowledge graph entity vector to obtain a fused semantic feature vector, the method further includes: Preprocessing the type attributes, location attributes, and time attributes in the multi-source heterogeneous data to obtain other attribute features; Performing feature dimension reduction and discretization processing on the fused semantic feature vector, and performing discretization processing on the other attribute features, to obtain a resource item set; The association rule of the resource item set is determined by the FP-Growth algorithm.

4. The semantic feature expression method of fusion knowledge graph according to claim 1 is characterized in that: After performing entity linking and feature fusion based on the text feature entity vector and the knowledge graph entity vector to obtain a fused semantic feature vector, the method further includes: Extracting spatiotemporal features from the multi-source heterogeneous data, using the longitude and latitude information of the multi-source heterogeneous data as spatial features, and using the timestamp information of the multi-source heterogeneous data as temporal features; A feature data set is constructed based on the spatial feature, the temporal feature and the fused semantic feature vector.

5. The semantic feature expression method of fusion knowledge graph according to claim 4 is characterized in that: After constructing the feature data set based on the spatial feature, the temporal feature and the fused semantic feature vector, the method further includes: Traversing each feature data point in the feature data set, measuring the time distance and space distance of each feature data point, and obtaining the time and space distance of each feature data point; Determine the number of neighbor points of each feature data point, wherein the number of neighbor points is the number of feature data points within the spatiotemporal distance of each feature data point; The feature data point whose number of neighbor points is greater than a preset minimum point number threshold is taken as a core point.

6. The semantic feature expression method of fusion knowledge graph according to claim 5 is characterized in that: After taking the feature data point whose number of neighbor points is greater than a preset minimum point number threshold as a core point, the method further includes: Determine the clustering result of the core points based on the spatiotemporal distance between the core points; Taking the feature data points in the clustering results whose occurrence times are greater than a preset number threshold as target spatiotemporal pattern data points; A semantic similarity analysis is performed on the target spatiotemporal pattern data points to obtain a semantic pattern of the clustering result.

7. A semantic feature expression device integrating knowledge graph, characterized in that: include: The preprocessing module is used to preprocess multi-source heterogeneous data to obtain text sequences; A first recognition module is used to perform named entity recognition on the text sequence through a bidirectional long short-term memory network and a conditional random field to obtain entities in the text sequence; An extraction module, used to extract relations from the text sequence using a pre-trained language representation model to obtain entity relations of the text sequence; A generation module, used to generate knowledge graph embedding based on the entity and the entity relationship to obtain a knowledge graph entity vector; An extraction module, used for performing feature extraction on the text sequence through a RoBERTa model to obtain a deep feature representation of the text sequence; A second recognition module is used to perform entity recognition on the deep feature representation to obtain a text feature entity vector of the deep feature representation; A fusion module is used to perform entity linking and feature fusion based on the text feature entity vector and the knowledge graph entity vector to obtain a fused semantic feature vector.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for expressing semantic features by integrating the knowledge graph as described in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for expressing semantic features by integrating a knowledge graph as described in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for expressing semantic features by integrating a knowledge graph as described in any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Multi-source heterogeneous data semantic alignment method and device and computer equipment

    CN119719248A