A data tracing method and system for data exchange

By generating and verifying data fingerprints, the problem of difficulty in verifying authenticity and consistency after data exchange in e-government systems is solved, data traceability and version management are realized, and the accuracy and reliability of data exchange are ensured.

CN115766020BActive Publication Date: 2025-09-23NANJING LES INFORMATION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211323606.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-27
Publication Date
2025-09-23
Estimated Expiration
2042-10-27

AI Technical Summary

Technical Problem

In existing e-government systems, it is difficult to verify the authenticity of data, determine the data status, and ensure data consistency after multiple data exchanges. This causes data users to be hesitant to use data with too long an exchange chain, limiting data application.

Method used

A data fingerprint generation algorithm is used to generate data fingerprints, including business data, unique summary information, exchange node information chain and timestamp version. It is processed through symmetric and asymmetric encryption algorithms to form a data fingerprint and perform traceability verification during the exchange process.

Benefits of technology

It realizes real-time and fast verification of data authenticity, determination of data consistency, tracing of data exchange process, acquisition of data version information and ensuring data accuracy in scenarios across multiple exchange nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115766020B_ABST
    Figure CN115766020B_ABST
Patent Text Reader

Abstract

The present invention discloses a data tracing method and system for data exchange, with the following steps: 1) using a data fingerprint generation algorithm to generate a data fingerprint for business data; 2) combining the business data with the data fingerprint for external data exchange; 3) judging whether data exchange is needed again based on business needs, and if so, proceeding to step 4); if not, proceeding to step 5); 4) updating the business data and data fingerprint, and performing external data exchange, and returning to step 3); 5) tracing the data based on the current business data and data fingerprint. The present invention uses the core technology of data fingerprints to solve the problems of verifying the authenticity of business data, determining whether two pieces of data are the same, tracing the data of the business data exchange process, obtaining version information of business data, and obtaining the latest version of data in real time and quickly in scenarios across multiple exchange nodes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data exchange, and in particular relates to a data tracing method and system for data exchange. Background Art

[0002] After years of development, e-government software systems (such as the core data exchange systems of provincial and municipal big data centers and the credit information sharing service platform for the public credit sector) have become large, complex, and data-intensive. E-government data is transmitted and exchanged vertically across multiple levels, such as national, provincial, municipal, and county levels, through exchange nodes. Similarly, data is transmitted and exchanged horizontally across numerous departments and industry organizations within each level through exchange nodes. This multi-level, multi-departmental, and multiple, disorderly, cross-node data exchange can alter business data content due to system failures, character encoding, and data formatting. Data users (especially government departments) citing inaccurate data can lead to complaints or even lawsuits, with serious consequences. Data users, fearing inaccurate data, are hesitant to use data with a long exchange chain (excessive exchanges through exchange nodes). This significantly limits data application and hinders the capabilities of e-government. Therefore, data users urgently need a method to trace data, verify its authenticity, determine its status, and ensure its consistency. Summary of the Invention

[0003] In response to the above-mentioned practical needs, the purpose of the present invention is to provide a data tracing method and system for data exchange, so as to solve the problems in existing e-government systems where it is difficult to verify the authenticity of data, determine the data status, and determine the consistency of data after multiple data exchanges.

[0004] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0005] The data tracing method for data exchange of the present invention comprises the following steps:

[0006] 1) Generate a data fingerprint using a data fingerprint generation algorithm for the business data;

[0007] 2) Combine business data and data fingerprints for external data exchange;

[0008] 3) Determine whether data exchange is needed again based on business needs. If so, proceed to step 4); if not, proceed to step 5);

[0009] 4) Update business data and data fingerprints, and perform external data exchange, and return to step 3);

[0010] 5) Trace data based on current business data and data fingerprints.

[0011] Furthermore, the step 1) includes: data fingerprint content definition and a method for generating data fingerprint;

[0012] Data fingerprint content definition, including: business data, unique summary information, exchange node information chain, and timestamp version;

[0013] Business data: refers to unprocessed business data that can be used directly, abbreviated as ori_data;

[0014] Unique summary information: A unique summary information is generated for business data using a summary algorithm (such as the national secret SM3, MD5, HMAC algorithm, etc.), and then an asymmetric encryption algorithm (such as the national secret SM2, RSA algorithm, etc.) is used to encrypt and sign the unique summary information. The unique summary information thus formed is abbreviated as sm2; it is used to verify the authenticity of data, check whether business data has been tampered with, and determine whether two pieces of data are completely consistent;

[0015] Exchange node information chain: After each exchange node system generates its own exchange node information, it is connected and added in series, abbreviated as node_chain; it is used to locate the location of business data in each layer of system to find the source of the data;

[0016] Timestamp version: used to record the time and version of business data. When business data ori_data is generated or modified, the corresponding timestamp version information will also be changed. The timestamp in the timestamp version is recorded using the Unix / Linux integer timestamp, represented by "time", and the version information is recorded using integers 1, 2, ..., N, represented by "ver". The timestamp version is abbreviated as "time_ver".

[0017] The above unique summary information sm2, exchange node information chain node_chain, and timestamp version time_ver are combined into a complete data fingerprint, abbreviated as data_fingerprint; it is encrypted using a symmetric encryption algorithm (such as the national secret SM4, DES algorithm, etc.) before it can be exchanged and used externally. The encrypted data fingerprint is abbreviated as sm4 (data_fingerprint);

[0018] The method of generating data fingerprint is specifically expressed as follows:

[0019] The business data ori_data is stored in the form of a string. Once the business data in the string form is generated, it cannot be modified without changing the version.

[0020] Use a message digest algorithm (such as the national secret SM2, MD5, HMAC algorithm, etc.) to generate unique summary information sm3 (ori_data) for the business data and store it in string form;

[0021] Use an asymmetric encryption algorithm (such as the national secret SM2, RSA algorithm, etc.) to sign and encrypt the unique summary information obtained above to form sm2(sm3(ori_data)) and store it as a string;

[0022] Switch node 1 stores its pre-assigned node number node_id(1) in string form;

[0023] Switching node 1 compiles the important processing process and resource information within the node that is meaningful for data traceability into the node processing chain information node_proc(…), where … represents the important processing process information of the actual data;

[0024] After combining the switching node number node_id(1) and the processing chain information node_proc(…) in the switching node into the switching node information node(1), the switching node information chain node_chain(node(1)) including only the switching node 1 information is generated.

[0025] Generate version information ver(1) for the business data, where 1 represents the initial version 1;

[0026] Generate the Unix / Linux timestamp time from the current time;

[0027] Combine the version and timestamp to generate the timestamp version time_ver(time,ver);

