A data storage method, device, apparatus and medium

CN120406833BActive Publication Date: 2026-10-09CHINA TELECOM NETWORK SECURITY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510413465.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2026-10-09
Estimated Expiration
2045-04-02

AI Technical Summary

Technical Problem

[0003]随着网络攻击威胁的增加,传统的边缘节点自计算方式已无法满足当前的高安全性要求

Benefits of technology

[0059] Fifthly, this application provides a computer program product comprising: computer program code, which, when run on a computer, causes the computer to perform the method described in any one of the first aspects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120406833B_ABST
    Figure CN120406833B_ABST
Patent Text Reader

Abstract

The application discloses a data storage method, device, equipment and medium. The method comprises the following steps: obtaining to-be-stored data; performing fragmentation on the to-be-stored data based on the number of edge nodes in a target node group in which the edge nodes are located, to obtain a plurality of fragmented data; for any one piece of fragmented data, determining target node information based on the any one piece of fragmented data, and matching the target node information with node information of each edge node in the target node group, and determining a target edge node according to a matching result; and if the determined target edge node is another edge node, sending the any one piece of fragmented data to the target edge node, so that the target edge node stores the any one piece of fragmented data. The method can improve the efficiency of data storage, reduce the occurrence of security problems such as data leakage, and ensure the safety of data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of edge computing, and more particularly to a data storage method, apparatus, device, and medium. Background Technology

[0002] With the rapid proliferation of Internet of Things (IoT) devices and the application of 5G (5th Generation Mobile Communication Technology), the amount of data at the network edge is experiencing explosive growth. Traditional cloud computing models, relying on centralized data processing and storage, suffer from problems such as transmission latency, network bandwidth consumption, and privacy and security concerns. To address these issues, edge computing technology has emerged, distributing data processing tasks to edge nodes closer to the data source, thereby reducing network latency, optimizing bandwidth utilization, and distributing processing load.

[0003] With the increasing threat of cyberattacks, traditional edge node self-computing methods can no longer meet current high security requirements. Since each edge node stores and processes complete data, a breach could lead to data leaks and other security issues. Therefore, ensuring data security in a local area network (LAN) environment is a pressing technical problem that needs to be solved. Summary of the Invention

[0004] This application provides a data storage method, apparatus, device, and medium to improve data storage efficiency, reduce data leakage and other security issues, and ensure data security.

[0005] In a first aspect, embodiments of this application provide a data storage method applied to an edge node in a local area network, comprising:

[0006] Retrieve the data to be stored;

[0007] Based on the number of edge nodes in the target node group where the edge node is located, the data to be stored is fragmented to obtain multiple fragmented data;

[0008] For any data shard, based on the data shard, determine the target node information, and match the target node information with the node information of each edge node in the target node group. Based on the matching result, determine the target edge node.

[0009] If the target edge node is determined to be another edge node, then any one of the fragment data is sent to the target edge node so that the target edge node stores the any one of the fragment data.

[0010] In this embodiment, the edge nodes in the local area network (LAN) fragment the acquired data to be stored based on the number of edge nodes in the target node group to which the edge node belongs, resulting in multiple fragmented data. For any fragmented data, target node information is determined based on the fragmented data, and the target node information is matched with the node information of each edge node in the target node group. Based on the matching result, the target edge node is determined, which is the edge node to store the fragmented data. If the target edge node is another edge node, the fragmented data is sent to the target edge node so that the target edge node stores the fragmented data, thereby improving the efficiency of data storage. Furthermore, by storing each fragmented data of the data to be stored on a different edge node in the target node group, even if an attacker compromises a certain edge node in the target node group, they cannot obtain complete data based on the fragmented data stored by that edge node, and the attacker cannot determine the other edge nodes in the target node group. Therefore, data security is improved, and the occurrence of security problems such as data leakage is reduced.

[0011] In one possible design, after acquiring the data to be stored, the process further includes:

[0012] Obtain the performance data of each edge node in the target node group;

[0013] Based on the performance data of each edge node and the sum of the performance data of each edge node, the performance ratio of each edge node is determined.

[0014] The amount of data in each shard is determined based on the performance ratio of each edge node and the amount of data to be stored.

[0015] Based on the amount of data in each shard, the data to be stored is sharded to obtain multiple shard data.

[0016] In this embodiment, the performance ratio of each edge node is determined based on the performance data of each edge node and the sum of the performance data of each edge node. Based on the performance ratio of each edge node and the amount of data to be stored, the amount of data in each shard is determined. Based on the amount of data in each shard, the data to be stored is sharded to obtain multiple shards, so that the shards of edge nodes with better performance data have larger amounts of data, and the shards of edge nodes with worse performance data have smaller amounts of data.

[0017] In one possible design, after obtaining multiple data fragments, the process further includes:

[0018] Based on the node information of the edge nodes, a first source label is determined, and the first source label is added to each data shard.

[0019] The method further includes:

[0020] In response to a first processing request triggered by a user, the fragmented data with the first source tag in the first processing request is processed based on the first processing request to obtain the first fragmented data of the edge node;

[0021] The first processing request is signed to obtain a second processing request, and the second processing request is sent to each of the other edge nodes respectively;

[0022] The system receives the first fragment data of each other edge node sent by each other edge node, and obtains the target fragment data corresponding to the first processing request based on the first fragment data of the edge node and the first fragment data of each other edge node. The first fragment data of the other edge node is obtained by the other edge node after processing the fragment data with the first source tag based on the received second processing request.

[0023] In this embodiment, the edge node determines a first source label based on its node information and adds this label to each data shard, thus making the source of each data shard clearer. The edge node then processes the stored data shards based on a user-triggered first processing request to obtain its own first data shard. The edge node then signs the first processing request to obtain a second processing request, which is sent to each of the other edge nodes. Each of the other edge nodes processes its stored data shards based on the second processing request to obtain its own first data shard. Finally, the edge node obtains the target data shard corresponding to the first processing request based on its own first data shard and the received first data shards from the other edge nodes. This application can more efficiently utilize the computing and storage resources of each edge node in the target node group, achieving reasonable resource scheduling and balancing, improving data processing efficiency, and reducing the centralized load of data processing tasks.

[0024] In one possible design, after sending the second processing request to each of the other edge nodes, and before receiving the first fragment data corresponding to each of the other edge nodes, the method further includes:

[0025] For any other edge node, receive a first sensitive key request sent by the other edge node, wherein the first sensitive key request is used to obtain the sensitive key of the edge node;

[0026] Based on the first sensitive key request, the sensitive key of the edge node is determined and sent to any other edge node, so that the other edge node can use the sensitive key to decrypt sensitive information in the fragment data with the first source tag, and process the decrypted fragment data with the first source tag based on the second processing request to obtain the first fragment data of the other edge node.

[0027] In this embodiment, an edge node receives a first sensitive key request sent by any other edge node and sends its own sensitive key to the other edge node, so that the other edge node can use its sensitive key to decrypt sensitive information in the fragmented data with a first source tag, and process the decrypted fragmented data with the first source tag based on a second processing request to obtain the first fragmented data of the other edge node, thereby ensuring the security of sensitive information in the fragmented data.

[0028] In one possible design, the method further includes:

[0029] For any other edge node, receive a third processing request from that other edge node, wherein the other edge node is an edge node that responds to a fourth processing request triggered by the user;

[0030] Using the public key of any other edge node stored in the edge node, the first digital signature in the third processing request is decrypted to obtain the first hash value;

[0031] A hash calculation is performed on the fourth processing request in the third processing request to obtain a second hash value;

[0032] The first hash value and the second hash value are compared to obtain a comparison result. Based on the comparison result, it is determined whether the third processing request is a legitimate request.

[0033] In this embodiment, an edge node receives a third processing request from any other edge node, uses the public key of any other edge node stored in the edge node to decrypt the first digital signature in the third processing request to obtain a first hash value; performs a hash calculation on the fourth processing request in the third processing request to obtain a second hash value; and determines whether the third processing request is a legitimate request based on the first hash value and the second hash value, thereby ensuring the authenticity, integrity and credibility of the source of the processing request, and preventing man-in-the-middle attacks or malicious nodes forging requests.

[0034] In one possible design, determining whether the third processing request is a legitimate request based on the comparison result includes:

