Edge computing knowledge graph construction method based on representation learning
By applying representation learning-based methods in edge computing environments to build an efficient and high-quality knowledge graph, the problem that traditional methods are difficult to deal with a large amount of distributed data is solved, the effect of extracting valuable information from complex data is achieved, and the matching between tasks and resources is optimized.
Patent Information
- Application Number
- CN202411772791.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-04
AI Technical Summary
In an edge computing environment, traditional knowledge graph construction methods are difficult to effectively process large amounts of distributed data, resulting in inefficient construction and low quality, and the inability to extract valuable information from complex data.
Using a method based on representation learning, the entity, attribute and relational data in the edge computing system are abstractly extracted, preprocessed and data annotated, and feature representations are automatically extracted using representation learning technology, and the entities and relationships are mapped into low-dimensional vectors to build a structured knowledge graph, and the unknown or missing entity relationships are complemented through efficient link prediction technology.
It significantly improves the efficiency and quality of knowledge graph construction, can extract deep information from complex data, optimize the matching of tasks and resources, and improve the overall efficiency of the edge computing environment.
Smart Images

Figure CN119690669A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of knowledge graph technology, and in particular to a method for constructing an edge computing knowledge graph based on representation learning. Background Art
[0002] In edge computing scenarios, there are a large number of edge devices, which are usually distributed in various locations and have their own computing capabilities and storage resources. At the same time, edge devices need to handle various types of tasks, such as data collection, data processing, data analysis, etc. These tasks have their own requirements, such as computing requirements, storage requirements, network requirements, etc. One of the main challenges of edge computing is how to effectively match tasks and resources. Due to the large number of edge devices, the diverse types of tasks, and the dynamic and uncertain nature of the edge computing environment, the matching problem of tasks and resources is very complex. In order to solve this problem, many methods have been proposed, such as optimization-based methods, rule-based methods, and learning-based methods. Among them, learning-based methods have received increasing attention because they can utilize historical data and domain knowledge and handle complex and uncertain environments. In edge computing, nodes are interconnected and have complex relationships. Using a graph structure such as a knowledge graph can effectively model their semantic relationships and structural characteristics. However, due to the huge amount of data and obvious distributed characteristics, traditional knowledge graph construction methods are often difficult to process effectively, resulting in low efficiency and low quality in the construction of knowledge graphs. In addition, due to the complexity of edge computing data, traditional methods are often unable to extract valuable information from it, causing the constructed knowledge graph to lack depth and breadth.
[0003] Based on the above problems, a method for constructing edge computing knowledge graph based on representation learning is proposed. Summary of the invention
[0004] The purpose of the present invention is to provide a method for constructing an edge computing knowledge graph based on representation learning to solve the problems in the background technology.
[0005] To achieve the above object, the present invention provides a method for constructing an edge computing knowledge graph based on representation learning, comprising the following steps:
[0006] S1. Abstract and extract entities, entity attributes, and relationships between entities in the edge computing system, and collect data on key entities, entity attributes, and relationships between entities;
[0007] S2, preprocess and label the data collected by S1;
[0008] S3, automatically extract valuable feature representations from the data obtained by using representation learning technology S2, map entities and relationships into low-dimensional vectors, realize the numerical representation of entities and relationships in the knowledge graph, and construct a structured knowledge graph;
[0009] S4. Through efficient link prediction technology, it automatically infers and completes unknown or missing entity relationships in the edge computing environment, and quickly matches the optimal execution device when new tasks arise.
[0010] Preferably, in S2, the pretreatment process comprises the following steps:
[0011] 1) Determine the data source for the data collected in S1, which includes edge device logs, sensor data, and system monitoring data;
[0012] 2) Design different data collection methods for different data sources; specifically:
[0013] For edge device logs, a log data collection engine is used to efficiently collect data from multiple sources; the collected logs include the device's network traffic logs and task execution records;
[0014] For sensor data, use the sensor interface to collect data from each sensor;
[0015] For system monitoring data, use the System Monitoring and Data Collection Engine.
[0016] 3) Clean and format the raw data;
[0017] 4) Annotate the data processed in step 3).
[0018] Preferably, in S2, data cleaning includes removing noise data, removing duplicate data, and filling missing data, wherein removing noise data is to delete irrelevant or erroneous data, such as debugging information in logs, abnormal readings of sensors, etc.; removing duplicate data is to delete duplicate records to ensure the uniqueness of data; filling missing data is to use interpolation, mean filling and other methods to complete the missing data;
[0019] Formatting includes unified data format and unified time format. Unified data format is to convert data from different sources into a unified format, such as JSON format, and unified time format is to ensure that the timestamps of all data are consistent.
[0020] The specific process of data labeling is to mark the entities and relationships involved in the data based on the collected data content.
[0021] Preferably, S3 specifically includes the following contents:
[0022] S31. Automatically learn valuable feature representations from preprocessed data, map entities and relationships to low-dimensional vector space, realize numerical representation of entities and relationships in knowledge graphs, perform pre-training, and obtain embedded vector representations of basic nodes and relationships;
[0023] S32, using the graph attention mechanism, updates the semantic vector of the node based on the information aggregated by neighbor nodes and relationships;
[0024] S33, forming triples according to the aggregated semantic vectors, and predicting the rationality of the triples, wherein the triples are composed of entity-relationship-entity;
[0025] S34. Compare the predicted results with the actual results and use deep learning methods to update the network information.
[0026] Preferably, the S31 specifically includes the following steps:
[0027] 1) For each entity x e The randomly initialized embedding layer is used to calculate d e Dimensional vector e e , and for each relationship x r After randomly initialized embedding layer, d is calculated. r Dimensional vector e r , and assign each relation a corresponding size d r ×d e Random mapping matrix M r ; where d e and d r Can be unequal, allowing entities and relations to be embedded in spaces of different dimensions;
[0028] The embedding layer calculation process is as follows: define a randomly initialized embedding matrix M e , the size of the matrix is d e ×d x , where d x is the feature dimension size of the input data, which varies depending on whether the input is an entity vector or a relationship vector. e is the dimension size of the output embedding vector; for the data x to be embedded, the embedding process is expressed as:
[0029] e=M e x;
[0030] Where e is the embedding vector; the random initialization process of the embedding layer is to randomly initialize the embedding matrix M e ;
[0031] 2) Using the mapping matrix M rMap entities from the original space to the relation space. For a given relation r, the head entity h and the corresponding embedding vector e h , tail entity t and the corresponding embedding vector e t By mapping the matrix M r Converts to:
[0032] h r =M r e n ,t r =M r e t ;
[0033] 3) In order to evaluate the rationality of the positive sample triple (h, r, t), the score function is defined as f r (h, t), then the distance between the mapped entity vectors is expressed as:
[0034] f r (h,t)=||h r +e r -t r ||;
[0035] 4) In order to optimize the embedding representation of entities and relations, a margin-based ranking loss function is used. For each positive sample triple (h, r, t), a set of negative sample triplets (h′, r, t′) is generated. The negative samples are not real triplets but are randomly sampled. The loss function L is defined as kg for:
[0036] L kg =∑ (h,r,t)∈S ∑ (h′,r,t′)∈S′ [γ+f r (h,t)-f r (h′,t′)];
[0037] Among them, S represents the positive sample set, S′ represents the negative sample set, and γ is the margin parameter;
[0038] 5) Use the loss function L kg Use the Adam optimizer to complete the pre-training of the embedding layer;
[0039] By minimizing the above loss function, we learn the embedded representation of entities and relationships to prepare for the subsequent graph attention calculation, and use the Adam algorithm to complete this optimization process.
[0040] Preferably, the S32 specifically includes the following steps:
[0041] 1) The attention score between two adjacent nodes is calculated as follows:
[0042]
[0043] f n (x) = σ(W n x+b n );
[0044] in, is the attention score, a hrt is the normalized attention score, N h is the set of all neighbor nodes of the head node, f n is a single-layer perceptron that can be learned, n is 1, 2, 3…k;
[0045] In order to consider the relationship between entities when calculating the attention score, the embedding tail entity vector is subtracted from the relationship entity vector to keep the same data distribution as when the node is embedded; at the same time, because h is constrained when the node is embedded r +e r With t r Because of the similarity between them, a single-layer perceptron f(x) is used to further process the node information when calculating the attention score to model deeper semantic information.
[0046] 2) According to the obtained attention scores, the information of all current neighbor nodes is weighted and aggregated. The calculation process is expressed as:
[0047]
[0048] in, Aggregate vectors for neighbor nodes;
[0049] In order to consider the relationship between nodes during aggregation, the entities and relationships at the tail of the aggregation are considered at the same time. They are added together with the help of the semantics learned by the embedding layer, and the single-layer perceptron f(x) is used to deepen the semantics;
[0050] 3) Update the original node embedding vector according to the aggregated node vector. The update method is expressed as:
[0051]
[0052]
[0053] Among them, f update The node vector update function is used to update the node representation. is the node vector representation after one update;
[0054] 4) Repeat steps 1) to 3) for t times to obtain the node vector representation updated t times
[0055] Preferably, in S33, the formula for predicting the node relationship for a given sample triple (h, r, t) in the training set is:
[0056]
[0057] This calculation formula uses an attention-like mechanism to calculate the correlation between the tail node vector plus the relationship vector and the head node vector. Later, a learnable single-layer perceptron was described to finally output the node relationship prediction score. The node relationship prediction score of the triples in the sample should be as high as possible. The function represented by this prediction formula is used as the objective function and trained and optimized using the Adam optimizer to obtain the final model.
[0058] Preferably, the S4 specifically comprises the following steps:
[0059] 1) Use the entity embedding vectors and relationship mapping matrices obtained from S3 to build potential links between tasks and devices;
[0060] 2) Use the scoring function to evaluate the rationality of the triples, traverse all possible device matching schemes, and select the top three scoring devices as the optimal matching result candidate set;
[0061] 3) Select the task execution device from the best matching result candidate set as the final execution device.
[0062] Therefore, the edge computing knowledge graph construction method based on representation learning of the present invention has the following beneficial effects:
[0063] (1) On the one hand, the present invention proposes an edge computing knowledge graph construction method based on representation learning to solve the knowledge graph construction problem in edge computing, improve construction efficiency and quality, and extract valuable information from complex edge computing data, thereby optimizing the effective matching of tasks and resources in a large-scale, dynamic and uncertain edge computing environment; on the other hand, it also provides an edge computing knowledge graph relationship prediction and completion method, which automatically infers and completes unknown or missing entity relationships in the edge computing environment through efficient link prediction technology, and mainly focuses on automatically matching the optimal execution device of the task by giving the resources and data required for the task when a new task appears in the scene.
[0064] (2) The present invention significantly improves the efficiency of knowledge graph construction by automatically learning feature representation from a large amount of unlabeled data. At the same time, the introduction of representation learning technology makes it possible to extract deep information from complex data, thereby ensuring the high quality of the knowledge graph. In addition, the present invention can optimize the allocation of computing tasks and achieve efficient matching of tasks to be completed with system resources.
[0065] (3) The present invention applies the graph attention mechanism to the construction process of the edge computing knowledge graph. By calculating the attention weights of node neighbors and dynamically adjusting the node embedding representation, the complex relationships between nodes can be better captured. Compared with the traditional static embedding method, the graph attention mechanism not only improves the adaptability of the model to complex edge environments, but also significantly enhances the knowledge graph's ability to model dynamic relationships between edge devices.
[0066] (4) The present invention uses triple prediction and link prediction technology to complete the unknown or missing entity relationships in the edge computing environment, especially providing effective support for the automatic matching of new devices or new tasks. Compared with the existing simple relationship reasoning method, the link prediction technology of the present invention can efficiently infer missing relationships and improve the accuracy of task allocation and resource matching.
[0067] (5) The present invention constructs a more accurate task and resource matching model through a representation learning method based on knowledge graph. Compared with traditional methods based on rules or simple optimization, the present invention can combine historical data and domain knowledge to achieve efficient task allocation in a dynamic and uncertain edge computing environment, especially in the case of multi-device concurrency and dynamic changes in tasks, significantly improving the overall efficiency of the system.
[0068] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 A schematic diagram of entities, entity attributes, and relationships between entities according to an embodiment of the present invention;
[0070] Figure 2 A diagram of the knowledge graph construction process of an embodiment of the present invention;
[0071] Figure 3 A schematic diagram of data preprocessing according to an embodiment of the present invention;
[0072] Figure 4 Schematic diagram of a node embedding module according to an embodiment of the present invention. DETAILED DESCRIPTION
[0073] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.
[0074] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.
[0075] Example
[0076] The present invention provides a method for constructing an edge computing knowledge graph based on representation learning, comprising the following steps:
[0077] S1. Abstract and extract entities, entity attributes, and relationships between entities in the edge computing system, and collect data on key entities, entity attributes, and relationships between entities;
[0078] like Figure 1 As shown in the figure, examples are given of entities, entity attributes, and relationships between entities in the edge computing system:
[0079] (1) Entity:
[0080] a) Devices: including various edge devices such as sensors, drones, vehicle-mounted equipment, smartphones, etc.
[0081] i. Attribute: Device Type
[0082] b) Data: Data generated or processed on edge devices.
[0083] i. Attribute: data type
[0084] c) Resources: computing resources of edge devices, such as CPU, memory, storage, etc.
[0085] i. Attributes: resource type, resource quantity
[0086] d) Task: The task that needs to be performed on the edge device.
[0087] i. Attributes: None
[0088] (2) Relationship:
[0089] a) Equipment-Owned-Resources
[0090] b) Equipment-Output-Data
[0091] c) Task-Need-Resource
[0092] d) Equipment-Execution-Task
[0093] e) Task-Output-Data
[0094] f) Data-Input-Task
[0095] By abstracting the relationships between devices, tasks, resources, and data in edge computing, we can effectively capture complex node associations and use these relationships to build a knowledge graph with deeper semantics, helping to achieve key functions such as resource scheduling optimization, task allocation, and device management, and improving intelligent decision-making capabilities in edge computing scenarios. The construction process of the knowledge graph is as follows: Figure 2 shown.
[0096] S2, such as Figure 3 As shown, the data collected by S1 is preprocessed; specifically:
[0097] 1) Determine the data source. In order to fully cover all types of information in the edge computing system, it is necessary to determine multiple data sources:
[0098] Edge device logs:
[0099] Content: including device network traffic logs, task execution logs, etc.
[0100] Sensor data:
[0101] Content: Data from various sensors such as temperature, humidity, pressure, GPS, etc.
[0102] System monitoring data:
[0103] Content: including network traffic, CPU usage, memory usage and other system performance indicators.
[0104] 2) Data collection methods. Different data collection methods are designed for different data sources, as follows:
[0105] For edge device logs, use the log data collection engine to efficiently collect data from multiple sources, clean and preprocess the data, and send the processed data to the specified destination for subsequent analysis and knowledge graph construction. The collected logs include:
[0106] Device network traffic logs
[0107] The log fields include:
[0108] A. Timestamp: The time when the log entry is recorded.
[0109] B. Device ID: ID that uniquely identifies the device.
[0110] C. Network traffic protocol type: the network protocol used by the data packet.
[0111] D. Source IP address: the source IP address of the data packet.
[0112] E. Source port: the source port number of the data packet.
[0113] F. Destination IP: The destination IP address of the data packet.
[0114] G. Destination port: The destination port number of the data packet.
[0115] H. Packet size: The size of the packet (in bytes).
[0116] I. Total packets: The number of packets transmitted in a specific time period.
[0117] J. Total traffic: the total amount of data transmitted within a certain period of time (in bytes).
[0118] Task execution record
[0119] The log fields include:
[0120] A. Timestamp: The time when the log entry is recorded.
[0121] B. Task ID: The ID that uniquely identifies the task.
[0122] C. Task name: The name or description of the task.
[0123] D. Task status: the current status of the task.
[0124] E. Execution device ID: The unique identifier of the device that executes the task.
[0125] F. Resource usage: resource information used during task execution.
[0126] G. Input data: input data required for task execution.
[0127] H. Output data: output data generated by task execution.
[0128] I. Error information: Error or exception information that occurs during task execution.
[0129] J. Execution time: the execution time of a task from start to finish.
[0130] For sensor data, the sensor interface is used to collect data from each sensor, clean and preprocess the data, and send the processed data to the specified destination for subsequent analysis and knowledge graph construction.
[0131] The data fields collected include:
[0132] A. Timestamp: records the time of data collection.
[0133] B. Task ID: ID that uniquely identifies the sensor.
[0134] C. Sensor type: type or category of sensor.
[0135] D. Measurement value: The specific value measured by the sensor.
[0136] E. Unit: The unit of measurement value.
[0137] F. Location: The location where the sensor is located or the location where data is collected.
[0138] For system monitoring data, use the system monitoring and data collection engine to efficiently collect data from multiple sources, clean and preprocess the data, and send the processed data to the specified destination for subsequent analysis and knowledge graph construction.
[0139] The data fields collected include:
[0140] A. Timestamp: records the time of data collection.
[0141] B. Task ID: ID that uniquely identifies the sensor.
[0142] C. Data type: System monitoring data type.
[0143] D. Data measurement value: the specific value of the monitoring data.
[0144] Data preprocessing: Clean and format the raw data of edge computing to lay the foundation for representation learning and knowledge graph construction. It consists of the following steps:
[0145] Data cleaning:
[0146] Remove noisy data: Delete irrelevant or erroneous data, abnormal sensor readings, set thresholds based on sensor specifications and expected measurement range, and treat readings exceeding the threshold as abnormal and remove them accordingly. At the same time, use filtering algorithms to smooth the data and reduce the impact of random noise.
[0147] Remove duplicate data: Delete duplicate records and use the TF-IDF algorithm and Jaccard similarity calculation method to find duplicate entries in the text collection to ensure the uniqueness of the data.
[0148] Filling missing data: For missing data, use forward filling, that is, fill it with the previous observation value, to preserve the time series characteristics in the data.
[0149] Data formatting:
[0150] Unified data format: Convert data from different sources into a unified JSON format.
[0151] Timestamp processing: unify the time format to ensure that the timestamps of all data are consistent.
[0152] Data annotation:
[0153] Label related entities and relationships: According to the data content, mark the entities and relationships involved in the data. The relationships refer to the entities, attributes and relationships defined above.
[0154] The marking rules are as follows
[0155] A. De-duplicate device IDs for all data, find all devices in the edge computing system and mark them as device entities, and mark the device type attributes according to their data types (host logs or sensor data).
[0156] B. Mark the data entity according to the input data and output data fields in the task operation log, and assign it a unique ID and data type.
[0157] C. Mark the task entity and task attributes according to the task running log.
[0158] D. Mark resource entities and resource attributes based on system monitoring data.
[0159] E. Label the device output data relationship based on sensor data.
[0160] F. Mark the resource relationships owned by the system based on the system resource data.
[0161] G. Mark the connection relationship between device entities based on network traffic data.
[0162] H. Mark the tasks running on the device according to the task running log.
[0163] I. Mark the input and output relationship between tasks and data according to the task running log.
[0164] J. Mark the resource relationships required for the task according to the task running log.
[0165] S3, automatically extract valuable feature representations from the data obtained by using representation learning technology S2, map entities and relationships into low-dimensional vectors, realize the numerical representation of entities and relationships in the knowledge graph, and construct a structured knowledge graph; specifically:
[0166] S31, such as Figure 4 As shown in the figure, valuable feature representations are automatically learned from preprocessed data, entities and relationships are mapped to low-dimensional vector space, and the numerical representation of entities and relationships in the knowledge graph is realized; pre-training is performed before formal training to obtain basic vector embedding;
[0167] 1) For each entity x e The randomly initialized embedding layer is used to calculate d e Dimensional vector e e , and for each relationship x r After randomly initialized embedding layer, d is calculated. r Dimensional vector e r , and assign each relation a corresponding size d r ×d e Random mapping matrix M r ; where de and d r Can be unequal, allowing entities and relations to be embedded in spaces of different dimensions;
[0168] The embedding layer calculation process is as follows: define a randomly initialized embedding matrix M e , the size of the matrix is d e ×d x , where d x is the feature dimension size of the input data, which varies depending on whether the input is an entity vector or a relationship vector. e is the dimension size of the output embedding vector; for the data x to be embedded, the embedding process is expressed as:
[0169] e=M e x;
[0170] Where e is the embedding vector; the random initialization process of the embedding layer is to randomly initialize the embedding matrix M e .
[0171] 2) Using the mapping matrix M r Map entities from the original space to the relation space. For a given relation r, the head entity h and the corresponding embedding vector e h , tail entity t and the corresponding embedding vector e t By mapping the matrix M r Converts to:
[0172] h r =M r e h ,t r =M r e t ;
[0173] 3) In order to evaluate the rationality of the positive sample triple (h, r, t), the score function is defined as f r (h, t), then the distance between the mapped entity vectors is expressed as:
[0174] f r (h,t)=||h r +e r -t r ||;
[0175] 4) In order to optimize the embedding representation of entities and relations, a margin-based ranking loss function is used. For each positive sample triple (h, r, t), a set of negative sample triplets (h′, r, t′) is generated. The negative samples are not real triplets but are randomly sampled. The loss function L is defined as kg for:
[0176] L kg =∑(h,r,t)∈s ∑ (h′,r,t′)∈s′ [γ+f r (h,t)-f r (h′,t′)];
[0177] Among them, S represents the positive sample set, S′ represents the negative sample set, and γ is the margin parameter;
[0178] 5) Use the loss function L kg Cooperate with the Adam optimizer to complete the pre-training of the embedding layer, learn the embedding representation of entities and relationships by minimizing the above loss function, and prepare for the subsequent graph attention calculation. The Adam algorithm is used to complete this optimization process.
[0179] S32, using the graph attention mechanism, updates the semantic vector of the node based on the information aggregated by neighbor nodes and relationships;
[0180] 1) The attention score between two adjacent nodes is calculated as follows:
[0181]
[0182] in, is the attention score, a hrt is the normalized attention score, N h is the set of all neighbor nodes of the head node, f n is a learnable single-layer perceptron, n is 1, 2, 3…k; in order to consider the relationship between entities when calculating the attention score, the embedding tail entity vector is subtracted from the relationship entity vector to keep the same data distribution as when the node is embedded; at the same time, because h is already constrained when the node is embedded r +e r With t r Therefore, a single-layer perceptron f(x) is used to further process the node information when calculating the attention score to model deeper semantic information.
[0183] 2) According to the obtained attention scores, the information of all current neighbor nodes is weighted and aggregated. The calculation process is expressed as:
[0184]
[0185] in, Aggregate vectors for neighbor nodes;
[0186] In order to consider the relationship between nodes during aggregation, the entities and relationships at the end of the aggregation are considered at the same time. The semantics learned by the embedding layer are added together, and the single-layer perceptron f(x) is used to deepen the semantics. 3) The original node embedding vector is updated according to the aggregated node vector. The update method is expressed as:
[0187]
[0188] Among them, f update The node vector update function is used to update the node representation. is the node vector representation after one update;
[0189] 4) Repeat steps 1) to 3) for t times to obtain the node vector representation updated t times
[0190] S33, forming triples according to the aggregated semantic vectors, and predicting the rationality of the triples, wherein the triples are composed of entity-relationship-entity;
[0191] The formula for predicting node relationships for a given sample triple (h, r, t) in the training set is:
[0192]
[0193] This calculation formula uses an attention-like mechanism to calculate the correlation between the tail node vector plus the relationship vector and the head node vector. Later, a learnable single-layer perceptron was described to finally output the node relationship prediction score. The node relationship prediction score of the triples in the sample should be as high as possible. The function represented by this prediction formula is used as the objective function and trained and optimized using the Adam optimizer to obtain the final model.
[0194] S34. Compare the predicted results with the actual results and use deep learning methods to update the network information.
[0195] S4. Automatically infer and complete unknown or missing entity relationships in edge computing environments through efficient link prediction technology, and quickly match the optimal execution device when new tasks appear; specifically:
[0196] 1) Use the entity embedding vectors and relationship mapping matrices obtained from S3 to build potential links between tasks and devices;
[0197] 2) Use the scoring function to evaluate the rationality of the triples, traverse all possible device matching schemes, and select the top three scoring devices as the optimal matching result candidate set;
[0198] 3) Select the task execution device from the best matching result candidate set as the final execution device.
[0199] In the above method, the processing of noise and empty data in the data preprocessing part makes the system more robust and can cope with various extreme situations; the model training method of pre-training plus post-training allows the information of the embedding layer to obtain basic semantic information in advance in a simple training process, which can make the model converge faster in subsequent formal training and improve training efficiency; by calculating the attention weights of node neighbors and dynamically adjusting the node embedding representation, the complex relationship between nodes can be better captured. Compared with the traditional static embedding method, the graph attention mechanism not only improves the adaptability of the model to complex edge environments, but also significantly enhances the knowledge graph's ability to model dynamic relationships between edge devices.
[0200] Therefore, the present invention relates to a method for constructing an edge computing knowledge graph based on representation learning, which solves the problem of knowledge graph construction in edge computing and optimizes the effective matching of tasks and resources in a large-scale, dynamic and uncertain edge computing environment; and when faced with new devices and tasks, it can quickly complete the missing relationships in the knowledge graph and realize intelligent matching between devices and tasks.
[0201] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. A method for constructing an edge computing knowledge graph based on representation learning, characterized in that: The following steps are involved: S1. Abstract and extract entities, entity attributes, and relationships between entities in the edge computing system, and collect data on key entities, entity attributes, and relationships between entities; S2, preprocessing the data collected by S1; S3, using representation learning technology to automatically extract valuable feature representations from the data obtained in S2, mapping entities and relationships into low-dimensional vectors, realizing the numerical representation of entities and relationships in the knowledge graph, and constructing a structured knowledge graph; S4. Automatically infer and complete unknown or missing entity relationships in edge computing environments through efficient link prediction technology.
2. According to the method for constructing edge computing knowledge graph based on representation learning in claim 1, it is characterized in that: In S2, the pre-processing process includes the following steps: 1) Determine the data source for the data collected in S1, which includes edge device logs, sensor data, and system monitoring data; 2) Design different data collection methods for different data sources; 3) Clean and format the raw data; 4) Annotate the data processed in step 3).
3. According to the method for constructing edge computing knowledge graph based on representation learning in claim 2, it is characterized in that: In S2, data cleaning includes removing noise data, removing duplicate data, and filling missing data; formatting includes unifying data format and time format; The specific process of data labeling is to mark the entities and relationships involved in the data based on the collected data content.
4. According to a method for constructing an edge computing knowledge graph based on representation learning according to claim 1, it is characterized in that: The S3 specifically Includes the following: S31. Automatically learn valuable feature representations from preprocessed data, map entities and relationships to low-dimensional vector space, numerically represent entities and relationships in the knowledge graph, complete pre-training, and obtain embedded vector representations of basic nodes and relationships; S32, using the graph attention mechanism, updates the semantic vector of the node based on the information aggregated by neighbor nodes and relationships; S33, forming triples according to the aggregated semantic vectors, and predicting the rationality of the triples, wherein the triples are composed of entity-relationship-entity; S34. Compare the predicted results with the actual results and use deep learning methods to update the network information.
5. According to claim 4, a method for constructing an edge computing knowledge graph based on representation learning is characterized in that: The S31 specifically includes the following steps: 1) Define the randomly initialized embedding matrix as M e , size d e ×d x , where d x is the feature dimension size of the input data, d e is the dimension size of the output embedding vector; for the data x to be embedded, the embedding process is expressed as: e=M e x; Where, e is the embedding vector; 2) Using the mapping matrix M r Map entities from the original space to the relation space. For a given relation r, the head entity h and the corresponding embedding vector e h , tail entity t and the corresponding embedding vector e t By mapping the matrix M r Convert to: h r =M r e h 、t r =M r e t ; 3) In order to evaluate the rationality of the positive sample triple (h, r, t), the score function is defined as f r (h, t), then the distance between the mapped entity vectors is expressed as: f r (h,t)=||h r +e r -t r ||; 4) For each positive sample triple (h, r, t), generate a set of negative sample triplets (h′, r, t′) and define the loss function L kg for: L kg =∑ (h,r,t)∈s ∑ (h′,r,t′)∈s′ [γ+f r (h,t)-f r (h′,t′)]; Among them, S represents the positive sample set, S′ represents the negative sample set, and γ is the margin parameter; 5) Use the loss function L kg Cooperate with Adam optimizer to complete pre-training of embedding layer.
6. The method for constructing an edge computing knowledge graph based on representation learning according to claim 5 is characterized in that: The S32 specifically includes the following steps: 1) The attention score between two adjacent nodes is calculated as follows: f n (x)=σ(W n x+b n ); in, is the attention score, a hrt is the normalized attention score, N h is the set of all neighbor nodes of the head node, f n is a single-layer perceptron that can be learned, n is 1, 2, 3…k; 2) According to the obtained attention scores, the information of all current neighbor nodes is weighted and aggregated. The calculation process is expressed as: in, Aggregate vectors for neighbor nodes; 3) Update the original node embedding vector according to the aggregated node vector. The update method is expressed as: Among them, f update The node vector update function is used to update the node representation. is the node vector representation after one update; 4) Repeat steps 1) to 3) for t times to obtain the node vector representation updated t times 7. The method for constructing an edge computing knowledge graph based on representation learning according to claim 6 is characterized in that: In S33, the formula for predicting the node relationship for a given sample triple (h, r, t) in the training set is: This prediction formula is used as the objective function and the Adam optimizer is used for training and optimization to obtain the final model.
8. The method for constructing an edge computing knowledge graph based on representation learning according to claim 1, characterized in that: The S4 specifically comprises the following steps: 1) Use the entity embedding vectors and relationship mapping matrices obtained from S3 to build potential links between tasks and devices; 2) Use the scoring function to evaluate the rationality of the triples, traverse all possible device matching schemes, and select the top three scoring devices as the optimal matching result candidate set; 3) Select the task execution device from the best matching result candidate set as the final execution device.
Citation Information
Patent Citations
Metalearning-based medical common sense knowledge graph automatic construction method
CN116861001A
Multi-modal knowledge graph establishment method and application
CN117131933A
Knowledge graph representation learning method of fusion graph structure based on pre-training language model
CN118210927A
Federal learning method for multi-modal data
CN118261236A
Knowledge graph completion method based on heterogeneous relational graph attention
CN118861318A