[0028] Combine the unique summary information sm2(sm3(ori_data)), the exchange node information chain node_chain(node(1)), and the timestamp version time_ver(time,ver(1)) generated above to generate the plaintext data fingerprint information data_fingerprint;

[0029] After encrypting data_fingerprint using a symmetric encryption algorithm (such as the national secret SM4 algorithm, DES algorithm, etc.), use base64 to generate an ASCII string to facilitate subsequent data exchange.

[0030] Furthermore, the step 1) also includes: using a message digest algorithm to generate unique summary information, and then using an asymmetric encryption algorithm to sign the generated unique summary information; sm2(sm3(ori_data)) is used to represent the signed unique summary information, wherein ori_data represents business data, sm3(ori_data) represents the unique summary information generated by the business data using the message digest algorithm, and sm2(sm3(ori_data)) represents the encryption of the generated unique summary information using an asymmetric encryption algorithm.

[0031] Furthermore, the exchange node information in the exchange node information chain includes: node identification and important link information;

[0032] Node identifiers are cataloged and pre-allocated by the competent authority, and node_id(i) is used to represent the node identifier of the i-th node;

[0033] Important link information is generated by each switching node by concatenating the important data processing process information within the corresponding node; important link information can be expressed as: node_proc(turn,add,db,…), where turn, add, db,… are important link information, turn represents data conversion information, add represents data creation, and db represents important database information. Concatenating turn, add, db,… in sequence forms the important link information node_proc(turn,add,db,…). The processing chain information within the i-th node is abbreviated as node_proc(i);

[0034] The exchange node information is expressed as: node(node_id(i),node_proc(i)), where i represents the node number, abbreviated as node(i);

[0035] The exchange node information is connected in series to form an exchange node information chain, which is expressed as:

[0036] node_chain(node(1),node(2),node(i),…), where 1 represents the switch node with sequence number 1, and i represents the switch node with sequence number i, abbreviated as node_chain.

[0037] Furthermore, the step 2) specifically includes:

[0038] 21) Combine business data and data fingerprint into a whole;

[0039] After the data fingerprint is generated, the business data ori_data and the symmetrically encrypted sm4 (data_fingerprint) are separated by special symbols that do not appear in the data to generate the exchange data ori_data|sm4 (data_fingerprint) that can be used for external data exchange;

[0040] 22) Conduct external data exchange;

[0041] Data exchange is carried out using data transmission methods such as files, library tables, and program interfaces.

[0042] Furthermore, the step 4) specifically includes:

[0043] 41) The method for adding or supplementing the data fingerprint by the switching node n without modifying the service data is as follows:

[0044] Keep the business data ori_data stored in string format;

[0045] Use the symmetric encryption algorithm to decrypt the received data fingerprint, obtain the unique summary information sm2(ori_data), exchange the node information chain node_chain(node(1),*) and the timestamp version time_ver(time,ver), where * represents the possible intermediate node information);

[0046] Use an asymmetric encryption algorithm to decrypt and verify the signature of the unique summary information; if decryption is unsuccessful, exit;

[0047] Use the message digest algorithm to generate unique summary information for the business data, and compare the newly generated unique summary information with the unique summary information sm2 (ori_data) in the data fingerprint; if they are different, it means that the business data has been tampered with, and then exit;

[0048] Switching node n (representing the nth switching node) stores its pre-assigned node number node_id(n) in the form of a string;

[0049] The exchange node n compiles the important processing process and resource information within the node that is meaningful for data traceability into the node processing chain information node_proc(…, share, …), where share represents data exchange and … represents the important processing process information of the actual data;

[0050] After combining the node number node_id(n) and the node processing chain information node_proc(…, share, …) into the exchange node n information node(n), it is added to the exchange node information chain to form the exchange node information chain node_chain(node(1),*,node(n)), where * represents the possible intermediate node information;

[0051] Generate version information ver(n) for business data, where n represents the version information;

[0052] Regenerate the current time into the Unix / Linux timestamp time;

[0053] Combine the version and timestamp to generate the timestamp version time_ver(time,n);

[0054] Combine the unique summary information sm2 related to the data fingerprint, the exchange node information chain node_chain(node(1),*,node(n)), and the timestamp version time_ver(time,n) to generate the data fingerprint information data_fingerprint of the nth iteration;

[0055] Use the symmetric encryption algorithm to encrypt the data fingerprint information data_fingerprint of the nth iteration to generate sm4(data_fingerprint);

[0056] Combine the business data and the fingerprint data of the nth iteration into a new ori_data|sm4(data_fingerprint) and exchange the data externally;

[0057] 42) When the switching node m modifies the service data, the method for adding or supplementing the data fingerprint is as follows:

[0058] Use the symmetric encryption algorithm to decrypt the received data fingerprint and obtain the unique summary information sm2(ori_data), exchange the node information chain node_chain(node(1),*) and the timestamp version time_ver(time,ver), where * represents the possible intermediate node information;

[0059] Use an asymmetric encryption algorithm to decrypt and verify the signature of the unique summary information; if decryption is unsuccessful, exit;

[0060] Use the message digest algorithm to generate unique summary information for the business data, and compare the newly generated unique summary information with the unique summary information sm2 (ori_data) in the data fingerprint; if they are different, it means that the business data has been tampered with, and then exit;

[0061] Modify the business data to form the modified business data ori_data;

[0062] Generate unique summary information sm3 (ori_data) for the modified business data;

[0063] Use an asymmetric encryption algorithm to encrypt the unique summary information sm3 (ori_data) as a data signature to generate sm2 (sm3 (ori_data));

[0064] The switching node m stores its pre-assigned node number node_id(m) in the form of a string;

[0065] The exchange node m generates the important processing process and resource information of the node that is meaningful for data traceability and compiles it into the node processing chain information node_proc(…,modify,…), where modify indicates modifying data and … indicates important processing process information of the actual data.

[0066] After combining the node number node_id(m) and the node processing chain information node_proc(...) into the exchange node m information node(m), it is added to the exchange node information chain to form the exchange node information chain

[0067] node_chain(node(1),*,node(m)), where * indicates the possible intermediate node information;

[0068] Generate version information ver(m) for the modified business data, where m represents version m;

[0069] Regenerate the current time into the Unix / Linux timestamp time;

[0070] Combine the version and timestamp version to generate the timestamp version time_ver(time,m);

[0071] Combine the unique summary information sm2 related to the data fingerprint, the exchange node information chain node_chain(node(1),*,node(m)), and the timestamp version time_ver(time,m) to generate the data fingerprint information data_fingerprint of the mth iteration;

[0072] Use the symmetric encryption algorithm to encrypt the data fingerprint information data_fingerprint of the mth iteration to generate sm4(data_fingerprint);