[0035] If the comparison result indicates that the first hash value and the second hash value are the same, then the third processing request is determined to be a valid request, and the fragmented data with the second source tag in the third processing request is processed based on the third processing request to obtain the second fragmented data of the edge node, and the second fragmented data of the edge node is sent to any other edge node, wherein the second source tag is used to represent the any other edge node that generated the fragmented data;

[0036] If the comparison result indicates that the first hash value and the second hash value are different, then it is determined that the third processing request is not a valid request, and an exception message is generated based on the third processing request and sent to any other edge node.

[0037] In this embodiment, if the first hash value and the third hash value are the same, it indicates that the third processing request is a legitimate request. Therefore, based on the third processing request, the fragmented data with the second source tag in the third processing request is processed to obtain the second fragmented data of the edge node, and the second fragmented data of the edge node is sent to any other edge node. If the first hash value and the third hash value are different, it indicates that the third processing request is not a legitimate request. Therefore, an exception message is generated and sent to any other edge node. This application can ensure that the edge node only responds to legitimate processing requests that have been verified by signature, thereby improving the security of processing tasks in the distributed system.

[0038] In one possible design, processing the fragmented data with the second source tag in the third processing request based on the third processing request to obtain the second fragmented data of the edge node includes:

[0039] If the fragmented data with the second source tag stored by the edge node contains encrypted sensitive information, then a second sensitive key request is sent to any other edge node, wherein the second sensitive key request is used to obtain the sensitive key of any other edge node;

[0040] Receive the sensitive key of any other edge node after it receives the second sensitive key request;

[0041] Using the sensitive key of any other edge node, the fragment data with the second source tag is decrypted. Based on the third processing request, the decrypted fragment data with the second source tag is processed to obtain the second fragment data of the edge node.

[0042] In this embodiment, if the fragmented data with a second source tag stored by the edge node contains encrypted sensitive information, a second sensitive key request is sent to any other edge node, and a sensitive key from any other edge node is received; the fragmented data with the second source tag is decrypted using the sensitive key from any other edge node, and the decrypted fragmented data with the second source tag is processed based on a third processing request to obtain the second fragmented data of the edge node, thereby ensuring the security of sensitive information in the fragmented data.

[0043] In one possible design, prior to acquiring the data to be stored, the process further includes:

[0044] After being added to the target node group, any adjacent edge node of the edge node is designated as a backup edge node, wherein the backup edge node is used to store the fragmented data of the edge node; and / or

[0045] If any other edge node is detected joining the target node group, any adjacent edge node of the target edge node is designated as a backup edge node.

[0046] In this embodiment, after an edge node is added to the target node group, any adjacent edge node of the original edge node is used as a backup edge node. Furthermore, if any other edge node is detected to have joined the target node group, any adjacent edge node of the original edge node is used as a backup edge node to store the edge node's fragmented data, so that the backup edge node can be used to recover the data in case of edge node failure.

[0047] In one possible design, the method further includes:

[0048] If any other edge node is detected to have left the target node group, any adjacent edge node of the target edge node will be used as a backup edge node.

[0049] In this embodiment of the application, if any other edge node is detected to have left the target node group, any adjacent edge node of the edge node is used as a backup edge node to store the fragmented data of the edge node, so that the data can be recovered by using the backup edge node when the edge node is abnormal.

[0050] Secondly, embodiments of this application provide a data storage device, including:

[0051] The acquisition module is used to acquire data to be stored.

[0052] The sharding module is used to shard the data to be stored based on the number of edge nodes in the target node group where the edge node is located, so as to obtain multiple sharded data.

[0053] The determination module is used to determine the target node information based on any one piece of data, and to match the target node information with the node information of each edge node in the target node group, and to determine the target edge node based on the matching result;

[0054] The sending module is configured to send any one of the fragment data to the target edge node if the determined target edge node is another edge node, so that the target edge node stores the any one of the fragment data.

[0055] Thirdly, this application provides an electronic device, comprising:

[0056] Memory, used to store program instructions;

[0057] A processor is configured to invoke program instructions stored in the memory and execute the steps of the method described in any one of the first aspects according to the obtained program instructions.

[0058] Fourthly, this application provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the method described in any one of the first aspects.

[0059] Fifthly, this application provides a computer program product comprising: computer program code, which, when run on a computer, causes the computer to perform the method described in any one of the first aspects.

[0060] The technical effects of aspects two through five and any one of their designs can be found in the technical effects of the corresponding designs in aspect one, and will not be repeated here. Attached Figure Description

[0061] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of this application;

[0062] Figure 2 A flowchart illustrating a data storage method provided in an embodiment of this application;

[0063] Figure 3 A schematic diagram of a local area network provided for an embodiment of this application;

[0064] Figure 4 A schematic diagram of another local area network provided in an embodiment of this application;

[0065] Figure 5 A schematic diagram of a node group provided in an embodiment of this application;

[0066] Figure 6 A flowchart illustrating a method for determining target fragment data corresponding to a first processing request, provided in an embodiment of this application;

[0067] Figure 7 A flowchart illustrating a method for processing a first sensitive key request, provided as an embodiment of this application;

[0068] Figure 8 A flowchart illustrating a method for verifying whether a third processing request is a legitimate request, provided in an embodiment of this application;

[0069] Figure 9 A detailed flowchart of a method for verifying whether a third processing request is a legitimate request, provided in an embodiment of this application;

[0070] Figure 10 A flowchart illustrating a method for obtaining second fragment data of edge nodes, provided in an embodiment of this application;

[0071] Figure 11 A detailed flowchart of a method for determining the target fragment data corresponding to a first processing request, provided in an embodiment of this application;

[0072] Figure 12 A flowchart illustrating a method for determining the first fragment data of edge node 2, provided in an embodiment of this application;

[0073] Figure 13 This is a schematic diagram illustrating the process of adding an edge node to a node group, as provided in an embodiment of this application.

[0074] Figure 14 This is a schematic diagram illustrating another method of adding an edge node to a node group, as provided in an embodiment of this application.

[0075] Figure 15 This is a schematic diagram illustrating an edge node exiting a node group, as provided in an embodiment of this application.

[0076] Figure 16 This is a schematic diagram of the structure of a data storage device provided in an embodiment of this application;

[0077] Figure 17 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0078] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.

[0079] The terms "first" and "second" in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. The term "multiple" in this application can mean at least two, for example, two, three, or more, and the embodiments of this application do not impose limitations.

[0080] The data collection, dissemination, and use in this application all comply with relevant national laws and regulations.

[0081] Before introducing a data storage method provided by the embodiments of this application, the technical background of the embodiments of this application will be described in detail below for ease of understanding.

[0082] With the rapid proliferation of IoT devices and the application of 5G communication technology, the amount of data at the network edge is exploding. Traditional cloud computing models, relying on centralized data processing and storage, suffer from problems such as transmission latency, network bandwidth consumption, and privacy and security concerns. To address these issues, edge computing technology has emerged, distributing data processing tasks to edge nodes closer to the data source, thereby reducing network latency, optimizing bandwidth utilization, and distributing processing pressure.

[0083] With the increasing threat of cyberattacks, traditional edge node self-computing methods can no longer meet current high security requirements. Since each edge node stores and processes complete data, a breach could lead to data leaks and other security issues. Therefore, ensuring data security in a local area network (LAN) environment is a pressing technical problem that needs to be solved.

[0084] To address the aforementioned issues, this application proposes a data storage method, apparatus, device, and medium to improve data storage efficiency, reduce data leakage and other security problems, and ensure data security.

[0085] First refer to Figure 1 This is a schematic diagram illustrating an application scenario of this application, including a client 11, a server 12, and an edge node 13. The client 11 receives processing requests triggered by a user and sends them to the server 12. The server 12 forwards the received processing requests to the edge node 13 in the local area network (LAN). The edge node 13 processes the stored sharded data based on the received processing requests. Furthermore, the edge node 13 also receives data to be stored and shards it for storage. The LAN comprises n node groups, where n is an integer greater than or equal to 1. Each node group includes m edge nodes, where m is an integer greater than 1. The client 11 and server 12 communicate via a network, which can be a LAN, a WAN, etc. The server 12 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, and big data and artificial intelligence platforms.

[0086] In this embodiment of the application, as an optional implementation, the edge node 13 in the local area network acquires the data to be stored; based on the number of edge nodes in the target node group to which the edge node 13 is located, the data to be stored is fragmented to obtain multiple fragmented data; for any fragmented data, based on any fragmented data, the target node information is determined, and the target node information is matched with the node information of each edge node in the target node group, and the target edge node is determined according to the matching result; if the determined target edge node is another edge node, any fragmented data is sent to the target edge node so that the target edge node stores any fragmented data.

