Data processing method and device, data verification method and device, equipment and storage medium
By dyeing data and embedding characteristic information of computing nodes in the computing network, the problem of data being tampered with or stolen during the circulation process is solved, and the verification and security of the data circulation path are achieved.
Patent Information
- Application Number
- CN202410083471.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-19
- Publication Date
- 2024-10-18
AI Technical Summary
In the computing power network, user data may be tampered with or stolen during the circulation process, and there is a lack of effective security protection and verification mechanisms.
By receiving the data set to be transferred, the data is dyed based on the dyeing value of the current computing node, a dyed data set is generated, and the characteristic information of the computing node is embedded in the data flow process to ensure the integrity and integrity of the data on the circulation path. Security.
It realizes the verification of the data flow path, ensures the integrity and security of the data during the flow process, and prevents tampering and theft.
Smart Images

Figure CN118802259A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data security, and in particular, to a data processing and data verification method, device, equipment and storage medium. Background Art
[0002] When users use the computing network to perform data calculation or storage tasks, they need to upload the data to the computing network. The computing network brain then distributes the user data to various computing nodes for calculation or storage. During this process, the user data may flow through multiple nodes. However, the security environment of different nodes is different. User data may be tampered with or stolen during the flow process, and its flow path is at risk of being maliciously modified. Therefore, there is still a lack of protection and verification mechanism for data security issues in the process of user data distribution and circulation in the computing network. Summary of the invention
[0003] Based on the technical problems raised in the background technology, the present invention provides a data processing and data verification method, device, computing node and storage medium.
[0004] In a first aspect, the present invention provides a data processing method, comprising the following steps:
[0005] Receive the data set to be transferred;
[0006] Based on the coloring value of the current computing power node, the data to be circulated is colorized to obtain a coloring data set, wherein the coloring value is calculated based on the characteristic value of the current computing power node and the coloring value parameter range;
[0007] The dyeing data set is sent to the next computing power node.
[0008] Furthermore, the coloring process is performed on the data to be transferred based on the coloring value of the current computing power node to obtain a coloring data set, including:
[0009] The data set to be circulated is grouped according to a preset grouping interval to obtain a plurality of grouped data, wherein the grouping interval is positively correlated with the size of the dyeing value parameter range;
[0010] Calculate the coloring fragment value of each grouped data;
[0011] The corresponding dyed slice value is embedded in each grouped data to obtain a dyed data set;
[0012] The method for calculating the coloring fragmentation value of a grouped data includes: taking the jth column of each tuple in the grouped data as a data column to be embedded, and performing numerical processing on the data column to be embedded to obtain the embedding position value of each tuple;
[0013] Calculate the product of the coloring values of all computing power nodes that have circulated the data set to be circulated, and obtain the total coloring value Z;
[0014] The coloring slice value C is calculated according to the total coloring value and the embedded position value, wherein the coloring slice value C satisfies The minimum value of n is the number of tuples contained in the grouped data, a ij is the embedding position value of the i-th tuple.
[0015] Furthermore, the method for calculating the coloring value of the current computing power node includes:
[0016] Get the computing network task ID of the current computing power node;
[0017] Encode the characteristic value of the current computing power node and the computing network task ID to obtain intermediate characteristic data;
[0018] The intermediate feature data is subjected to a modulo operation with respect to the maximum value of the coloring value parameter range. If the remainder is greater than the minimum value of the coloring value parameter range, the prime number closest to the remainder is used as the coloring value of the current computing power node; otherwise, the remainder is used as the coloring value of the current computing power node.
[0019] Furthermore, the corresponding dyeing slice value is embedded in each grouped data to obtain a dyeing data set, including:
[0020] A new tuple is generated in each grouped data, so that the j-th column of the new tuple is the corresponding colored fragment value, and a colored data set is obtained.
[0021] The present invention also provides a data verification method, comprising:
[0022] Get the data set to be verified;
[0023] Parsing the data set to be verified to obtain a coloring value sequence to be verified, wherein the coloring value sequence to be verified includes the corresponding coloring values of the computing power nodes where the data set to be verified actually flows, and the coloring values are calculated based on the characteristic values of the computing power nodes and the coloring value parameter range;
[0024] Obtain a target coloring value sequence, wherein the target coloring value sequence includes corresponding coloring values of the computing power nodes to which the to-be-verified data set should flow;
[0025] The security of the data set to be verified is confirmed based on the comparison result of the dyeing value sequence to be verified and the target dyeing value sequence.
[0026] Further, the confirming the security of the data set to be verified according to the comparison result of the dyeing value sequence to be verified and the target dyeing value sequence includes:
[0027] The coloring value sequence to be verified is compared with the target coloring value sequence. If the coloring value sequence to be verified contains the target coloring value sequence and the order of the two is consistent, it is confirmed that the data set to be verified has passed the security verification; otherwise, it is confirmed that the data set to be verified has not passed the security verification.
[0028] Furthermore, the parsing of the data set to be verified to obtain a sequence of dye values to be verified includes:
[0029] The data set to be verified is grouped according to a preset grouping interval to obtain a plurality of grouped data to be verified, wherein the grouping interval is positively correlated with the size of the dyeing value parameter range;
[0030] Calculate the prime number sequence for each grouped data;
[0031] Screening all prime number sequences to obtain the staining value sequence to be verified;
[0032] Wherein, the method for calculating a prime number sequence of grouped data comprises:
[0033] The jth column of each tuple in a grouped data is used as a data column to be parsed, and the data column to be parsed is numerically processed to obtain a parsing position value of each tuple;
[0034] The sum of the parsed position values of all tuples in the grouped data is prime factorized to obtain a prime number sequence of the grouped data.
[0035] Furthermore, the screening of all prime number sequences to obtain the coloring value sequence to be verified includes:
[0036] Count the frequency of occurrence of prime numbers contained in all prime number sequences;
[0037] Prime numbers that are not within the coloring value parameter range and prime numbers that are less than a preset frequency threshold are removed to obtain the coloring value sequence to be verified.
[0038] In a third aspect, the present invention further provides a data processing device, comprising:
[0039] A data receiving module, used to receive the data set to be transferred;
[0040] A data coloring module, used to perform coloring processing on the data to be circulated based on the coloring value of the current computing power node to obtain a coloring data set, wherein the coloring value is calculated based on the characteristic value of the current computing power node and the coloring value parameter range;
[0041] The data sending module is used to send the dyeing data set to the next computing power node.
[0042] In a fourth aspect, the present invention further provides a data verification device, comprising:
[0043] A verification data acquisition module is used to obtain the data set to be verified;
[0044] A verification sequence acquisition module is used to parse the data set to be verified to obtain a coloring value sequence to be verified, wherein the coloring value sequence to be verified includes the corresponding coloring values of the computing power nodes where the data set to be verified actually flows, and the coloring values are calculated based on the characteristic values of the computing power nodes and the coloring value parameter range;
[0045] A target sequence acquisition module, used to acquire a target coloring value sequence, wherein the target coloring value sequence includes the corresponding coloring values of the computing power nodes to which the to-be-verified data set should flow;
[0046] The security confirmation module is used to confirm the security of the data set to be verified based on the comparison result of the coloring value sequence to be verified and the target coloring value sequence.
[0047] In a fifth aspect, the present invention further provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the data processing and data verification method as described in the first aspect or the second aspect is implemented.
[0048] In a sixth aspect, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the data processing and data verification method as described in the first aspect or the second aspect.
[0049] The present invention proposes a data processing method and a data verification method, which receives a data set to be circulated, and then performs dyeing processing on the data to be circulated based on the dyeing value of the current computing power node to obtain a dyeing data set, and then sends the dyeing data set to the next computing power node, so as to realize that the data set carries the computing power node information; when the data set that has stopped circulating needs to be verified, the data set to be verified is parsed to obtain the dyeing value sequence of the computing power node that it actually circulates, and then obtains the dyeing value sequence of the computing power node that the data set to be verified should circulate, and finally confirms the security of the data set to be verified based on the comparison results of the two dyeing value sequences. The present invention can record the information of the computing power node where the data flows, thereby verifying whether the circulation link is carried out according to the predetermined allocated computing power node, and then realizing the integrity of the circulating data set and the circulation path verification in the computing power network.
[0050] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A flowchart of the steps of a data processing method provided in an exemplary embodiment;
[0052] Figure 2 A flowchart of a data verification method provided in an exemplary embodiment;
[0053] Figure 3 A schematic diagram of a module of a data processing device provided in an exemplary embodiment;
[0054] Figure 4 A schematic diagram of a module of a data verification device provided in an exemplary embodiment;
[0055] Figure 5 An internal structural diagram of a computer device configured as a server provided in an exemplary embodiment;
[0056] Figure 6 The figure is a diagram of the internal structure of a computer device configured as a terminal provided in an exemplary embodiment. DETAILED DESCRIPTION
[0057] In order to make the objectives, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0058] It should be clear that the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present application.
[0059] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the embodiments of the present application. The singular forms of "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0060] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims. In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and do not have to be used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances.
[0061] In addition, in the description of this application, unless otherwise specified, "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0062] Based on the technical problems mentioned in the background technology, the embodiment of the present application provides a data processing method, such as Figure 1 As shown, the method comprises the following steps:
[0063] S201: Receive a data set to be circulated.
[0064] Specifically, the data set to be circulated is obtained based on the user's operation of uploading the data required to be processed in the computing network task to the computing network. The computing network includes multiple computing nodes. After the data to be processed is uploaded, it flows between the pre-planned computing nodes to complete the corresponding data processing.
[0065] The data type of the data set to be transferred can be structured data or unstructured data. Structured data refers to data with a unified and definite relationship between data elements, such as database data, csv table data, and json data; unstructured data refers to data without a fixed structure, such as office documents, text, images, and audio and video information.
[0066] S202: Based on the coloring value of the current computing power node, the data to be circulated is colored to obtain a coloring data set, wherein the coloring value is calculated based on the characteristic value of the current computing power node and the coloring value parameter range.
[0067] Specifically, the characteristic value of the computing power node indicates the unique identification of the computing power node, which can be the MAC address of the computing power node, or the unique number of the hardware constituting the security module of the computing power node. The coloring value parameter range is a value pre-set according to the actual data processing requirements, which indicates the size range of the coloring value of each computing power node, that is, the coloring value parameter range includes the maximum and minimum values of the coloring value of the computing power node. Since the characteristic values of different computing power nodes are unique, the coloring values corresponding to different computing power nodes are also unique in the current computing power network. When the data set to be circulated passes through a computing power node each time, the coloring value of the current computing power node is obtained, and the data set to be circulated is stained according to the coloring value. The staining processing operation can be regarded as an act of marking the data to be circulated, and the mark indicates that the data to be circulated has been circulated to the current computing power node.
[0068] In some other examples, in addition to the coloring value parameter, other parameters may be combined to calculate the coloring value of the computing power node.
[0069] In a preferred embodiment, a method for calculating the coloring value of a computing power node includes: obtaining a computing network task ID of a current computing power node; encoding a characteristic value and a computing network task ID of the current computing power node to obtain intermediate characteristic data; performing a remainder operation on the intermediate characteristic data with respect to the maximum value of the coloring value parameter range, and if the remainder is greater than the minimum value of the coloring value parameter range, taking the prime number closest to the remainder as the coloring value of the current computing power node, otherwise taking the remainder as the coloring value of the current computing power node.
[0070] In the computing network process, a large computing task is usually split into multiple small tasks, which can be assigned to multiple computing nodes for concurrent processing. In order to ensure that multiple computing nodes can properly coordinate and manage tasks, each task needs to be assigned a unique ID, that is, the computing network task ID. The computing network task ID is usually generated by the computing network system and has global uniqueness to avoid conflicts between different tasks. The computing tasks performed by each computing node in the computing network are assigned a unique computing network task ID.
[0071] In a specific embodiment, if the characteristic value of the current computing power node is its MAC address 7A-35-76-7D-4A-F1, the maximum range value of the coloring value parameter is set to 1000 and the minimum range value is set to 100, and the coloring value of the computing power node is calculated in combination with the current computing network task ID of the node. The network ID is obtained as "30562023100911010562953", and then the network task ID is combined with the MAC address of the computing power node, that is, "7A-35-76-7D-4A-F130562023100911010562953". By performing MD5 on the combination of the network task ID and the computing power node characteristic value, the intermediate characteristic data "71CD713D2C57BB402ADBAC5B60B14541" is output. The intermediate characteristic data is converted into decimal, and then the intermediate characteristic data is modulo the maximum value 1000 of the coloring value parameter range to obtain the remainder "345". Since "345" is greater than the minimum range value 100 of the coloring value parameter, the prime number closest to 345 is 347, and it is confirmed that "347" is the coloring value of the current computing power node.
[0072] In some other examples, other encoding methods may also be used to obtain intermediate feature data, such as an HMAC algorithm, a Base64 algorithm, a cyclic redundancy check algorithm, and the like.
[0073] S203: Send the dyeing data set to the next computing power node.
[0074] Specifically, the data set to be circulated has a preset corresponding flow path in the current computing power network, and the flow path includes multiple computing power nodes. During the data flow process, the computing power network interface node obtains the data set to be circulated in response to the user's data upload behavior, and after completing the corresponding computing task, the data set to be circulated is dyed to obtain the dyed data set. At this time, the dyed data set carries the dyeing value information of the interface computing power node; according to the preset computing power node flow path, the interface computing power node sends the dyed data set to the next computing power node on the flow path. When the data set to be circulated stops flowing, it carries the dyeing value information of all the computing power nodes that it has passed through.
[0075] In a preferred example, based on the coloring value of the current computing power node, the data to be transferred is colorized to obtain a coloring data set, including:
[0076] The data set to be circulated is grouped according to a preset grouping interval to obtain a plurality of grouped data, wherein the grouping interval is positively correlated with the size of the dyeing value parameter range;
[0077] Calculate the coloring fragment value of each grouped data;
[0078] The corresponding dyed slice value is embedded in each grouped data to obtain a dyed data set;
[0079] The method for calculating the coloring fragmentation value of a grouped data includes: taking the jth column of each tuple in the grouped data as a data column to be embedded, and performing numerical processing on the data column to be embedded to obtain the embedding position value of each tuple;
[0080] Calculate the product of the coloring values of all computing power nodes that have circulated the data set to be circulated, and obtain the total coloring value Z;
[0081] The coloring slice value C is calculated according to the total coloring value and the embedded position value, wherein the coloring slice value C satisfies The minimum value of n is the number of tuples contained in the grouped data, a ij is the embedding position value of the i-th tuple.
[0082] Specifically, after the computing power node obtains the data set to be transferred, it groups the data set according to the pre-set grouping interval. The size of the grouping interval is determined based on the security requirements of the current data set and the coloring value parameter range. When the security requirements are low, a larger grouping interval can be set to improve data processing efficiency; when the set coloring value parameter range is large, a larger grouping interval needs to be set to include more redundant space.
[0083] In a specific embodiment, if the data set to be transferred received by the current computing power node includes:
[0084] “
[0085] 1,20231009123132164,2371128858,376755830,33938,251234049,103,……,105,25,35472,0,2045,2733,7,7,103049,102180
[0086] 2,20231009123133324,54528798,303315670,33860,1486019,103,……,107,26,48052,0,828,1611,7,5,265510,265375
[0087] …
[0088] 100000, 20231009231631475, 3630976401, 136073338, 34203, 29040257, 103, ..., 105, 25, 34368, 0, 1142, 58967, 19, 43, 50006, 8071
[0089] ”
[0090] There are 100,000 data in total, where the maximum value of the coloring value parameter range is set to 1000, the minimum value is set to 100, and the grouping interval is set to 1000, that is, the data set to be transferred is divided into 100 groups.
[0091] Taking the first piece of data in the data set as an example, the method of confirming the group to which each piece of data belongs is explained.
[0092] The first data in the data set "1, 20231009123132164, 2371128858, 376755830, 33938, 251234049, 103, ..., 105, 25, 35472, 0, 2045, 2733, 7, 7, 103049, 102180" is obtained, and the need for grouping of the data is confirmed by calculating the characteristic value of the data. The characteristic value calculation method is to encode the data, and different calculation methods can be used for different data types and transmission environments. In the embodiment of the present application, considering that the column order of the data may change, the grouping sequence number of the data is obtained by taking the MD5 value of each attribute in each data and then adding them, and then taking the modulus of the sum of the MD5 values of each attribute by the grouping number. That is, the MD5 value of "1" is "C4CA4238A0B923820DCC509A6F75849B", the MD5 value of "20231009123132164" is "73BF1A1AAE766C1001BD407B3F93B304", and the MD5 value of "102180" is "A8E0EF17EC19C7C8B1CBE6CB8CF4D8C2". Finally, all the attribute values of the first data are added and modulo the group number 100, and the result is 52, so 52 is confirmed as the group number of the first data. Each data in the same group data has the same group number.
[0093] After the data set to be circulated is grouped, the coloring slice value is calculated based on the coloring value of the current computing power node. The grouped data includes multiple tuples, each tuple includes multiple data columns, and each data column indicates different attributes. In an embodiment of the present application, the embedding position of the coloring slice value is determined by selecting data in a specified data format in the grouped data, or a column with high dispersion and low repetition. After determining the embedded data column, the column data is numerically processed, that is, the column data is processed into a calculable value. Taking the first tuple of the grouped data with sequence number 52 as an example, the column in the time format is specified as the embedded data column, that is, the second column of each tuple in the grouped data, and the first tuple A in the data group is obtained. 12 The time data is "20231009123132164", for A 12 After the last 3 digits of the data are processed numerically, we get A 12 is 164. Similarly, the sum of the values of the second column of all tuples in the data group after numerical processing is obtained. It is 374591, that is, the embedded position value is 374591.
[0094] Furthermore, the total coloring value Z is obtained by calculating the product of the coloring values of all computing nodes that have been circulated by the data set to be circulated, and the coloring fragment value C is calculated according to the total coloring value and the embedded position value. If the current computing node is the computing network interface node, that is, the first computing node, and the coloring value Z1 of the current computing node is 347, then according to the coloring fragment value C, The minimum value of , the coloring shard value C1 of the current computing power node is calculated to be 169; if the current computing power node is the second computing power node, the coloring value Z1 of the first computing power node is 347, and the coloring value Z2 of the current computing power node is 541, then the total coloring value Z is the product of Z1 and Z2, that is, Z=187727, and then the coloring shard value C2 of the current computing power node is calculated to be 863.
[0095] It should be noted that if the current computing power node is not the first node in the computing network, there are many ways to obtain the coloring value of the computing power node that has been circulated before. It can be obtained by extracting the information carried by the circulating data flow, or by obtaining relevant parameters from the computing network brain for calculation.
[0096] After obtaining the coloring slice value, the coloring slice value is embedded in the corresponding data group, so as to complete the coloring of the data to be circulated and obtain the coloring data set. The data embedding method includes multiple methods.
[0097] In a preferred example, a new tuple is generated in the grouped data so that the jth column of the new tuple is the coloring fragment value C. In some other examples, the embedding position value of a tuple in the group can be modified to a ij =a ij +C to embed the coloring slice value, or create a new data column and embed the position value a ij Copy it and change the embedded position value of a tuple to a ij =a ij +C, to achieve the embedding of the coloring slice value. That is, after the coloring slice value is embedded, the embedding position value a in the grouped data is ij The sum is the minimum value of multiples of the total color value Z.
[0098] In a specific example, to modify the embedded position value a of a tuple in the grouped data ij =a ij +C implements the embedding of the coloring slice value. If the modification of a column of data cannot satisfy the embedding position value a in the grouped data, ij The sum is the minimum value of the multiple of the total color value Z, then modify the multiple columns of data. Take the first tuple A in a data group 12 Taking the time data "20231009123132164" as an example, the coloring shard value C of the current computing power node is 169. Since 164+169=333, that is, the time data "20231009123132164" in the second column of the row of data is modified to "20231009123132333".
[0099] This application also proposes a data verification method, such as Figure 2 As shown, the following steps are included:
[0100] S301: Obtain a data set to be verified.
[0101] Specifically, the data set to be verified is a data set whose flow path and data content need to be verified after the data set to be circulated in the data processing method embodiment stops circulating. The verification can be performed after the data set has completed all the computing power nodes that are expected to circulate in the computing network, or it can be verified in the middle of the circulation process.
[0102] S302: Parse the data set to be verified to obtain a coloring value sequence to be verified, wherein the coloring value sequence to be verified includes corresponding coloring values of the computing power nodes where the data set to be verified actually flows, and the coloring values are calculated based on the characteristic values of the computing power nodes and the coloring value parameter range.
[0103] Specifically, after the data set to be verified circulates in the computing network, it carries the coloring value information of the computing power nodes it flows through. By parsing the data set to be verified, a coloring value sequence can be obtained. The coloring value sequence includes both the coloring values of the computing power nodes through which the data set to be verified actually flows, and also indicates the actual flow path of the data set to be verified in the above-mentioned computing power nodes.
[0104] S303: Obtain a target coloring value sequence, wherein the target coloring value sequence includes corresponding coloring values of the computing power nodes to which the to-be-verified data set should flow.
[0105] Specifically, the data set to be verified is pre-set with a flow path, and the coloring values of the computing power nodes on the flow path are known. Therefore, the target coloring value sequence can be obtained through the computing network brain, or by table lookup and other methods.
[0106] S304: Confirming the security of the data set to be verified based on the comparison result between the coloring value sequence to be verified and the target coloring value sequence.
[0107] Specifically, by comparing the coloring value sequence to be verified with the target coloring value sequence, it is possible to determine whether the computing power node through which the data set to be verified actually circulates is the same as the computing power node through which it should circulate, and whether the order of their circulation is consistent. Its essence is to confirm whether the computing power node information carried by the data set to be verified meets expectations.
[0108] In a preferred embodiment, the coloring value sequence to be verified is compared with the target coloring value sequence. If the coloring value sequence to be verified contains the target coloring value sequence and the order of the two is consistent, it is confirmed that the data set to be verified has passed the security verification; otherwise, it is confirmed that the data set to be verified has not passed the security verification.
[0109] Specifically, in the process of comparing the coloring value sequence to be verified with the target coloring value sequence, the following situations may occur:
[0110] (1) If the coloring value sequence to be verified contains all the coloring values in the target coloring value sequence, and the order of the coloring values is consistent with the order of the target coloring value sequence, it can be confirmed that the current data set to be verified has passed the data integrity test, and the flow link of the data set to be verified is carried out according to the planned path.
[0111] (2) If the coloring value sequence to be verified contains the coloring values in the target coloring value sequence, but the order of the coloring values is inconsistent with the order of the target coloring value sequence, it can be confirmed that the current data set to be verified has passed the data integrity test, but the flow link of the data set to be verified has not been carried out according to the planned path. At this time, the data to be verified can be traced according to the coloring value sequence to be verified, and the node location that may have data security risks can be queried.
[0112] (3) If the coloring value sequence to be verified does not contain or only contains part of the coloring values in the target coloring value sequence, it is confirmed that the current data set to be verified has failed the integrity verification. The data set to be verified has been deleted, added, tampered with, etc., and needs to be checked in time.
[0113] In a preferred embodiment, parsing the data set to be verified to obtain a sequence of dye values to be verified further includes:
[0114] The data set to be verified is grouped according to a preset grouping interval to obtain a plurality of grouped data to be verified, wherein the grouping interval is positively correlated with the size of the dyeing value parameter range;
[0115] Calculate the prime number sequence for each grouped data;
[0116] Screening all prime number sequences to obtain the staining value sequence to be verified;
[0117] Wherein, the method for calculating a prime number sequence of grouped data comprises:
[0118] The jth column of each tuple in a grouped data is used as a data column to be parsed, and the data column to be parsed is numerically processed to obtain a parsing position value of each tuple;
[0119] The sum of the parsed position values of all tuples in the grouped data is prime factorized to obtain a prime number sequence of the grouped data.
[0120] Among them, according to the size of the coloring value parameter range, the prime number sequence of all the grouped data to be verified is screened to obtain the coloring value sequence to be verified, including:
[0121] Count the frequency of occurrence of prime numbers contained in all prime number sequences;
[0122] Prime numbers that are not within the coloring value parameter range and prime numbers that are less than a preset frequency threshold are removed to obtain the coloring value sequence to be verified.
[0123] Specifically, the method for grouping the data set to be verified and obtaining the parsed position value is consistent with the method for grouping the data set to be circulated and obtaining the embedded position value. Its implementation can refer to the implementation of the data processing method in this application, and will not be repeated here. In essence, the parsing process of the grouped data to be verified is the reverse process of the method for grouping the data set to be circulated and obtaining the embedded position value in this application.
[0124] Specifically, if all tuples in a group are {A1, A2, ..., A n}, select the jth column as the data column to be verified, then the attribute of the jth column of the first tuple is expressed as A 1j After the specified part of the attribute value is processed numerically, the resulting value is a 1j . Calculate the sum Decompose M into prime numbers to obtain a prime number sequence {Y1, Y2, ..., Y n}.
[0125] All the grouped prime number sequences {Y1, Y2, ..., Y n}, remove prime numbers with a frequency less than the preset frequency threshold, and remove prime numbers that are not within the coloring value parameter range. The prime number sequence after screening is the coloring value sequence of the group. That is, the coloring value sequence extracted from the data set is formed by counting and counting the prime numbers that account for the vast majority.
[0126] In a specific example, the last 3 digits of the second column of all the data in the verification group data are numerically processed to calculate the sum We get M=374760, and perform prime number decomposition on M, M=347*2*2*2*5*3*3*3, then the prime number sequence obtained is {347, 2, 3, 5}.
[0127] In another example, if M=375454, M is prime-factored to M=347*541*2, and the resulting prime number sequence is {347, 541, 2}.
[0128] Get the prime number sequence {347, 541, 2, ..., 5} of all the group data to be verified, and count the prime numbers therein, and remove the prime numbers whose frequency of occurrence is less than the preset frequency threshold. According to the coloring value parameter range, the prime numbers that are not within the coloring value parameter range are removed. In the embodiment of the present application, the frequency threshold is set to 2, and the coloring value parameter range is 100-1000, that is, the prime numbers that only appear once and the values that exceed the maximum range value of the coloring value parameter 1000 and are less than the minimum range value of the coloring value parameter 100 are removed, and the prime number sequence after screening is the coloring value sequence of the group data to be verified. For example, for the prime number sequence {347, 2, 3, 5}, {347} is obtained after screening, and for the prime number sequence {347, 541, 2}, {347, 541} is obtained after screening.
[0129] The coloring value sequence extracted from the data set composed of prime numbers with the majority of count statistics is confirmed as the coloring sequence to be verified. For example, if the current data set to be verified includes 100 grouped data, of which 347 appears 99 times, 541 appears 98 times, and 101 appears 4 times, then the coloring sequence to be verified is confirmed to be {347, 541}.
[0130] In a preferred example, by comparing the coloring value sequence of the group data to be verified with the coloring value sequence of the entire data set to be verified, the security of the group data to be verified can be confirmed.
[0131] Specifically, if the coloring value sequence extracted from a group data to be verified is {347, 101}, and does not contain the coloring value sequence {347, 541} extracted from the data set to be verified, it means that the integrity verification of the group data fails, and there is deletion, addition, tampering, etc.
[0132] It should be noted that since unstructured data generally performs file integrity verification through hash value verification methods, the embodiments of the present application are particularly suitable for structured data that cannot be simply verified by taking hash values. Since most of the data calculations performed in the computing power network scenario are structured data, the application scenario described in the embodiments of the present application is a computing power network. In some other examples, the data processing and data verification methods described in this application can also be used in various multi-node data flow scenarios, such as cloud server scenarios.
[0133] In an embodiment of the present application, a data processing method and a data verification method are proposed successively, by receiving a data set to be circulated, and then based on the coloring value of the current computing power node, coloring processing is performed on the data set to be circulated to obtain a colored data set, and then the colored data set is sent to the next computing power node, so as to realize that the data set to be circulated carries the computing power node information; when it is necessary to perform security verification on the data set that has stopped circulating, the data set to be verified is parsed to obtain the coloring value sequence of the computing power node that actually circulates it, and then the coloring value sequence of the computing power node that the data set to be verified should circulate is obtained, and finally, based on the comparison result of the two coloring value sequences, the security of the data set to be verified is confirmed. The embodiment of the present application also groups the data sets in the input computing power network to combat the scenario where a larger data set may be out of order when it is circulated; at the same time, if there is new data in a computing power node, the new data can be directly added using the coloring value embedding method as described in the embodiment of the present application, which is suitable for scenarios where a large data set may be divided into blocks and recombined when it is circulated; and, compared to conventional hash value verification that can only confirm whether a data set has been tampered with, the embodiment of the present application can also determine the location where the data set has been tampered with according to a determined grouping range; the embodiment of the present application can also record the information of the computing power node where the data flows, so as to verify whether the flow link is carried out according to the predetermined allocated computing power node.
[0134] The present application embodiment also provides a data processing device 400, such as Figure 3 As shown, including:
[0135] The data acquisition module 401 is used to receive the data set to be transferred;
[0136] A data coloring module 402 is used to color the data to be transferred based on the coloring value of the current computing power node to obtain a coloring data set, wherein the coloring value is calculated based on the characteristic value of the current computing power node and the coloring value parameter range;
[0137] The data sending module 403 is used to send the dyeing data set to the next computing power node.
[0138] The present application embodiment also provides a data processing device 500, such as Figure 4 As shown, including:
[0139] The verification data acquisition module 501 is used to obtain a data set to be verified;
[0140] The coloring value sequence acquisition module 502 to be verified is used to parse the data set to be verified to obtain the coloring value sequence to be verified, wherein the coloring value sequence to be verified includes the corresponding coloring values of the computing power nodes where the data set to be verified actually flows, and the coloring values are calculated based on the characteristic values of the computing power nodes and the coloring value parameter range;
[0141] A target coloring sequence acquisition module 503 is used to acquire a target coloring value sequence, wherein the target coloring value sequence includes the corresponding coloring values of the computing power nodes to which the to-be-verified data set should flow;
[0142] The security confirmation module 505 is used to confirm the security of the data set to be verified based on the comparison result of the coloring value sequence to be verified and the target coloring value sequence.
[0143] It should be noted that a data processing and data verification device and a data processing and data verification method are both derived from the same inventive concept. For the relevant explanation of a data processing and data verification device, reference can be made to the embodiments of a data processing and data verification method, which will not be repeated here.
[0144] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5As shown. The computing node includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data processing and data verification method is implemented.
[0145] In one embodiment, a computer device is also provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a data processing and data verification method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0146] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, a data processing and data verification method described in any one of the above embodiments is implemented.
[0147] The present invention may take the form of a computer program product implemented on one or more storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-readable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include but are not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
[0148] It should be understood that the embodiments of the present application are not limited to the precise structures described above and shown in the drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the embodiments of the present application is limited only by the appended claims.
[0149] The above-mentioned embodiments only express several implementation methods of the embodiments of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the embodiments of the present application, and these all belong to the protection scope of the embodiments of the present application.
Claims
1. A data processing method, It is characterized in that include: Receive the data set to be transferred; Based on the coloring value of the current computing power node, the data to be circulated is colorized to obtain a coloring data set, wherein the coloring value is calculated based on the characteristic value of the current computing power node and the coloring value parameter range; The dyeing data set is sent to the next computing power node.
2. The data processing method according to claim 1, It is characterized in that The coloring process is performed on the data to be transferred based on the coloring value of the current computing power node to obtain a coloring data set, including: The data set to be circulated is grouped according to a preset grouping interval to obtain a plurality of grouped data, wherein the grouping interval is positively correlated with the size of the dyeing value parameter range; Calculate the coloring fragmentation value of each grouped data; The corresponding dyed slice value is embedded in each grouped data to obtain a dyed data set; The method for calculating the coloring fragmentation value of a grouped data includes: taking the jth column of each tuple in the grouped data as a data column to be embedded, and performing numerical processing on the data column to be embedded to obtain the embedding position value of each tuple; Calculate the product of the coloring values of all computing power nodes that have circulated the data set to be circulated, and obtain the total coloring value Z; The coloring slice value C is calculated according to the total coloring value and the embedded position value, wherein the coloring slice value C satisfies The minimum value of n is the number of tuples contained in the grouped data, a ij is the embedding position value of the i-th tuple.
3. The data processing method according to claim 1 or 2, It is characterized in that The method for calculating the coloring value of the current computing power node includes: Get the computing network task ID of the current computing power node; Encode the characteristic value of the current computing power node and the computing network task ID to obtain intermediate characteristic data; The intermediate feature data is subjected to a modulo operation with respect to the maximum value of the coloring value parameter range. If the remainder is greater than the minimum value of the coloring value parameter range, the prime number closest to the remainder is used as the coloring value of the current computing power node; otherwise, the remainder is used as the coloring value of the current computing power node.
4. The data processing method according to claim 2, It is characterized in that The corresponding dyeing slice value is embedded in each grouped data to obtain a dyeing data set, including: A new tuple is generated in each grouped data, so that the j-th column of the new tuple is the corresponding colored fragment value, and a colored data set is obtained.
5. A data verification method, It is characterized in that include: Get the data set to be verified; Parsing the data set to be verified to obtain a coloring value sequence to be verified, wherein the coloring value sequence to be verified includes the corresponding coloring values of the computing power nodes where the data set to be verified actually flows, and the coloring values are calculated based on the characteristic values of the computing power nodes and the coloring value parameter range; Obtain a target coloring value sequence, wherein the target coloring value sequence includes corresponding coloring values of the computing power nodes to which the to-be-verified data set should flow; The security of the data set to be verified is confirmed based on the comparison result of the dyeing value sequence to be verified and the target dyeing value sequence.
6. The data verification method according to claim 5, It is characterized in that The step of confirming the security of the data set to be verified based on the comparison result of the dyeing value sequence to be verified and the target dyeing value sequence includes: The coloring value sequence to be verified is compared with the target coloring value sequence. If the coloring value sequence to be verified contains the target coloring value sequence and the order of the two is consistent, it is confirmed that the data set to be verified has passed the security verification; otherwise, it is confirmed that the data set to be verified has not passed the security verification.
7. The data verification method according to any one of claims 5 or 6, It is characterized in that The step of parsing the data set to be verified to obtain a sequence of dye values to be verified includes: The data set to be verified is grouped according to a preset grouping interval to obtain a plurality of grouped data to be verified, wherein the grouping interval is positively correlated with the size of the dyeing value parameter range; Calculate the prime number sequence for each grouped data; Screening all prime number sequences to obtain the staining value sequence to be verified; Wherein, the method for calculating a prime number sequence of grouped data comprises: The jth column of each tuple in a grouped data is used as a data column to be parsed, and the data column to be parsed is numerically processed to obtain a parsing position value of each tuple; The sum of the parsed position values of all tuples in the grouped data is prime factorized to obtain a prime number sequence of the grouped data.
8. The data verification method according to claim 7, It is characterized in that The step of screening all prime number sequences to obtain the coloring value sequence to be verified includes: Count the frequency of occurrence of prime numbers contained in all prime number sequences; Prime numbers that are not within the coloring value parameter range and prime numbers that are less than a preset frequency threshold are removed to obtain the coloring value sequence to be verified.
9. A data processing device, It is characterized in that include: A data receiving module, used for receiving the data set to be transferred; A data coloring module, used to perform coloring processing on the data to be circulated based on the coloring value of the current computing power node to obtain a coloring data set, wherein the coloring value is calculated based on the characteristic value of the current computing power node and the coloring value parameter range; The data sending module is used to send the dyeing data set to the next computing power node.
10. A data verification device, It is characterized in that include: A verification data acquisition module is used to obtain the data set to be verified; A verification sequence acquisition module is used to parse the data set to be verified to obtain a coloring value sequence to be verified, wherein the coloring value sequence to be verified includes the corresponding coloring values of the computing power nodes where the data set to be verified actually flows, and the coloring values are calculated based on the characteristic values of the computing power nodes and the coloring value parameter range; A target sequence acquisition module, used to acquire a target coloring value sequence, wherein the target coloring value sequence includes the corresponding coloring values of the computing power nodes to which the to-be-verified data set should flow; The security confirmation module is used to confirm the security of the data set to be verified based on the comparison result of the coloring value sequence to be verified and the target coloring value sequence.
11. A computer device, It is characterized in that The invention comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the steps of the data processing method according to any one of claims 1 to 4, or implements the steps of the data verification method according to any one of claims 5 to 8 when executing the computer program.
12. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, which, when executed, controls the device where the computer-readable storage medium is located to execute the steps of the data processing method according to any one of claims 1 to 4, or to execute the steps of the data verification method according to any one of claims 5 to 8.