[0073] Combine the modified business data and the fingerprint data of the mth iteration into a new ori_data|sm4(data_fingerprint) and exchange the data externally;

[0074] 43) Conduct external data exchange;

[0075] Data exchange is carried out using data transmission methods such as files, library tables, and program interfaces.

[0076] It should be noted that step 41) and step 42) exist separately or alternately, thereby forming a long exchange node information chain node_chain (node(1),…,node(n),…,node(m)), in which the node information n that does not modify the business data and the node information m that modifies the business data are in the exchange node information chain in the order of actual exchange and processing.

[0077] Furthermore, the data tracing in step 5) specifically includes: verifying the authenticity of the data, determining whether two pieces of data are identical, tracing the business data exchange process, obtaining the version information of the business data, and obtaining the latest version of the data; specifically as follows:

[0078] 51) Verify data authenticity;

[0079] 511) receiving business data and data fingerprint;

[0080] 512) Use the symmetric encryption algorithm to decrypt the data fingerprint to obtain: unique summary information sm2, exchange node information chain node_chain (node(1),…,node(j)), timestamp version time_ver (time,ver);

[0081] 513) Use an asymmetric encryption algorithm to decrypt the unique summary information in the data fingerprint to obtain sm3(ori_data);

[0082] 514) Using a message digest algorithm to regenerate unique summary information for the business data;

[0083] 515) Compare the unique summary information in step 513) with that in step 514); if they are different, it indicates that the business data has been tampered with; if they are the same, it indicates that it has not been tampered with;

[0084] 516) Returning the comparison result of step 515) to the caller of the fingerprint service;

[0085] 52) Determine whether two pieces of data are the same;

[0086] 521) Receive two pieces of business data and data fingerprints, ori_data(1)|data_fingerprint(1) and ori_data(2)|data_fingerprint(2);

[0087] 522) Decrypt the data fingerprint portion of ori_data(1)|data_fingerprint(1) using a symmetric encryption algorithm to obtain the unique summary information sm3(ori_data(1));

[0088] 523) Decrypt the data fingerprint portion of ori_data(2)|data_fingerprint(2) using a symmetric encryption algorithm to obtain the unique summary information sm3(ori_data(2));

[0089] 524) Compare sm3(ori_data(1)) and sm3(ori_data(2)). If they are the same, the two data are the same; otherwise, the two data are different.

[0090] 525) returning the comparison result of step 524) to the caller of the fingerprint service;

[0091] 53) Trace the business data exchange process;

[0092] 531) receiving business data and data fingerprint;

[0093] 532) Use the symmetric encryption algorithm to decrypt the data fingerprint to obtain: unique summary information sm2, exchange node information chain node_chain(node(1),…,node(j)), timestamp version time_ver(time,ver);

[0094] 533) Exchange node information chain node_chain(node(1),…,node(j)) to extract node information of node_id(j) (note: node_id(j) includes node(node_id(j),node_proc(j)));

[0095] 534) By querying the node code table of the overall catalog, the node information is obtained from node_id(j), and the key operation information in the node is obtained from node_proc(j), and expressed in natural language that can be understood by the user;

[0096] 535) Repeat step 534) for nodes node(1) to node(j), and concatenate them into natural language in the order of the nodes;

[0097] 536) Returning the result of step 535) to the caller of the fingerprint service;

[0098] 54) Obtaining version information of business data;

[0099] 541) receiving business data and data fingerprint;

[0100] 542) Use the symmetric encryption algorithm to decrypt the data fingerprint to obtain: unique summary information sm2, exchange node information chain node_chain(node(1),…,node(j)), timestamp version time_ver(time,ver);

[0101] 543) Returning the timestamp version in step 542) to the caller of the fingerprint service;

[0102] 55) Get the latest version of data;

[0103] 551) receiving business data and data fingerprint;

[0104] 552) Use the symmetric encryption algorithm to decrypt the data fingerprint to obtain: unique summary information sm2, exchange node information chain node_chain(node(1),…,node(j)), timestamp version time_ver(time,ver);

[0105] 553) Get the node information node(j) of the last exchange node j from the exchange node information chain node_chain(node(1),…,node(j));

[0106] 554) Get the node number node_id(j) from the node information node(j);

[0107] 555) Use the node number node_id(j) to query the node code table of the overall catalog to obtain the node information;

[0108] 556) Query the database of node_id(j) or call the query service provided by node_id(j) to obtain the latest version of the data content;

[0109] 557) returns the data content of step 556) to the caller of the fingerprint service.

[0110] The present invention also provides a data tracing system for data exchange, comprising:

[0111] A data fingerprint generation module is used to generate a data fingerprint for business data using a data fingerprint generation algorithm;

[0112] Data exchange module, used to combine business data and data fingerprints for external data exchange;

[0113] The judgment module is used to determine whether data exchange is needed again based on business needs;

[0114] The data update module is used to update the business data and data fingerprints that need to be exchanged again, and to exchange data with external parties;

[0115] The data traceability module is used to trace data based on current business data and data fingerprints.

[0116] Beneficial effects of the present invention:

[0117] The present invention uses the core technology of data fingerprint to solve the problems of verifying the authenticity of business data, determining whether two pieces of data are identical, tracing the source of the business data exchange process, obtaining version information of business data, and obtaining the latest version of data in real time and quickly in scenarios across multiple exchange nodes. BRIEF DESCRIPTION OF THE DRAWINGS

[0118] Figure 1 Flowchart of an example of the method of the present invention. DETAILED DESCRIPTION

[0119] In order to facilitate understanding by those skilled in the art, the present invention will be further described below with reference to embodiments and drawings. The contents mentioned in the embodiments are not intended to limit the present invention.

[0120] The data tracing method for data exchange of the present invention comprises the following steps:

[0121] 1) Generate a data fingerprint using a data fingerprint generation algorithm for business data; specifically including: data fingerprint content definition and data fingerprint generation method;

[0122] Data fingerprint content definition, including: business data, unique summary information, exchange node information chain, and timestamp version;

[0123] Business data: refers to unprocessed business data that can be used directly, and is represented by the abbreviation ori_data; (e.g., an administrative license data item includes: the name of the licensing unit, the unified credit code of the licensing unit, the issuing authority, the content of the license, the validity period of the license, etc.);

[0124] Unique summary information: The business data is generated using the national secret SM3 summary algorithm, and then the unique summary information is encrypted and signed using the national secret SM2 asymmetric encryption algorithm. The unique summary information thus formed is abbreviated as sm2; it is used to verify the authenticity of data, check whether the business data has been tampered with, and determine whether two pieces of data are completely consistent;

[0125] Exchange node information chain: After each exchange node system generates its own exchange node information, it is added in series to form a chain. It is used to locate the location of business data in each layer of the system to find the source of the data. It is abbreviated as node_chain.