[0087] The following is for reference. Figure 2 The flowchart illustrating a data storage method is used to explain the technical solution provided in the embodiments of this application.

[0088] Step 201: Obtain the data to be stored.

[0089] In this embodiment, the type of data to be stored varies depending on the actual scenario. For example, in a video surveillance scenario, the data to be stored may be video data. In a smart manufacturing scenario, the data to be stored may be production data. In a financial scenario, the data to be stored may be financial data.

[0090] Step 202: Based on the number of edge nodes in the target node group where the edge node is located, the data to be stored is sharded to obtain multiple sharded data.

[0091] In this embodiment, the local area network (LAN) includes at least one node group, and each node group includes multiple edge nodes. The number of edge nodes in each node group of the LAN may be the same or different. Each edge node in the node group may have similar or identical hardware configurations, including resources such as processor, memory, storage space, and network bandwidth.

[0092] For example, Figure 3 This is a schematic diagram of a local area network provided in an embodiment of this application, such as... Figure 3 As shown, the local area network consists of 3 node groups, and each node group includes 2 edge nodes. Figure 4 A schematic diagram of another local area network provided in the embodiments of this application, such as Figure 4 As shown, the local area network includes three node groups: node group 1 includes two edge nodes, node group 2 includes three edge nodes, and node group 3 includes two edge nodes.

[0093] In this embodiment of the application, the server 12 can group the edge nodes in the local area network into multiple node groups using the following methods:

[0094] The first method involves randomly grouping the edge nodes in the local area network to obtain multiple node groups.

[0095] For example, a local area network includes 6 edge nodes: edge node 1, edge node 2, edge node 3, edge node 4, edge node 5, and edge node 6. Edge node 1, edge node 2, and edge node 3 can be randomly assigned to node group 1, and edge node 4, edge node 5, and edge node 6 can be assigned to node group 2.

[0096] The second approach involves obtaining performance data for each edge node in the local area network (LAN), and then clustering the edge nodes in the LAN based on this performance data to obtain multiple node groups.

[0097] The performance data of each edge node includes part or all of its CPU (Central Processing Unit) data, storage space data, and memory data. In this embodiment, based on the performance data of each edge node, a set clustering algorithm is used to cluster the edge nodes in the local area network, resulting in multiple node groups. The set clustering algorithm can be configured according to actual conditions; for example, it can be the k-means clustering algorithm, DBSCAN (Density-Based Spatial Clustering of Applications with Noise), or other algorithms.

[0098] The third method involves obtaining the location data of each edge node in the local area network (LAN), determining the distance between any two edge nodes based on the location data, and then clustering the edge nodes in the LAN based on the distance between any two edge nodes to obtain multiple node groups.

[0099] In this embodiment, the location data of each edge node represents its position in the actual environment. Based on the distance between any two edge nodes, a predefined clustering algorithm is used to cluster the edge nodes in the local area network, resulting in multiple node groups. The clustering algorithm can be set according to the actual situation.

[0100] The fourth method involves obtaining the performance data of each edge node in the local area network, determining the attribute correlation of each edge node based on the performance data, and clustering the edge nodes in the local area network based on the attribute correlation of each edge node to obtain multiple node groups.

[0101] In this embodiment of the application, the attribute correlation of each edge node is determined based on the performance data of each edge node, including:

[0102] For any edge node, the ratio between the memory data and the storage space data of any edge node is used as the attribute correlation of that edge node.

[0103] For example, edge node 1 has 8GB of memory and 256GB of storage space, so its attribute dependency is 8 / 256 = 1 / 32. Edge node 2 has 16GB of memory and 512GB of storage space, so its attribute dependency is 16 / 512 = 1 / 32.

[0104] In this embodiment, based on the attribute correlation of each edge node, a set clustering algorithm is used to cluster the edge nodes in the local area network to obtain multiple node groups. The set clustering algorithm can be set according to the actual situation.

[0105] In this embodiment, after grouping the edge nodes in the local area network into multiple node groups, the edge nodes within the same node group are sorted. Each edge node can have its preceding edge node as a backup edge node, with the backup of the first edge node becoming the last edge node. Alternatively, each edge node can have its following edge node as a backup edge node, with the backup of the last edge node becoming the first edge node. This creates a directed node ring among all edge nodes in the same node group. Each edge node in the node group stores the address information of all edge nodes in the group.

[0106] For example, Figure 5 This is a schematic diagram of a node group provided in an embodiment of this application, such as... Figure 5 As shown, the node group includes edge node 1, edge node 2 and edge node 3. Edge node 1 is a backup edge node for edge node 2, edge node 2 is a backup edge node for edge node 3, and edge node 3 is a backup edge node for edge node 1.

[0107] In this embodiment, the data to be stored is sharded based on the number of edge nodes in the target node group to which the edge node belongs, resulting in multiple shards. The size of each shard can be the same or different. For example, if the number of edge nodes in the target node group is 3, the data to be stored is sharded evenly according to the number of edge nodes in the node group, resulting in 3 shards, each of the same size.

[0108] Optionally, after obtaining the data to be stored, the method further includes:

[0109] Obtain the performance data of each edge node in the target node group;

[0110] Based on the performance data of each edge node and the sum of the performance data of each edge node, determine the performance ratio of each edge node;

[0111] The amount of data in each shard is determined based on the performance ratio of each edge node and the amount of data to be stored.

[0112] Based on the amount of data in each shard, the data to be stored is sharded to obtain multiple shards.

[0113] In this embodiment of the application, the performance ratio of each edge node is determined based on the performance data of each edge node and the sum of the performance data of each edge node, including:

[0114] For any given edge node, the ratio between the performance data of that edge node and the sum of the performance data of all edge nodes is taken as the performance percentage of that edge node.

[0115] The performance data for each edge node includes some or all of the CPU data, storage space data, and memory data.

[0116] Taking edge node performance data, including storage space data, as an example, the target node group includes edge node 1, edge node 2, and edge node 3. Edge node 1 has 256GB of storage space, edge node 2 has 512GB, and edge node 3 has 512GB. The performance share of edge node 1 is... The performance share of edge node 2 is The performance share of edge node 3 is

[0117] In this embodiment of the application, based on the performance data of each edge node, the data to be stored is sharded to obtain multiple shard data, so that the shard data corresponding to the edge node with better performance data has a larger data volume, and the shard data corresponding to the edge node with worse performance data has a smaller data volume.

[0118] Optionally, after obtaining multiple data shards, the following steps are also included:

[0119] Based on the node information of the edge nodes, the first source label is determined and added to each data shard.

[0120] The first source label can be either the edge node number or the edge node name.

[0121] Optionally, after obtaining multiple data shards, the following steps are also included:

[0122] For any given data segment, a set sensitive information identification method is used to identify sensitive information in the data segment, and the sensitive information in the data segment is encrypted using the sensitive key of the edge node.

[0123] The method for identifying sensitive information can be set according to the actual situation. For example, a sensitive information identification model can be used to identify sensitive information in the fragmented data.

[0124] In this embodiment of the application, a sensitive information identification method is used to identify sensitive information in the fragmented data, and the sensitive information in the fragmented data is encrypted using the sensitive key of the edge node, thereby ensuring the security of sensitive information in the fragmented data and reducing the risk of data leakage.

[0125] Step 203: For any piece of data, determine the target node information based on the target piece of data, and match the target node information with the node information of each edge node in the target node group. Based on the matching result, determine the target edge node.

[0126] The node information of an edge node can include its number, name, and other information.

[0127] In this embodiment of the application, during the process of sharding the data to be stored based on the performance data of each edge node to obtain multiple shard data, the shard data volume corresponding to any edge node is determined based on the performance ratio of any edge node and the amount of data to be stored; based on the shard data volume corresponding to any edge node, the data to be stored is sharded to obtain shard data, and the shard data includes the node information of any edge node.

[0128] Optionally, based on any shard of data, the target node information is determined, including:

[0129] Perform a modulo operation on the slice number of any slice data and the number of edge nodes in the target node group to obtain the modulo result; match the modulo result with the edge node numbers of each edge node in the target node group to determine the target edge node.