[0126] Timestamp version: used to record the time and version of business data. After the business data ori_data is generated or modified, the corresponding timestamp version information will also be changed. The timestamp in the timestamp version is recorded using the Linux integer timestamp, represented by time. The version information is recorded using integers 1, 2, ..., N, represented by ver. The full timestamp version is expressed as time_ver(time,ver).

[0127] Combine the above sm2, node_chain, and time_ver into a complete data fingerprint, represented by data_fingerprint; the data fingerprint needs to be encrypted using the national secret SM4 algorithm and then exchanged with the business data; after substituting the business data, unique summary information, exchange node information chain, and timestamp version, it becomes:

[0128] sm4(sm2(sm3(ori_data)),node_chain(node(1),node(2),node(n),…),time_ver(time,ver))), abbreviated as: sm4(sm2,node_chain,time_ver), or abbreviated as sm4(data_fingerprint);

[0129] The method of generating data fingerprint is specifically expressed as follows:

[0130] Store the business data ori_data in string format (such as json or xml). Once generated, the business data in string format cannot be modified without changing the version.

[0131] Use the national secret SM3 algorithm to calculate the unique summary information sm3 (ori_data) of the business data and store it in the form of a string;

[0132] Use the national secret SM2 algorithm to encrypt the unique summary information generated above to form sm2(sm3(ori_data)) and store it as a string;

[0133] Switch node 1 stores its pre-assigned node number node_id(1) in string form;

[0134] Exchange node 1 compiles the important processing process and resource information within the node that is meaningful for data traceability into the node processing chain information node_proc(...), where... represents the important processing process information of the actual data (such as turn, add, see the definition of the exchange node information chain);

[0135] After combining the switching node number node_id(1) and the processing chain information node_proc(…) in the switching node into the switching node information node(1), the switching node information chain node_chain(node(1)) including only the switching node 1 information is generated.

[0136] Generate version information ver(1) for the business data, where 1 represents the initial version 1;

[0137] Generate the Unix / Linux timestamp time from the current time;

[0138] Combine the version and timestamp version to generate the timestamp version time_ver(time,ver);

[0139] Combine the unique summary information sm2(sm3(ori_data)), the exchange node information chain node_chain(node(1)), and the timestamp version time_ver(time,ver(1)) generated above to generate the plaintext data fingerprint information data_fingerprint;

[0140] After encrypting data_fingerprint using the national secret SM4 symmetric encryption algorithm, base64 is used to generate an ASCII string to facilitate subsequent data exchange.

[0141] Specifically, the step 1) also includes: using the national secret SM3 message digest algorithm to generate unique summary information, and then using the national secret SM2 asymmetric encryption algorithm to sign the generated unique summary information; sm2(sm3(ori_data)) is used to represent the signed unique summary information, wherein ori_data represents business data, sm3(ori_data) represents the use of the national secret SM3 algorithm to generate unique summary information for the business data, and sm2(sm3(ori_data)) represents the use of the national secret SM2 algorithm to encrypt the generated unique summary information.

[0142] The exchange node information in the exchange node information chain includes: node identification and important link information;

[0143] Node identifiers are cataloged and pre-allocated by the competent authority, and node_id(i) is used to represent the node identifier of the i-th node;

[0144] Important link information is generated by each switching node by concatenating the important data processing process information within the corresponding node; important link information can be expressed as: node_proc(turn,add,db,…), where turn, add, db,… are important link information, turn represents data conversion information, add represents data creation, and db represents important database information. Concatenating turn, add, db,… in sequence forms the important link information node_proc(turn,add,db,…). The processing chain information within the i-th node is abbreviated as node_proc(i);

[0145] The exchange node information is expressed as: node(node_id(i),node_proc(i)), where i represents the node number, abbreviated as node(i);

[0146] The exchange node information is connected in series to form an exchange node information chain, which is expressed as:

[0147] node_chain(node(1),node(2),…,node(i)), where 1 represents the switch node with sequence number 1, and i represents the switch node with sequence number i, abbreviated as node_chain.

[0148] 2) Combine business data and data fingerprints for external data exchange; specifically including:

[0149] 21) Combine business data and data fingerprint into a whole;

[0150] After the data fingerprint is generated, the business data ori_data and sm4 (data_fingerprint) symmetrically encrypted by the national secret SM4 algorithm are separated by special symbols that do not appear in the data (such as "||") to generate the exchange data ori_data||sm4 (data_fingerprint) that can be used for external data exchange;

[0151] 22) Conduct external data exchange;

[0152] Data exchange is carried out using data transmission methods such as files, library tables, and program interfaces.

[0153] 3) Determine whether data exchange is needed again based on business needs. If so, proceed to step 4); if not, proceed to step 5);

[0154] 4) Update business data and data fingerprints, exchange data externally, and return to step 3); the details are as follows:

[0155] 41) The method for adding or supplementing the data fingerprint by the switching node n without modifying the service data is as follows:

[0156] Keep the business data ori_data stored in string format;

[0157] Use the national secret SM4 symmetric encryption algorithm to decrypt the received data fingerprint, obtain the unique summary information sm2(ori_data), exchange node information chain node_chain(node(1),*) (where * represents the possible intermediate node information) and timestamp version time_ver(time,ver) information;

[0158] Use the national secret SM2 asymmetric encryption algorithm to decrypt and verify the signature of the unique summary information; if the decryption is unsuccessful, exit;

[0159] Use the national secret SM3 message digest algorithm to generate unique summary information for the business data, and compare the newly generated unique summary information with the unique summary information sm2 (ori_data) in the data fingerprint; if they are different, it means that the business data has been tampered with, and then exit;

[0160] Switching node n (representing the nth switching node) stores its pre-assigned node number node_id(n) in the form of a string;

[0161] The exchange node n compiles the important processing process and resource information within the node that is meaningful for data traceability into the node processing chain information node_proc(…, share, …), where share represents data exchange and … represents the important processing process information of the actual data;

[0162] After combining the node number node_id(n) and the node processing chain information node_proc(…, share, …) into the exchange node n information node(n), it is added to the exchange node information chain to form the exchange node information chain node_chain(node(1),*,node(n)), where * represents the possible intermediate node information;

[0163] Generate version information ver(n) for business data, where n represents the version information;

[0164] Regenerate the current time into the Unix / Linux timestamp time;

[0165] Combine the version and timestamp to generate the timestamp version time_ver(time,n);

[0166] Combine the unique summary information sm2, information node_chain(node(1),*,node(n)) and timestamp version time_ver(time,n) related to the data fingerprint to generate the data fingerprint information data_fingerprint of the nth iteration;