[0130] For example, a node group includes edge node A, edge node B, and edge node C. Edge node A has an edge node number of 0, edge node B has an edge node number of 1, and edge node C has an edge node number of 2. If the slice number of slice data 1 is 0, the remainder operation is performed between the slice number of slice data 1 and the number of edge nodes in the node group. The remainder result is 0. This remainder result is matched with the edge node numbers of each edge node in the node group to determine that the target edge node is edge node A. If the slice number of slice data 2 is 1, the remainder operation is performed between the slice number of slice data 2 and the number of edge nodes in the node group. The remainder result is 1. This remainder result is matched with the edge node numbers of each edge node in the node group to determine that the target edge node is edge node B. If the slice number of slice data 3 is 2, the remainder operation is performed between the slice number of slice data 3 and the number of edge nodes in the node group. The remainder result is 2. This remainder result is matched with the edge node numbers of each edge node in the node group to determine that the target edge node is edge node C.

[0131] Optionally, the data storage method further includes:

[0132] The data to be stored is sharded based on a set threshold to obtain multiple shards; the performance data of each edge node is obtained; the performance ratio of each edge node is determined based on the performance data of each edge node and the sum of the performance data of each edge node; and the number of shards allocated to each edge node is determined based on the performance ratio of each edge node and the number of shards.

[0133] The threshold value set above, which is greater than or equal to the number of edge nodes in the target node group to which the edge node belongs, can be set according to actual conditions. The performance data of the aforementioned edge nodes includes some or all of the CPU data, storage space data, and memory data.

[0134] Taking edge node performance data, including storage space data, as an example, the aforementioned threshold of 5 indicates that the data to be stored is divided into 5 data shards. The target node group includes edge node 1, edge node 2, and edge node 3. Edge node 1 has 512GB of storage space data, edge node 2 has 256GB of storage space data, and edge node 3 has 512GB of storage space data. Therefore, the performance share of edge node 1 is... The performance share of edge node 2 is The performance share of edge node 3 is The amount of data allocated to edge node 1 is 0.4 * 5 = 2, meaning 2 data shards are allocated to edge node 1. The amount of data allocated to edge node 2 is 0.2 * 5 = 1, meaning 1 data shard is allocated to edge node 2. The amount of data allocated to edge node 3 is 0.4 * 5 = 2, meaning 2 data shards are allocated to edge node 3.

[0135] In this embodiment, the performance ratio of each edge node is determined based on the performance data of each edge node and the sum of the performance data of each edge node. Based on the performance ratio of each edge node and the number of sharded data, the number of sharded data allocated to each edge node is determined. This results in edge nodes with better performance data being allocated more sharded data, and edge nodes with worse performance data being allocated fewer sharded data. This allows for more efficient and full utilization of the storage resources of each edge node, ensuring load balancing of the system in a distributed environment.

[0136] Step 204: If the determined target edge node is another edge node, then send any fragment of data to the target edge node so that the target edge node stores any fragment of data.

[0137] In this embodiment of the application, if the determined target edge node is an edge node, then any piece of data is stored.

[0138] For example, such as Figure 5As shown, the node group includes edge node 1, edge node 2, and edge node 3. Edge node 1 obtains the data to be stored, 'a', and, based on the number of edge nodes in the node group, segments the data to be stored, 'a', resulting in segments a1, a2, and a3. Edge node 1, based on segments a1 and the node information of each edge node, determines the target edge node as edge node 1 and stores segments a1. Edge node 1, based on segments a2 and the node information of each edge node, determines the target edge node as edge node 2 and sends segments a2 to edge node 2, which stores segments a2. Edge node 1, based on segments a3 and the node information of each edge node, determines the target edge node as edge node 3 and sends segments a3 to edge node 3, which stores segments a3.

[0139] Edge node 2 acquires the data to be stored, b. Based on the number of edge nodes in the node group, it segments the data b into fragments b1, b2, and b3. Edge node 2, based on fragment b1 and the node information of each edge node, determines the target edge node as edge node 1 and sends fragment b1 to edge node 1, which stores it. Edge node 2, based on fragment b2 and the node information of each edge node, determines the target edge node as edge node 2 and stores it. Edge node 2, based on fragment b3 and the node information of each edge node, determines the target edge node as edge node 3 and sends it to edge node 3, which stores it.

[0140] Edge node 3 acquires the data to be stored, c. Based on the number of edge nodes in the node group, it segments the data c into segments c1, c2, and c3. Edge node 3, based on segment c1 and the node information of each edge node, determines the target edge node as edge node 1 and sends segment c1 to edge node 1, which stores it. Edge node 3, based on segment c2 and the node information of each edge node, determines the target edge node as edge node 2 and sends segment c2 to it, which stores it. Edge node 3, based on segment c3 and the node information of each edge node, determines the target edge node as edge node 3, which stores it.

[0141] In this embodiment, data transmission can occur between any two edge nodes in the target node group. During data transmission, the SSL / TLS (Secure Socket Layer / Transport Layer Security) protocol is used to ensure encrypted data transmission, thereby protecting the security of data during network transmission and preventing data from being stolen or tampered with. For example, the SSL / TLS protocol is used when an edge node sends any fragment of data to the target edge node.

[0142] In this embodiment, after any fragment of data is sent to the target edge node, the target edge node receives the fragment of data and encrypts it using its storage key. The encrypted fragment of data is then stored in a local database or file system, thereby protecting the security of the data in a static state and preventing data leakage when the data storage medium is illegally accessed or stolen.

[0143] In this embodiment, the edge nodes in the local area network (LAN) fragment the acquired data to be stored based on the number of edge nodes in the target node group to which the edge node belongs, resulting in multiple fragmented data. For any fragmented data, target node information is determined based on the fragmented data, and the target node information is matched with the node information of each edge node in the target node group. Based on the matching result, the target edge node is determined, which is the edge node to store the fragmented data. If the target edge node is another edge node, the fragmented data is sent to the target edge node so that the target edge node stores the fragmented data, thereby improving the efficiency of data storage. Furthermore, by storing each fragmented data of the data to be stored on a different edge node in the target node group, even if an attacker compromises a certain edge node in the target node group, they cannot obtain complete data based on the fragmented data stored by that edge node, and the attacker cannot determine the other edge nodes in the target node group. Therefore, data security is improved, and the occurrence of security problems such as data leakage is reduced.

[0144] In this embodiment of the application, the edge node responds to the first processing request triggered by the user and determines the target fragment data corresponding to the first processing request based on the fragment data stored by each edge node in the target node group. Figure 6 A flowchart illustrating a method for determining target fragment data corresponding to a first processing request, as provided in this application embodiment, is shown below. Figure 6 As shown, it includes at least the following steps 601-603:

[0145] Step 601: In response to the first processing request triggered by the user, process the fragmented data with the first source tag in the first processing request to obtain the first fragmented data of the edge node.

[0146] The first source label is used to characterize the edge node that generates the fragmented data. In this embodiment, the first processing request triggered by the user varies depending on the actual scenario. For example, in a video surveillance scenario, the first processing request may be to query a target, while in a user data management scenario, the first processing request may be to obtain user data that meets set conditions.

[0147] Taking a user data management scenario as an example, the target node group includes edge node 1, edge node 2, and edge node 3, and the sharded data is user data. If the first processing request is to obtain user data whose age is between 20 and 30, then edge node 1 responds to the first processing request triggered by the user. Since the first source tag included in the first processing request is edge node 1, based on the first processing request, the sharded data from edge node 1 is queried and processed to obtain the user data whose age is between 20 and 30 corresponding to edge node 1, that is, the first sharded data of the edge node.

[0148] Step 602: Sign the first processing request to obtain the second processing request, and send the second processing request to each of the other edge nodes respectively.

[0149] Optionally, the first processing request is signed to obtain a second processing request, including:

[0150] The first processing request is hashed to obtain a third hash value, and the third hash value is encrypted using the private key of the edge node to obtain a second digital signature; the second processing request is obtained based on the first processing request and the second digital signature.

[0151] In this embodiment, a set hash algorithm can be used to perform hash calculation on the first processing request to obtain a third hash value. The set hash algorithm can be configured according to actual conditions; for example, it can be SHA-256 (Secure Hash Algorithm-256, a 256-bit secure hash algorithm). SHA is a family of cryptographic hash functions that calculates a fixed-length string (also known as a message digest) corresponding to a digital message. The output of SHA-256 is a 256-bit (32-byte) hash value.

[0152] In this embodiment of the application, each edge node generates and maintains its own pair of asymmetric keys (including a public key and a private key).

[0153] In this embodiment of the application, by signing the first processing request to obtain the second processing request, it is ensured that the request content in the second processing request sent to other edge nodes will not be tampered with or forged during transmission.

[0154] Step 603: Receive the first fragment data of each other edge node sent by each other edge node, and obtain the target fragment data corresponding to the first processing request based on the first fragment data of the edge node and the first fragment data of each other edge node.

[0155] Among them, the first fragment data of other edge nodes is obtained by other edge nodes processing the fragment data with the first source label based on the received second processing request.

[0156] Optionally, based on the first shard data of the edge nodes and the first shard data of each other edge node, the target shard data corresponding to the first processing request is obtained, including:

[0157] The first fragment data of the edge node and the first fragment data of each other edge node are aggregated to obtain the target fragment data corresponding to the first processing request.

[0158] like Figure 1 As shown, client 11 obtains a first processing request triggered by the user and sends it to server 12; server 12 sends the received first processing request to edge node 13 in the local area network. Edge node 13 processes the fragmented data with the first source tag in the first processing request based on the first processing request to obtain the first fragmented data of the edge node; signs the first processing request to obtain a second processing request, and sends the second processing request to each of the other edge nodes; receives the first fragmented data of each of the other edge nodes sent by the other edge nodes, and obtains the target fragmented data corresponding to the first processing request based on the first fragmented data of the edge node and the first fragmented data of each of the other edge nodes.

[0159] For example, such as Figure 5As shown, edge node 2 responds to a first processing request triggered by a user, processes the fragmented data with the first source tag in the first processing request, and obtains the first fragmented data of edge node 2. Edge node 2 signs the first processing request to obtain a second processing request, and sends the second processing request to edge node 1 and edge node 3. Edge node 1 receives the second processing request, processes the fragmented data with the first source tag based on the second processing request, obtains the first fragmented data of edge node 1, and sends the first fragmented data of edge node 1 to edge node 2. Edge node 3 receives the second processing request, processes the fragmented data with the first source tag based on the second processing request, obtains the first fragmented data of edge node 3, and sends the first fragmented data of edge node 3 to edge node 2. Edge node 2 receives the first fragmented data of edge node 1 and the first fragmented data of edge node 3, and obtains the target fragmented data corresponding to the first processing request based on the first fragmented data of edge node 1, edge node 2, and edge node 3.

[0160] In this embodiment, an edge node processes stored sharded data based on a first processing request triggered by a user, obtaining the edge node's first sharded data. The edge node then signs the first processing request to obtain a second processing request, which is sent to each of the other edge nodes. Each other edge node processes its stored sharded data based on the second processing request, obtaining its own first sharded data. Based on its own first sharded data and the received first sharded data from the other edge nodes, the edge node obtains the target sharded data corresponding to the first processing request. This application can more efficiently utilize the computing and storage resources of each edge node in the target node group, achieving reasonable resource scheduling and balancing, improving data processing efficiency, and reducing the centralized load of data processing tasks.

[0161] Since the fragmented data with the first source tag stored by other edge nodes may contain encrypted sensitive information, it is impossible to process such fragmented data with the first source tag. Therefore, in this application, after sending the second processing request to each other edge node in step 602 and before receiving the first fragmented data corresponding to each other edge node in step 603, a first sensitive key request sent by any other edge node is received, and the sensitive key of the edge node is sent to any other edge node. Figure 7 A flowchart illustrating a method for processing a first sensitive key request, as provided in an embodiment of this application, is shown below. Figure 7 As shown, it includes at least the following steps 701-702:

[0162] Step 701: Receive a first sensitive key request sent by any other edge node.

[0163] The first sensitive key request is used to obtain the sensitive key of the edge node.

[0164] Step 702: Based on the first sensitive key request, determine the sensitive key of the edge node and send the sensitive key of the edge node to any other edge node so that any other edge node can use the sensitive key of the edge node to decrypt the sensitive information in the fragment data with the first source tag, and process the decrypted fragment data with the first source tag based on the second processing request to obtain the first fragment data of any other edge node.

[0165] Optionally, sending the edge node's sensitive key to any other edge node also includes:

[0166] The sensitive key of the edge node is encrypted using the public key of any other edge node stored in the edge node, and then the encrypted sensitive key of the edge node is sent to any other edge node.

[0167] In this embodiment of the application, any other edge node receives the encrypted sensitive key of the edge node, and uses the private key of any other edge node to decrypt the encrypted sensitive key of the edge node to obtain the sensitive key of the edge node.

[0168] In this embodiment, any other edge node responds to a user-triggered fourth processing request by signing the fourth processing request to obtain a third processing request, and then sends the third processing request to the edge node. After receiving the third processing request, the edge node needs to verify whether the third processing request is a legitimate request. Figure 8 A flowchart illustrating a method for verifying whether a third processing request is a legitimate request, as provided in this application embodiment, is shown below. Figure 8 As shown, it includes at least the following steps 801-804:

[0169] Step 801: Receive a third processing request from any other edge node.

[0170] In this process, any other edge node is an edge node responding to the fourth processing request triggered by the user. Upon receiving the fourth processing request, this edge node performs a hash operation on the request to obtain a first hash value, and then encrypts the first hash value using its private key to obtain a first digital signature. Based on the fourth processing request and the first digital signature, a third processing request is then obtained. This application can utilize a predefined hash algorithm to perform a hash calculation on the fourth processing request to obtain the first hash value.

[0171] Step 802: Use the public key of any other edge node stored in the edge node to decrypt the first digital signature in the third processing request to obtain the first hash value.

[0172] Step 803: Perform a hash calculation on the fourth processing request in the third processing request to obtain the second hash value.

[0173] In this embodiment of the application, a set hash algorithm can be used to perform hash calculation on the fourth processing request in the third processing request to obtain a third hash value. The set hash algorithm used in the above-mentioned hash calculation on the fourth processing request is the same as the set hash algorithm used in the hash calculation on the fourth processing request in the third processing request.

[0174] Step 804: Compare the first hash value and the second hash value to obtain the comparison result, and determine whether the third processing request is a legitimate request based on the comparison result.

[0175] Optionally, determining whether a third-party processing request is a legitimate request based on the comparison result includes:

[0176] If the comparison result indicates that the first hash value and the second hash value are the same, then the third processing request is determined to be a valid request, and the fragmented data with the second source label in the third processing request is processed based on the third processing request to obtain the second fragmented data of the edge node. The second fragmented data of the edge node is then sent to any other edge node, wherein the second source label is used to represent any other edge node that generated the fragmented data.

[0177] If the comparison result indicates that the first hash value and the second hash value are different, then the third processing request is determined to be an invalid request, and an exception message is generated based on the third processing request and sent to any other edge node.

[0178] The abnormal information includes information such as the request time and the request content.

[0179] In this embodiment, to ensure that each edge node only initiates its corresponding data processing procedure upon receiving a legitimate processing request from another edge node in the distributed processing, this application employs a digital signature-based authentication mechanism. This mechanism guarantees the authenticity, integrity, and source credibility of the processing request, preventing man-in-the-middle attacks or malicious nodes forging requests. Each edge node will only respond to legitimate processing requests that have been verified by signature, thereby improving the security of processing tasks in the distributed system.

[0180] Figure 9 A detailed flowchart of a method for verifying whether a third processing request is a legitimate request, provided in an embodiment of this application, is shown below. Figure 9As shown, it includes at least the following steps 901-906:

[0181] Step 901: Receive a third processing request from any other edge node.

[0182] Any other edge node is an edge node that responds to the fourth processing request triggered by the user. The third processing request includes the fourth processing request and the first digital signature.

[0183] Step 902: Use the public key of any other edge node stored in the edge node to decrypt the first digital signature in the third processing request to obtain the first hash value.

[0184] Step 903: Perform a hash calculation on the fourth processing request in the third processing request to obtain the second hash value.

[0185] Step 904: Determine whether the first hash value and the second hash value are the same. If they are the same, proceed to step 905; otherwise, proceed to step 906.

[0186] Step 905: Determine that the third processing request is a legitimate request, and process the fragmented data with the second source tag in the third processing request based on the third processing request to obtain the second fragmented data of the edge node, and send the second fragmented data of the edge node to any other edge node.