[0167] Use the SM4 symmetric encryption algorithm to encrypt the data fingerprint information data_fingerprint of the i-th iteration to generate sm4(data_fingerprint);

[0168] Combine the business data and the fingerprint data of the nth iteration into a new ori_data|sm4(data_fingerprint) and exchange the data externally;

[0169] 42) When the switching node m modifies the service data, the method for adding or supplementing the data fingerprint is as follows:

[0170] Use the national secret SM4 symmetric encryption algorithm to decrypt the received data fingerprint and obtain the unique summary information sm2(ori_data), exchange node information chain node_chain(node(1), *) (where * represents the possible intermediate node information), and timestamp version time_ver(time,ver);

[0171] Use the national secret SM2 asymmetric encryption algorithm to decrypt and verify the signature of the unique summary information; if the decryption is unsuccessful, exit;

[0172] Use the national secret SM3 message digest algorithm to generate unique summary information for the business data, and compare the newly generated unique summary information with the unique summary information sm2 (ori_data) in the data fingerprint; if they are different, it means that the business data has been tampered with, and then exit;

[0173] Modify the business data to form the modified business data ori_data;

[0174] Generate unique summary information sm3 (ori_data) for the modified business data;

[0175] Use the national secret SM2 asymmetric encryption algorithm to encrypt the unique summary information sm3(ori_data) as a data signature to generate sm2(sm3(ori_data));

[0176] The switching node m stores its pre-assigned node number node_id(m) in the form of a string;

[0177] The exchange node m generates the important processing process and resource information of the node that is meaningful for data traceability and compiles it into the node processing chain information node_proc(…,modify,…), where modify indicates modifying data and … indicates important processing process information of the actual data.

[0178] After combining the node number node_id(m) and the node processing chain information node_proc(...) into the exchange node m information node(m), it is added to the exchange node information chain to form the exchange node information chain

[0179] node_chain(node(1),*,node(m)), where * represents the possible intermediate node information;

[0180] Generate version information ver(m) for the modified business data, where m represents version m;

[0181] Regenerate the current time into the Unix / Linux timestamp time;

[0182] Combine the version and timestamp version to generate the timestamp version time_ver(time,m);

[0183] Combine the unique summary information sm2 related to the data fingerprint, the exchange node information chain node_chain(node(1),*,node(m)), and the timestamp version time_ver(time,m) to generate the data fingerprint information data_fingerprint of the mth iteration;

[0184] Use the SM4 symmetric encryption algorithm to encrypt the data fingerprint information data_fingerprint of the mth iteration to generate sm4(data_fingerprint);

[0185] Combine the modified business data and the fingerprint data of the mth iteration into a new ori_data|sm4(data_fingerprint) and exchange the data externally;

[0186] 43) Conduct external data exchange;

[0187] Data exchange is carried out using data transmission methods such as files, library tables, and program interfaces.

[0188] It should be noted that step 41) and step 42) exist separately or alternately, thereby forming a long exchange node information chain node_chain (node(1),…,node(n),…,node(m)), in which the node information n that does not modify the business data and the node information m that modifies the business data are in the exchange node information chain in the order of actual exchange and processing.

[0189] 5) Data tracing based on current business data and data fingerprints; data tracing specifically includes: verifying data authenticity, determining whether two pieces of data are identical, tracing the business data exchange process, obtaining business data version information, and obtaining the latest version of the data; details are as follows:

[0190] 51) Verify data authenticity;

[0191] 511) receiving business data and data fingerprint;

[0192] 512) Use the national secret SM4 symmetric encryption algorithm to decrypt the data fingerprint to obtain: unique summary information sm2, exchange node information chain node_chain(node(1),…,node(j)), timestamp version time_ver(time,ver);

[0193] 513) Use the national secret SM2 asymmetric encryption algorithm to decrypt the unique summary information in the data fingerprint and obtain sm3 (ori_data);

[0194] 514) Use the national secret SM3 message digest algorithm to regenerate unique summary information for the business data;

[0195] 515) Compare the unique summary information in step 513) with that in step 514); if they are different, it indicates that the business data has been tampered with; if they are the same, it indicates that it has not been tampered with;

[0196] 516) Returning the comparison result of step 515) to the caller of the fingerprint service;

[0197] 52) Determine whether two pieces of data are the same;

[0198] 521) Receive two pieces of business data and data fingerprints, ori_data(1)|data_fingerprint(1) and ori_data(2)|data_fingerprint(2);

[0199] 522) Decrypt the data fingerprint part of ori_data(1)|data_fingerprint(1) using the national secret SM4 symmetric encryption algorithm to obtain the unique summary information sm3(ori_data(1));

[0200] 523) Decrypt the data fingerprint portion of ori_data(2)|data_fingerprint(2) using the national secret SM4 symmetric encryption algorithm to obtain the unique summary information sm3(ori_data(2));

[0201] 524) Compare sm3(ori_data(1)) and sm3(ori_data(2)). If they are the same, the two data are the same; otherwise, the two data are different.

[0202] 525) returning the comparison result of step 524) to the caller of the fingerprint service;

[0203] 53) Trace the business data exchange process;

[0204] 531) receiving business data and data fingerprint;

[0205] 532) Use the national secret SM4 symmetric encryption algorithm to decrypt the data fingerprint to obtain: unique summary information sm2, exchange node information chain node_chain(node(1),…,node(j)), timestamp version time_ver(time,ver);

[0206] 533) Exchange node information chain node_chain(node(1),…,node(j)) to extract node information of node_id(j) (note: node_id(j) includes node(node_id(j),node_proc(j)));

[0207] 534) By querying the node code table of the overall catalog, the node information is obtained from node_id(j), and the key operation information in the node is obtained from node_proc(j), and expressed in natural language that can be understood by the user;

[0208] 535) Repeat step 534) for nodes node(1) to node(j), and concatenate them into natural language in the order of the nodes;

[0209] 536) Returning the result of step 535) to the caller of the fingerprint service;

[0210] 54) Obtaining version information of business data;

[0211] 541) receiving business data and data fingerprint;

[0212] 542) Use the national secret SM4 symmetric encryption algorithm to decrypt the data fingerprint to obtain: unique summary information sm2, exchange node information chain node_chain(node(1),…,node(j)), timestamp version time_ver(time,ver);

[0213] 543) Returning the timestamp version in step 542) to the caller of the fingerprint service;

[0214] 55) Get the latest version of data;

[0215] 551) receiving business data and data fingerprint;

[0216] 552) Use the national secret SM4 symmetric encryption algorithm to decrypt the data fingerprint to obtain: unique summary information sm2, exchange node information chain node_chain(node(1),…,node(j)), timestamp version time_ver(time,ver);