[0187] The second source label is used to characterize any other edge node that generates the sharded data.

[0188] In this embodiment of the application, if the fragmented data stored by the edge node does not contain fragmented data with the second source tag, or if the processing of the fragmented data with the second source tag based on the third processing request fails to obtain the second fragmented data of the edge node, then information indicating that the edge node does not contain the second fragmented data is sent to any other edge node.

[0189] Step 906: Determine that the third processing request is not a legitimate request, generate an exception message based on the third processing request, and send the exception message to any other edge node.

[0190] In this embodiment of the application, the fragmented data with the second source tag in the third processing request is processed based on the third processing request to obtain the second fragmented data of the edge node. Figure 10 A flowchart illustrating a method for obtaining second fragment data of edge nodes provided in an embodiment of this application is shown below. Figure 10 As shown, it includes at least the following steps 101-103:

[0191] Step 101: If the fragmented data with the second source tag stored by the edge node contains encrypted sensitive information, then send a second sensitive key request to any other edge node.

[0192] The second sensitive key request is used to obtain the sensitive key of any other edge node.

[0193] Step 102: Receive the sensitive key of any other edge node after receiving the second sensitive key request.

[0194] Specifically, after receiving the second sensitive key request, any other edge node sends a sensitive key of that other edge node, encrypted using the edge node's public key; then, the edge node's private key is used to decrypt the encrypted sensitive key of that other edge node to obtain the sensitive key of that other edge node.

[0195] Step 103: Using the sensitive key of any other edge node, decrypt the fragment data with the second source tag, and process the decrypted fragment data with the second source tag based on the third processing request to obtain the second fragment data of the edge node.

[0196] Taking a target node group that includes edge node 1 and edge node 2 as an example, where edge node 1 receives the first processing request, Figure 11 A detailed flowchart of a method for determining the target fragment data corresponding to a first processing request, provided in an embodiment of this application, is shown below. Figure 11 As shown, it includes at least the following steps 111-118:

[0197] Step 111: In response to the first processing request triggered by the user, edge node 1 processes the fragmented data with the first source tag in the first processing request to obtain the first fragmented data of edge node 1.

[0198] The first source label is used to characterize the edge node 1 that generates the sharded data.

[0199] Step 112: Edge node 1 signs the first processing request to obtain the second processing request.

[0200] The second processing request includes a digital signature and the first processing request.

[0201] Step 113: Edge node 1 sends a second processing request to edge node 2.

[0202] Step 114: Edge node 2 uses the public key of stored edge node 1 to decrypt the digital signature in the second processing request to obtain hash value 1.

[0203] Step 115: Edge node 2 performs a hash calculation on the first processing request in the second processing request to obtain hash value 2.

[0204] Step 116: Edge node 2 determines that hash value 1 and hash value 2 are the same, determines that the second processing request is a valid request, and processes the fragment data with the first source label based on the second processing request to obtain the first fragment data of edge node 2.

[0205] Step 117: Edge node 2 sends the first fragment data of edge node 2 to edge node 1.

[0206] Step 118: Edge node 1 obtains the target fragment data corresponding to the first processing request based on the first fragment data of edge node 1 and the first fragment data of edge node 2.

[0207] In step 116 above, edge node 2 processes the fragmented data with the first source label based on the second processing request to obtain the first fragmented data of edge node 2. Figure 12 A flowchart illustrating a method for determining the first fragment data of edge node 2, as provided in this application embodiment, is shown below. Figure 12 As shown, it includes at least the following steps 121-127:

[0208] Step 121: Edge node 2 determines that the stored fragment data with the first source tag contains encrypted sensitive information.

[0209] Step 122: Edge node 2 sends a sensitive key request to edge node 1.

[0210] Step 123: Edge node 1 determines its sensitive key based on the sensitive key request.

[0211] Step 124: Edge node 1 uses the public key of stored edge node 2 to encrypt the sensitive key of edge node 1, and obtains the encrypted sensitive key of edge node 1.

[0212] Step 125: Edge node 1 sends the encrypted sensitive key of edge node 1 to edge node 2.

[0213] Step 126: Edge node 2 uses its private key to decrypt the encrypted sensitive key of edge node 1 to obtain the sensitive key of edge node 1.

[0214] Step 127: Edge node 2 uses the sensitive key of edge node 1 to decrypt the fragment data with the first source tag, and processes the decrypted fragment data with the first source tag based on the second processing request to obtain the first fragment data of edge node 2.

[0215] In this embodiment of the application, before acquiring the data to be stored, the following steps are also included:

[0216] After being added to the target node group, any adjacent edge node of the edge node is designated as a backup edge node, where the backup edge node is used to store the fragmented data of the edge node; and / or,

[0217] If any other edge node is detected joining the target node group, any adjacent edge node of the target edge node will be used as a backup edge node.

[0218] Optionally, detecting any other edge node joining the target node group includes:

[0219] Receive node join information sent by any other edge node to each edge node in the target node group.

[0220] For example, Figure 13 This is a schematic diagram illustrating the addition of an edge node to a node group, as provided in an embodiment of this application. Figure 13 As shown, the node group includes edge node 1, edge node 2, and edge node 3. Edge node 1 is a backup edge node for edge node 2, edge node 2 is a backup edge node for edge node 3, and edge node 3 is a backup edge node for edge node 1. After edge node 4 is added to the node group, edge node 3 is used as the backup edge node for edge node 4, and edge node 3 deletes the backed-up fragment data (a1, b1, c1) of edge node 1. Since edge node 4 is not an edge node that has historically left the node group, data recovery is not required. After edge node 1 detects that edge node 4 has been added to the node group, edge node 4 is used as the backup edge node for edge node 1, and the fragment data (a1, b1, c1) stored in edge node 1 is backed up to edge node 4.

[0221] Figure 14 This is a schematic diagram illustrating another method for adding an edge node to a node group, as provided in an embodiment of this application. Figure 14As shown, the node group includes edge node 1, edge node 2, and edge node 3. Edge node 1 is a backup edge node for edge node 2, edge node 2 is a backup edge node for edge node 3, and edge node 3 is a backup edge node for edge node 1. After edge node 4 is added to the node group, edge node 3 is used as the backup edge node for edge node 4, and edge node 3 deletes the backed-up fragment data (a1, b1, c1) of edge node 1. Since edge node 4 was an edge node that left the node group in the past, the fragment data (a4, b4, c4) stored by edge node 4 in the past is restored based on the backed-up fragment data in edge node 3. After edge node 1 detects that edge node 4 has been added to the node group, it uses edge node 4 as the backup edge node for edge node 1 and backs up the fragment data (a1, b1, c1) stored by edge node 1 to edge node 4.

[0222] In this embodiment of the application, the data storage method further includes:

[0223] If any other edge node is detected to have left the target node group, any adjacent edge node of the detected edge node will be used as a backup edge node.

[0224] Since any other edge node leaving the target node group can be either voluntary or involuntary, when a node voluntarily leaves, it needs to send a node exit message to all edge nodes in the target node group. When a node involuntarily leaves, each edge node in the target node group needs to determine whether the node has left through a heartbeat mechanism. Therefore, detecting that any other edge node has left the target node group includes: receiving a node exit message from the node voluntarily leaving the target node group to all edge nodes in the target node group; or, determining that the duration for which no heartbeat has been detected from any other edge node exceeds a set duration threshold. The set duration can be adjusted according to actual conditions.

[0225] For example, Figure 15 This is a schematic diagram illustrating an edge node exiting a node group, as provided in an embodiment of this application. Figure 15As shown, the node group includes edge node 1, edge node 2, and edge node 3. Edge node 1 is a backup edge node for edge node 2, edge node 2 is a backup edge node for edge node 3, and edge node 3 is a backup edge node for edge node 1. After edge node 2 leaves the node group, edge node 3 detects this and uses edge node 1 as its backup node. It then backs up the sharded data (a3, b3, c3) stored in edge node 3 to edge node 1. The backed-up sharded data (a2, b2, c2) stored in edge node 3 remains unchanged to ensure data integrity, prevent data loss, and facilitate data recovery after edge node 2 rejoins the node group.

[0226] Based on the same technical concept, this application provides an exemplary data storage device, such as... Figure 16 As shown, the device includes:

[0227] Module 161 is used to acquire data to be stored;