[0217] 553) Get the node information node(j) of the last exchange node j from the exchange node information chain node_chain(node(1),…,node(j));

[0218] 554) Get the node number node_id(j) from the node information node(j);

[0219] 555) Use the node number node_id(j) to query the node code table of the overall catalog to obtain the node information;

[0220] 556) Query the database of node_id(j) or call the query service provided by node_id(j) to obtain the latest version of the data content;

[0221] 557) returns the data content of step 556) to the caller of the fingerprint service.

[0222] The present invention also provides a data tracing system for data exchange, comprising:

[0223] A data fingerprint generation module is used to generate a data fingerprint for business data using a data fingerprint generation algorithm;

[0224] Data exchange module, used to combine business data and data fingerprints for external data exchange;

[0225] The judgment module is used to determine whether data exchange is needed again based on business needs;

[0226] The data update module is used to update the business data and data fingerprints that need to be exchanged again, and to exchange data with external parties;

[0227] The data traceability module is used to trace data based on current business data and data fingerprints.

[0228] In the example:

[0229] Applied to cross-system data exchange, refer to Figure 1 As shown, if data is exchanged from business system A to business system B, then from business system B to business system C, then from business system C to business system D, and finally business system D performs data traceability.

[0230] Perform the following steps accordingly:

[0231] Business system A executes steps 1) and 2) above, generating a data fingerprint and performing external data exchange;

[0232] Business system B executes steps 3) and 4) above;

[0233] Business system C executes steps 3) and 4) above;

[0234] Business system D executes steps 3) and 5) above;

[0235] Note that business systems B and C are intermediate switching nodes and will iteratively execute steps 3) and 4). Similarly, in real-world applications, this is not limited to business systems B and C; there are more intermediate switching nodes, all of which will iteratively execute steps 3) and 4).

[0236] The present invention has many specific application paths. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements can be made without departing from the principles of the present invention. These improvements should also be considered as the scope of protection of the present invention.

Claims

1. A data tracing method for data exchange, characterized in that: Here are the steps: 1) Generate a data fingerprint using a data fingerprint generation algorithm for the business data; 2) Combine business data and data fingerprints for external data exchange; 3) Determine whether data exchange is needed again based on business needs. If so, proceed to step 4); if not, proceed to step 5); 4) Update business data and data fingerprints, and perform external data exchange, and return to step 3); 5) Data traceability based on current business data and data fingerprints; The step 1) includes: data fingerprint content definition and method for generating data fingerprint; Data fingerprint content definition, including: business data, unique summary information, exchange node information chain, and timestamp version; Business data: refers to unprocessed business data that can be used directly, abbreviated as ori_data; Unique summary information: The unique summary information generated by the digest algorithm for the business data is then encrypted and signed using an asymmetric encryption algorithm to form a unique summary information, abbreviated as sm2; Exchange node information chain: After each exchange node system generates the exchange node information of the node, it is added in series and formed, abbreviated as node_chain; Timestamp version: used to record the time and version of business data. The timestamp in the timestamp version is recorded using the Unix / Linux integer timestamp, represented by "time", and the version information is recorded using integers 1, 2, ..., N, represented by "ver". The timestamp version is abbreviated as "time_ver"; Combine the unique summary information sm2, the exchange node information chain node_chain, and the timestamp version time_ver into a complete data fingerprint, abbreviated as data_fingerprint; use a symmetric encryption algorithm to encrypt it and then exchange it externally. The encrypted data fingerprint is abbreviated as sm4 (data_fingerprint); The method of generating data fingerprint is specifically expressed as follows: The business data ori_data is stored in the form of a string. Once the business data in the string form is generated, it cannot be modified without changing the version. Use the message digest algorithm to generate unique summary information sm3 (ori_data) for the business data and store it in the form of a string; Use an asymmetric encryption algorithm to encrypt the unique summary information obtained above to form sm2(sm3(ori_data)) and store it as a string; Switch node 1 stores its pre-assigned node number node_id(1) in string form; Switching node 1 compiles the important processing process and resource information within the node that is meaningful for data traceability into the node processing chain information node_proc(…), where … represents the important processing process information of the actual data; After combining the switching node number node_id(1) and the processing chain information node_proc(…) in the switching node into the switching node information node(1), the switching node information chain node_chain(node(1)) including only the switching node 1 information is generated. Generate version information ver(1) for the business data, where 1 represents the initial version 1; Generate the Unix / Linux timestamp time from the current time; Combine the version and timestamp to generate the timestamp version time_ver(time,ver); Combine the unique summary information sm2(sm3(ori_data)), the exchange node information chain node_chain(node(1)), and the timestamp version time_ver(time,ver(1)) generated above to generate the plaintext data fingerprint information data_fingerprint; After encrypting data_fingerprint using a symmetric encryption algorithm, base64 is used to generate an ASCII string to facilitate subsequent data exchange; The step 2) specifically includes: 21) Combine business data and data fingerprint into a whole; After the data fingerprint is generated, the business data ori_data and the symmetrically encrypted sm4 (data_fingerprint) are separated by special symbols that do not appear in the data to generate the exchange data ori_data|sm4 (data_fingerprint) that can be used for external data exchange; 22) Conduct external data exchange; Data exchange is carried out using data transmission methods such as files, library tables, and program interfaces; In the step 4), the unique summary information sm2 related to the data fingerprint, the exchange node information chain node_chain(node(1),*,node(n)), and the timestamp version time_ver(time,n) are combined to generate the data fingerprint information data_fingerprint of the nth iteration; Use the symmetric encryption algorithm to encrypt the data fingerprint information data_fingerprint of the nth iteration to generate sm4(data_fingerprint); Combine the business data and the fingerprint data of the nth iteration into a new ori_data|sm4(data_fingerprint) and exchange the data externally; The data tracing in step 5) specifically includes: verifying the authenticity of the data, determining whether two pieces of data are identical, tracing the business data exchange process, obtaining the version information of the business data, and obtaining the latest version of the data; the details are as follows: 51) Verify data authenticity; 52) Determine whether two pieces of data are the same; 53) Trace the business data exchange process; 54) Obtaining version information of business data; 55) Get the latest version data.

2. The data tracing method for data exchange according to claim 1, characterized in that: The step 1) also includes: using a message digest algorithm to generate unique summary information, and then using an asymmetric encryption algorithm to sign the generated unique summary information; sm2(sm3(ori_data)) is used to represent the signed unique summary information, wherein ori_data represents business data, sm3(ori_data) represents the unique summary information generated by the business data using the message digest algorithm, and sm2(sm3(ori_data)) represents the encryption of the generated unique summary information using an asymmetric encryption algorithm.