[0228] The sharding module 162 is used to shard the data to be stored based on the number of edge nodes in the target node group where the edge node is located, so as to obtain multiple sharded data.

[0229] The determination module 163 is used to determine target node information based on any one piece of data, and to match the target node information with the node information of each edge node in the target node group, and to determine the target edge node based on the matching result.

[0230] The sending module 164 is used to send any one of the fragment data to the target edge node if the determined target edge node is another edge node, so that the target edge node stores the any one of the fragment data.

[0231] Optionally, after acquiring the data to be stored, the acquisition module 161 is further configured to:

[0232] Obtain the performance data of each edge node in the target node group;

[0233] Based on the performance data of each edge node and the sum of the performance data of each edge node, the performance ratio of each edge node is determined.

[0234] The amount of data in each shard is determined based on the performance ratio of each edge node and the amount of data to be stored.

[0235] Based on the amount of data in each shard, the data to be stored is sharded to obtain multiple shard data.

[0236] Optionally, after obtaining multiple data shards, the sharding module 162 is further configured to:

[0237] Based on the node information of the edge nodes, a first source label is determined, and the first source label is added to each data shard.

[0238] The data storage device further includes:

[0239] The processing module is configured to respond to a first processing request triggered by a user, and process the fragmented data with the first source tag in the first processing request based on the first processing request to obtain the first fragmented data of the edge node.

[0240] The signature module is used to sign the first processing request to obtain the second processing request, and send the second processing request to each of the other edge nodes respectively.

[0241] The first receiving module is configured to receive the first fragment data of each other edge node sent by each other edge node, and obtain the target fragment data corresponding to the first processing request based on the first fragment data of the edge node and the first fragment data of each other edge node, wherein the first fragment data of the other edge node is obtained by the other edge node after processing the fragment data with the first source tag based on the received second processing request.

[0242] Optionally, after sending the second processing request to each of the other edge nodes, and before receiving the first fragment data corresponding to each of the other edge nodes, the signature module is further configured to:

[0243] For any other edge node, receive a first sensitive key request sent by the other edge node, wherein the first sensitive key request is used to obtain the sensitive key of the edge node;

[0244] Based on the first sensitive key request, the sensitive key of the edge node is determined and sent to any other edge node, so that the other edge node can use the sensitive key to decrypt sensitive information in the fragment data with the first source tag, and process the decrypted fragment data with the first source tag based on the second processing request to obtain the first fragment data of the other edge node.

[0245] Optionally, the data storage device further includes:

[0246] The second receiving module is used to receive a third processing request from any other edge node, wherein the other edge node is an edge node that responds to a fourth processing request triggered by the user.

[0247] The decryption module is used to decrypt the first digital signature in the third processing request using the public key of any other edge node stored in the edge node, to obtain the first hash value;

[0248] The calculation module is used to perform a hash calculation on the fourth processing request in the third processing request to obtain a second hash value;

[0249] The judgment module is used to compare the first hash value and the second hash value to obtain a comparison result, and to determine whether the third processing request is a legitimate request based on the comparison result.

[0250] Optionally, the determination module is used for:

[0251] If the comparison result indicates that the first hash value and the second hash value are the same, then the third processing request is determined to be a valid request, and the fragmented data with the second source tag in the third processing request is processed based on the third processing request to obtain the second fragmented data of the edge node, and the second fragmented data of the edge node is sent to any other edge node, wherein the second source tag is used to represent the any other edge node that generated the fragmented data;

[0252] If the comparison result indicates that the first hash value and the second hash value are different, then it is determined that the third processing request is not a valid request, and an exception message is generated based on the third processing request and sent to any other edge node.

[0253] Optionally, the determination module is used for:

[0254] If the fragmented data with the second source tag stored by the edge node contains encrypted sensitive information, then a second sensitive key request is sent to any other edge node, wherein the second sensitive key request is used to obtain the sensitive key of any other edge node;

[0255] Receive the sensitive key of any other edge node after it receives the second sensitive key request;

[0256] Using the sensitive key of any other edge node, the fragment data with the second source tag is decrypted. Based on the third processing request, the decrypted fragment data with the second source tag is processed to obtain the second fragment data of the edge node.

[0257] Optionally, before acquiring the data to be stored, the acquisition module 161 is further configured to:

[0258] After being added to the target node group, any adjacent edge node of the edge node is designated as a backup edge node, wherein the backup edge node is used to store the fragmented data of the edge node; and / or

[0259] If any other edge node is detected joining the target node group, any adjacent edge node of the target edge node is designated as a backup edge node.

[0260] Optionally, the data storage device further includes:

[0261] The detection module is used to detect any other edge node that leaves the target node group and to designate any adjacent edge node of the target edge node as a backup edge node.

[0262] Based on the same inventive concept, this application provides an electronic device that can realize the function of the data storage device described above. Please refer to... Figure 17 The device includes a processor 171 and a memory 172, wherein the memory 172 is used to store program instructions;

[0263] The processor 171 calls the program instructions stored in the memory and executes the program instructions to achieve the following steps:

[0264] Retrieve the data to be stored;

[0265] Based on the number of edge nodes in the target node group where the edge node is located, the data to be stored is fragmented to obtain multiple fragmented data;

[0266] For any data shard, based on the data shard, determine the target node information, and match the target node information with the node information of each edge node in the target node group. Based on the matching result, determine the target edge node.

[0267] If the target edge node is determined to be another edge node, then any one of the fragment data is sent to the target edge node so that the target edge node stores the any one of the fragment data.

[0268] Optionally, after acquiring the data to be stored, the processor 171 is further configured to perform:

[0269] Obtain the performance data of each edge node in the target node group;

[0270] Based on the performance data of each edge node and the sum of the performance data of each edge node, the performance ratio of each edge node is determined.

[0271] The amount of data in each shard is determined based on the performance ratio of each edge node and the amount of data to be stored.

[0272] Based on the amount of data in each shard, the data to be stored is sharded to obtain multiple shard data.

[0273] Optionally, after obtaining multiple data fragments, the processor 171 is further configured to perform:

[0274] Based on the node information of the edge nodes, a first source label is determined, and the first source label is added to each data shard.

[0275] The processor 171 is also used to perform:

[0276] In response to a first processing request triggered by a user, the fragmented data with the first source tag in the first processing request is processed based on the first processing request to obtain the first fragmented data of the edge node;

[0277] The first processing request is signed to obtain a second processing request, and the second processing request is sent to each of the other edge nodes respectively;

[0278] The system receives the first fragment data of each other edge node sent by each other edge node, and obtains the target fragment data corresponding to the first processing request based on the first fragment data of the edge node and the first fragment data of each other edge node. The first fragment data of the other edge node is obtained by the other edge node after processing the fragment data with the first source tag based on the received second processing request.

[0279] Optionally, after sending the second processing request to each of the other edge nodes, and before receiving the first fragment data corresponding to each of the other edge nodes, the processor 171 is further configured to perform:

[0280] For any other edge node, receive a first sensitive key request sent by the other edge node, wherein the first sensitive key request is used to obtain the sensitive key of the edge node;

[0281] Based on the first sensitive key request, the sensitive key of the edge node is determined and sent to any other edge node, so that the other edge node can use the sensitive key to decrypt sensitive information in the fragment data with the first source tag, and process the decrypted fragment data with the first source tag based on the second processing request to obtain the first fragment data of the other edge node.

[0282] Optionally, the processor 171 is further configured to perform:

[0283] For any other edge node, receive a third processing request from that other edge node, wherein the other edge node is an edge node that responds to a fourth processing request triggered by the user;

[0284] Using the public key of any other edge node stored in the edge node, the first digital signature in the third processing request is decrypted to obtain the first hash value;

[0285] A hash calculation is performed on the fourth processing request in the third processing request to obtain a second hash value;

[0286] The first hash value and the second hash value are compared to obtain a comparison result. Based on the comparison result, it is determined whether the third processing request is a legitimate request.

[0287] Optionally, determining whether the third processing request is a legitimate request based on the comparison result includes:

[0288] If the comparison result indicates that the first hash value and the second hash value are the same, then the third processing request is determined to be a valid request, and the fragmented data with the second source tag in the third processing request is processed based on the third processing request to obtain the second fragmented data of the edge node, and the second fragmented data of the edge node is sent to any other edge node, wherein the second source tag is used to represent the any other edge node that generated the fragmented data;