3. The data tracing method for data exchange according to claim 2, characterized in that: The exchange node information in the exchange node information chain includes: node identification and important link information; Node identifiers are cataloged and pre-allocated by the competent authority, and node_id(i) is used to represent the node identifier of the i-th node; Important link information is generated by each switching node by concatenating the important data processing process information within the corresponding node; important link information is expressed as: node_proc(turn,add,db,…), where turn, add, db,… are important link information, turn represents data conversion information, add represents data creation, and db represents important database information. Concatenating turn, add, db,… in sequence forms the important link information node_proc(turn,add,db,…). The processing chain information within the i-th node is abbreviated as node_proc(i); The exchange node information is expressed as: node(node_id(i),node_proc(i)), where i represents the node number, abbreviated as node(i); The exchange node information is connected in series to form an exchange node information chain, which is expressed as: node_chain(node(1),node(2),node(i),…), where 1 represents the switch node with sequence number 1, and i represents the switch node with sequence number i, abbreviated as node_chain.

4. The data tracing method for data exchange according to claim 3, characterized in that: The step 4) specifically includes: 41) The method for adding or supplementing the data fingerprint by the switching node n without modifying the service data is as follows: Keep the business data ori_data stored in string format; Use the symmetric encryption algorithm to decrypt the received data fingerprint and obtain the unique summary information sm2(sm3(ori_data)), exchange node information chain node_chain(node(1),*) and timestamp version time_ver(time,ver), where * represents the possible intermediate node information; Use an asymmetric encryption algorithm to decrypt and verify the signature of the unique summary information; if decryption is unsuccessful, exit; Use the message digest algorithm to generate unique summary information for the business data, and compare the newly generated unique summary information with the unique summary information sm3 (ori_data) in the data fingerprint; if they are different, it means that the business data has been tampered with, and then exit; The switching node n stores its pre-assigned node number node_id(n) in the form of a string; The exchange node n compiles the important processing process and resource information within the node that is meaningful for data traceability into the node processing chain information node_proc(…, share, …), where share represents data exchange and … represents important processing process information for the data; After combining the node number node_id(n) and the node processing chain information node_proc(…, share, …) into the exchange node n information node(n), it is added to the exchange node information chain to form the exchange node information chain node_chain(node(1),*,node(n)), where * represents the possible intermediate node information; Generate version information ver(n) for business data, where n represents the version information; Regenerate the current time into the Unix / Linux timestamp time; Combine the version and timestamp to generate the timestamp version time_ver(time,n); Combine the unique summary information sm2 related to the data fingerprint, the exchange node information chain node_chain(node(1),*,node(n)), and the timestamp version time_ver(time,n) to generate the data fingerprint information data_fingerprint of the nth iteration; Use the symmetric encryption algorithm to encrypt the data fingerprint information data_fingerprint of the nth iteration to generate sm4(data_fingerprint); Combine the business data and the fingerprint data of the nth iteration into a new ori_data|sm4(data_fingerprint) and exchange the data externally; 42) When the switching node m modifies the service data, the method for adding or supplementing the data fingerprint is as follows: Use the symmetric encryption algorithm to decrypt the received data fingerprint and obtain the unique summary information sm2(ori_data), exchange the node information chain node_chain(node(1),*) and the timestamp version time_ver(time,ver), where * represents the possible intermediate node information; Use an asymmetric encryption algorithm to decrypt and verify the signature of the unique summary information; if decryption is unsuccessful, exit; Use the message digest algorithm to generate unique summary information for the business data, and compare the newly generated unique summary information with the unique summary information sm2 (ori_data) in the data fingerprint; if they are different, it means that the business data has been tampered with, and then exit; Modify the business data to form the modified business data ori_data; Use the message digest algorithm to generate unique summary information sm3(ori_data) for the modified business data; Use an asymmetric encryption algorithm to encrypt the unique summary information sm3 (ori_data) as a data signature to generate sm2 (sm3 (ori_data)); The switching node m stores its pre-assigned node number node_id(m) in the form of a string; The exchange node m generates the important processing process and resource information of the node that is meaningful for data traceability and compiles it into the node processing chain information node_proc(…,modify,…), where modify indicates modifying data and … indicates important processing process information of the actual data. After combining the node number node_id(m) and the node processing chain information node_proc(...) into the exchange node m information node(m), it is added to the exchange node information chain to form the exchange node information chain node_chain(node(1),*,node(m)), where * represents the possible intermediate node information; Generate version information ver(m) for the modified business data, where m represents version m; Regenerate the current time into the Unix / Linux timestamp time; Combine the version and timestamp version to generate the timestamp version time_ver(time,m); Combine the unique summary information sm2 related to the data fingerprint, the exchange node information chain node_chain(node(1),*,node(m)), and the timestamp version time_ver(time,m) to generate the data fingerprint information data_fingerprint of the mth iteration; Use the symmetric encryption algorithm to encrypt the data fingerprint information data_fingerprint of the mth iteration to generate sm4(data_fingerprint); Combine the modified business data and the fingerprint data of the mth iteration into a new ori_data|sm4(data_fingerprint) and exchange the data externally; 43) Conduct external data exchange; Data exchange is carried out using data transmission methods such as files, library tables, and program interfaces.

5. The data tracing method for data exchange according to claim 4, characterized in that: It also includes: step 41) and step 42) exist separately or alternately, thereby forming a long exchange node information chain node_chain (node(1),…,node(n),…,node(m)), wherein the node information n that does not modify the business data and the node information m that modifies the business data are in the exchange node information chain in the order of actual exchange and processing.

6. The data tracing method for data exchange according to claim 5, characterized in that: The data tracing in step 5) specifically includes: verifying the authenticity of the data, determining whether two pieces of data are identical, tracing the business data exchange process, obtaining the version information of the business data, and obtaining the latest version of the data; the details are as follows: 51) Verify data authenticity; 511) receiving business data and data fingerprint; 512) Use the symmetric encryption algorithm to decrypt the data fingerprint to obtain: unique summary information sm2, exchange node information chain node_chain (node(1),…,node(j)), timestamp version time_ver (time,ver); 513) Use an asymmetric encryption algorithm to decrypt the unique summary information in the data fingerprint to obtain sm3(ori_data); 514) Using a message digest algorithm to regenerate unique summary information for the business data; 515) Compare the unique summary information in step 513) with that in step 514); if they are different, it indicates that the business data has been tampered with; if they are the same, it indicates that it has not been tampered with; 516) Returning the comparison result of step 515) to the caller of the fingerprint service; 52) Determine whether two pieces of data are the same; 521) Receive two pieces of business data and data fingerprints, ori_data(1)|data_fingerprint(1) and ori_data(2)|data_fingerprint(2); 522) Decrypt the data fingerprint portion of ori_data(1)|data_fingerprint(1) using a symmetric encryption algorithm to obtain the unique summary information sm3(ori_data(1)); 523) Decrypt the data fingerprint portion of ori_data(2)|data_fingerprint(2) using a symmetric encryption algorithm to obtain the unique summary information sm3(ori_data(2)); 524) Compare sm3(ori_data(1)) and sm3(ori_data(2)). If they are the same, the two data are the same; otherwise, the two data are different. 525) returning the comparison result of step 524) to the caller of the fingerprint service; 53) Trace the business data exchange process; 531) receiving business data and data fingerprint; 532) Use the symmetric encryption algorithm to decrypt the data fingerprint to obtain: unique summary information sm2, exchange node information chain node_chain(node(1),…,node(j)), timestamp version time_ver(time,ver); 533) Exchange node information chain node_chain(node(1),…,node(j)) to extract node information of node_id(j) (note: node_id(j) includes node(node_id(j),node_proc(j))); 534) By querying the node code table of the overall catalog, the node information is obtained from node_id(j), and the key operation information in the node is obtained from node_proc(j), and expressed in natural language that can be understood by the user; 535) Repeat step 534) for nodes node(1) to node(j), and concatenate them into natural language in the order of the nodes; 536) Returning the result of step 535) to the caller of the fingerprint service; 54) Obtaining version information of business data; 541) receiving business data and data fingerprint; 542) Use the symmetric encryption algorithm to decrypt the data fingerprint to obtain: unique summary information sm2, exchange node information chain node_chain(node(1),…,node(j)), timestamp version time_ver(time,ver); 543) Returning the timestamp version in step 542) to the caller of the fingerprint service; 55) Get the latest version of data; 551) receiving business data and data fingerprint; 552) Use the symmetric encryption algorithm to decrypt the data fingerprint to obtain: unique summary information sm2, exchange node information chain node_chain(node(1),…,node(j)), timestamp version time_ver(time,ver); 553) Get the node information node(j) of the last exchange node j from the exchange node information chain node_chain(node(1),…,node(j)); 554) Get the node number node_id(j) from the node information node(j); 555) Use the node number node_id(j) to query the node code table of the overall catalog to obtain the node information; 556) Query the database of node_id(n) or call the query service provided by node_id(j) to obtain the latest version of the data content; 557) returns the data content of step 556) to the caller of the fingerprint service.

7. A data traceability system for data exchange, characterized in that: include: A data fingerprint generation module is used to generate a data fingerprint for business data using a data fingerprint generation algorithm; Data exchange module, used to combine business data and data fingerprints for external data exchange; The judgment module is used to determine whether data exchange is needed again based on business needs; The data update module is used to update the business data and data fingerprints that need to be exchanged again, and to exchange data with external parties; Data tracing module, used to trace data based on current business data and data fingerprints; The data fingerprint generation module specifically includes: data fingerprint content definition and data fingerprint generation method; Data fingerprint content definition, including: business data, unique summary information, exchange node information chain, and timestamp version; Business data: refers to unprocessed business data that can be used directly, abbreviated as ori_data; Unique summary information: The unique summary information generated by the digest algorithm for the business data is then encrypted and signed using an asymmetric encryption algorithm to form a unique summary information, abbreviated as sm2; Exchange node information chain: After each exchange node system generates the exchange node information of the node, it is added in series and formed, abbreviated as node_chain; Timestamp version: used to record the time and version of business data. The timestamp in the timestamp version is recorded using the Unix / Linux integer timestamp, represented by "time", and the version information is recorded using integers 1, 2, ..., N, represented by "ver". The timestamp version is abbreviated as "time_ver"; Combine the unique summary information sm2, the exchange node information chain node_chain, and the timestamp version time_ver into a complete data fingerprint, abbreviated as data_fingerprint; use a symmetric encryption algorithm to encrypt it and then exchange it externally. The encrypted data fingerprint is abbreviated as sm4 (data_fingerprint); The method of generating data fingerprint is specifically expressed as follows: The business data ori_data is stored in the form of a string. Once the business data in the string form is generated, it cannot be modified without changing the version. Use the message digest algorithm to generate unique summary information sm3 (ori_data) for the business data and store it in the form of a string; Use an asymmetric encryption algorithm to encrypt the unique summary information obtained above to form sm2(sm3(ori_data)) and store it as a string; Switch node 1 stores its pre-assigned node number node_id(1) in string form; Switching node 1 compiles the important processing process and resource information within the node that is meaningful for data traceability into the node processing chain information node_proc(…), where … represents the important processing process information of the actual data; After combining the switching node number node_id(1) and the processing chain information node_proc(…) in the switching node into the switching node information node(1), the switching node information chain node_chain(node(1)) including only the switching node 1 information is generated. Generate version information ver(1) for the business data, where 1 represents the initial version 1; Generate the Unix / Linux timestamp time from the current time; Combine the version and timestamp to generate the timestamp version time_ver(time,ver); Combine the unique summary information sm2(sm3(ori_data)), the exchange node information chain node_chain(node(1)), and the timestamp version time_ver(time,ver(1)) generated above to generate the plaintext data fingerprint information data_fingerprint; After encrypting data_fingerprint using a symmetric encryption algorithm, base64 is used to generate an ASCII string to facilitate subsequent data exchange; The data exchange module specifically includes: Combine business data and data fingerprints into a whole; After the data fingerprint is generated, the business data ori_data and the symmetrically encrypted sm4 (data_fingerprint) are separated by special symbols that do not appear in the data to generate the exchange data ori_data|sm4 (data_fingerprint) that can be used for external data exchange; Conduct external data exchange; Data exchange is carried out using data transmission methods such as files, library tables, and program interfaces; The data update module combines the unique summary information sm2 related to the data fingerprint, the exchange node information chain node_chain(node(1),*,node(n)), and the timestamp version time_ver(time,n) to generate the data fingerprint information data_fingerprint of the nth iteration; Use the symmetric encryption algorithm to encrypt the data fingerprint information data_fingerprint of the nth iteration to generate sm4(data_fingerprint); Combine the business data and the fingerprint data of the nth iteration into a new ori_data|sm4(data_fingerprint) and exchange the data externally; The data traceability specifically includes: verifying the authenticity of data, determining whether two pieces of data are identical, tracing the business data exchange process, obtaining the version information of business data, and obtaining the latest version of data; the details are as follows: Verify data authenticity; Determine whether two pieces of data are the same; Trace the business data exchange process; Get the version information of business data; Get the latest version data.

Citation Information

Patent Citations

  • Block chain based business data tracing method, device and system and storage equipment

    CN107391735A

  • Distributed storage and dual-verification block chain method and device and storage medium

    CN114866257A