[0289] If the comparison result indicates that the first hash value and the second hash value are different, then it is determined that the third processing request is not a valid request, and an exception message is generated based on the third processing request and sent to any other edge node.

[0290] Optionally, the step of processing the fragmented data with the second source tag in the third processing request based on the third processing request to obtain the second fragmented data of the edge node includes:

[0291] If the fragmented data with the second source tag stored by the edge node contains encrypted sensitive information, then a second sensitive key request is sent to any other edge node, wherein the second sensitive key request is used to obtain the sensitive key of any other edge node;

[0292] Receive the sensitive key of any other edge node after it receives the second sensitive key request;

[0293] Using the sensitive key of any other edge node, the fragment data with the second source tag is decrypted. Based on the third processing request, the decrypted fragment data with the second source tag is processed to obtain the second fragment data of the edge node.

[0294] Optionally, before acquiring the data to be stored, the processor 171 is further configured to perform:

[0295] After being added to the target node group, any adjacent edge node of the edge node is designated as a backup edge node, wherein the backup edge node is used to store the fragmented data of the edge node; and / or

[0296] If any other edge node is detected joining the target node group, any adjacent edge node of the target edge node is designated as a backup edge node.

[0297] Optionally, the processor 171 is further configured to perform:

[0298] If any other edge node is detected to have left the target node group, any adjacent edge node of the target edge node will be used as a backup edge node.

[0299] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium. The computer program product includes computer program code, which, when executed on a computer, causes the computer to perform any of the data storage methods described above. Since the principle by which the computer-readable storage medium solves the problem is similar to that of the data storage method, the implementation of the computer-readable storage medium can be found in the implementation of the method; repeated details will not be elaborated further.

[0300] Based on the same inventive concept, this application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to execute any of the data storage methods discussed above. Since the principle by which the above computer program product solves the problem is similar to that of the data storage method, the implementation of the above computer program product can be referred to the implementation of the method, and repeated details will not be described again.

[0301] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0302] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0303] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0304] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of user-operated steps to be executed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0305] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A data storage method, characterized in that, Edge nodes used in local area networks include: Retrieve the data to be stored; Based on the number of edge nodes in the target node group where the edge node is located, the data to be stored is sharded to obtain multiple shard data; based on the node information of the edge node, a first source tag is determined, and the first source tag is added to each shard data respectively; For any data shard, based on the data shard, determine the target node information, and match the target node information with the node information of each edge node in the target node group. Based on the matching result, determine the target edge node. If the target edge node is determined to be another edge node, then any one of the fragment data is sent to the target edge node so that the target edge node stores the any one of the fragment data; The method further includes: In response to a first processing request triggered by a user, the fragmented data with the first source tag in the first processing request is processed based on the first processing request to obtain the first fragmented data of the edge node; The first processing request is signed to obtain a second processing request, which is then sent to each of the other edge nodes. For any other edge node, a first sensitive key request is received from that other edge node, wherein the first sensitive key request is used to obtain the sensitive key of the edge node. Based on the first sensitive key request, the sensitive key of the edge node is determined and sent to the other edge node, so that the other edge node can use the sensitive key to decrypt sensitive information in the fragment data with the first source tag. Based on the second processing request, the decrypted fragment data with the first source tag is processed to obtain the first fragment data of the other edge node. The system receives the first fragment data of each other edge node sent by each other edge node, and obtains the target fragment data corresponding to the first processing request based on the first fragment data of the edge node and the first fragment data of each other edge node. The first fragment data of the other edge node is obtained by the other edge node after processing the fragment data with the first source tag based on the received second processing request.

2. The method as described in claim 1, characterized in that, After acquiring the data to be stored, the process also includes: Obtain the performance data of each edge node in the target node group; Based on the performance data of each edge node and the sum of the performance data of each edge node, the performance ratio of each edge node is determined. The amount of data in each shard is determined based on the performance ratio of each edge node and the amount of data to be stored. Based on the amount of data in each shard, the data to be stored is sharded to obtain multiple shard data.

3. The method as described in claim 1, characterized in that, The method further includes: For any other edge node, receive a third processing request from that other edge node, wherein the other edge node is an edge node that responds to a fourth processing request triggered by the user; Using the public key of any other edge node stored in the edge node, the first digital signature in the third processing request is decrypted to obtain the first hash value; A hash calculation is performed on the fourth processing request in the third processing request to obtain a second hash value; The first hash value and the second hash value are compared to obtain a comparison result. Based on the comparison result, it is determined whether the third processing request is a legitimate request.

4. The method as described in claim 3, characterized in that, The step of determining whether the third processing request is a legitimate request based on the comparison result includes: If the comparison result indicates that the first hash value and the second hash value are the same, then the third processing request is determined to be a valid request, and the fragmented data with the second source tag in the third processing request is processed based on the third processing request to obtain the second fragmented data of the edge node, and the second fragmented data of the edge node is sent to any other edge node, wherein the second source tag is used to represent the any other edge node that generated the fragmented data; If the comparison result indicates that the first hash value and the second hash value are different, then it is determined that the third processing request is not a valid request, and an exception message is generated based on the third processing request and sent to any other edge node.

5. The method as described in claim 4, characterized in that, The process of processing the fragmented data with the second source tag in the third processing request based on the third processing request to obtain the second fragmented data of the edge node includes: If the fragmented data with the second source tag stored by the edge node contains encrypted sensitive information, then a second sensitive key request is sent to any other edge node, wherein the second sensitive key request is used to obtain the sensitive key of any other edge node; Receive the sensitive key of any other edge node after it receives the second sensitive key request; Using the sensitive key of any other edge node, the fragment data with the second source tag is decrypted. Based on the third processing request, the decrypted fragment data with the second source tag is processed to obtain the second fragment data of the edge node.

6. The method as described in claim 1, characterized in that, Before acquiring the data to be stored, the process also includes: After being added to the target node group, any adjacent edge node of the edge node is designated as a backup edge node, wherein the backup edge node is used to store the fragmented data of the edge node; and / or If any other edge node is detected joining the target node group, any adjacent edge node of the target edge node is designated as a backup edge node.

7. The method as described in claim 1, characterized in that, The method further includes: If any other edge node is detected to have left the target node group, any adjacent edge node of the target edge node will be used as a backup edge node.

8. A data storage device for performing the method according to any one of claims 1 to 7, characterized in that, include: The acquisition module is used to acquire data to be stored. The sharding module is used to shard the data to be stored based on the number of edge nodes in the target node group where the edge node is located, so as to obtain multiple sharded data. Based on the node information of the edge nodes, a first source label is determined, and the first source label is added to each data shard. The determination module is used to determine the target node information based on any one piece of data, and to match the target node information with the node information of each edge node in the target node group, and to determine the target edge node based on the matching result; The sending module is configured to send any one of the fragment data to the target edge node if the determined target edge node is another edge node, so that the target edge node stores the any one of the fragment data. The data storage device further includes: The processing module is configured to respond to a first processing request triggered by a user, and process the fragmented data with the first source tag in the first processing request based on the first processing request to obtain the first fragmented data of the edge node. The signature module is used to sign the first processing request to obtain a second processing request, and send the second processing request to each of the other edge nodes respectively; for any other edge node, it receives a first sensitive key request sent by the other edge node, wherein the first sensitive key request is used to obtain the sensitive key of the edge node; based on the first sensitive key request, it determines the sensitive key of the edge node, and sends the sensitive key of the edge node to the other edge node, so that the other edge node can use the sensitive key of the edge node to decrypt sensitive information in the fragment data with the first source tag, and process the decrypted fragment data with the first source tag based on the second processing request to obtain the first fragment data of the other edge node; The first receiving module is configured to receive the first fragment data of each other edge node sent by each other edge node, and obtain the target fragment data corresponding to the first processing request based on the first fragment data of the edge node and the first fragment data of each other edge node, wherein the first fragment data of the other edge node is obtained by the other edge node after processing the fragment data with the first source tag based on the received second processing request.

9. An electronic device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the steps of the method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a computer, cause the computer to perform the method as described in any one of claims 1-7.

11. A computer program product, characterized in that, The computer program product includes: computer program code, which, when run on a computer, causes the computer to perform the method described in any one of claims 1-7.

Citation Information

Patent Citations

  • Data file storage method and device and electronic equipment

    CN116962428A

  • Power grid data management method and device, computer equipment and storage medium

    CN118096430A