Modification Process Determination Method, Apparatus, Device, and Storage Medium
By using hash instead of ciphertext, the plaintext of risk information records generates hash values and uploads it to the blockchain, solving the problems of low efficiency and poor security of risk information traceability, and achieving efficient and secure risk information traceability.
Patent Information
- Application Number
- CN202210182121.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-25
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2042-02-25
AI Technical Summary
In the prior art, risk information traceability is low and has poor security, ciphertexts occupy a large amount of storage space, and there is a risk of being cracked.
By using hash instead of ciphertext, the plaintext of the risk information is recorded to generate a hash value and upload it to the blockchain to determine the modification process information of the target record.
It improves the efficiency of risk information traceability, reduces the risk of being cracked, and improves the security of shared information.
Smart Images

Figure CN114663204B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of traceability systems, and in particular, to a method, device, equipment, and storage medium for determining a modification process. Background Art
[0002] Risk information sharing means that each financial institution shares the risk information of its own business for other institutions to query and use. For any piece of risk information, each financial institution can modify its content. If there are quality problems with the shared risk information, it is necessary to trace the risk information to clarify which part of the data in the risk information has problems.
[0003] In the related art, a blockchain is often used to trace risk information. Specifically, a unique number is assigned to the risk information, and then the content of the risk information is encrypted to generate a ciphertext. Finally, the unique number and ciphertext of the risk information are shared on the blockchain. Subsequent operations on this piece of risk information are to share the unique number and the changed ciphertext on the blockchain. When querying, the unique number is used as an index to query all records of this piece of risk information for traceability. Since the size of the ciphertext is related to the amount of content of the risk information, if the content of the risk information is large, the corresponding ciphertext is large, which will occupy a large storage space, thereby resulting in poor efficiency of risk information traceability. Summary of the Invention
[0004] The present application provides a method, device, equipment, and storage medium for determining a modification process, which improves the efficiency of risk information traceability and the security of shared information.
[0005] In a first aspect, an embodiment of the present application provides a method for determining a modification process, including:
[0006] Determine a target record, where the target record includes a target plaintext and target basic information, and the target plaintext is obtained by modifying the target basic information;
[0007] According to the target basic information, determine at least one modification record and an initial record corresponding to the target record in the business system. The initial record includes an initial plaintext, and the at least one modification record is a record for modifying the initial plaintext to the target plaintext;
[0008] According to the at least one modification record and the initial record corresponding to the target record, determine modification process information for modifying the initial plaintext to the target plaintext.
[0009] In a possible implementation manner, determining at least one modification record and an initial record corresponding to the target record in the business system according to the target basic information includes:
[0010] Determine the first modification record in the business system according to the target basic information, where the current information of the first modification record is the target basic information;
[0011] Determine the (i + 1)-th modification record in the business system according to the basic information in the i-th modification record, where the current information of the (i + 1)-th modification record is the basic information in the i-th modification record;
[0012] Let i take 1, 2,... in sequence. Until the determined modification record does not include basic information, determine the modification record without basic information as the initial record.
[0013] In a possible implementation manner, the i-th modification record includes current information and basic information;
[0014] The current information in the i-th modification record includes: the i-th plaintext, the i-th hash value corresponding to the i-th plaintext, and the i-th moment when the i-th hash value is uploaded to the blockchain node;
[0015] The basic information in the i-th modification record includes: the (i + 1)-th hash value corresponding to the (i + 1)-th plaintext, and the (i + 1)-th moment when the (i + 1)-th hash value is uploaded to the blockchain node;
[0016] Wherein, the i-th plaintext is obtained by modifying the (i + 1)-th plaintext.
[0017] In a possible implementation manner, according to at least one modification record and the initial record corresponding to the target record, determine the modification process information for modifying the initial plaintext to the target plaintext, including:
[0018] Determine the modified plaintext and modification information corresponding to each modification record, where the modification information includes the moment when the hash value corresponding to the modified plaintext is uploaded to the blockchain node and the modifier information, and the modified plaintext is the plaintext after being modified by the modification record;
[0019] Determine the initial plaintext and initial information in the initial record, where the initial information includes the moment when the hash value corresponding to the initial plaintext is uploaded to the blockchain node and the writer information;
[0020] Determine that the modification process information includes: the initial plaintext, the initial information, and the modified plaintext and modification information corresponding to each modification record.
[0021] In a possible implementation manner, the method further includes:
[0022] Obtain the remote hash value corresponding to the initial record and the remote hash value corresponding to each modification record at the blockchain node;
[0023] The business system obtains the local hash value corresponding to the initial record and the local hash value corresponding to each modification record;
[0024] Based on the remote hash value corresponding to the initial record and the local hash value corresponding to the initial record, determine whether the initial plaintext stored in the business system has been tampered with;
[0025] Based on the remote hash value corresponding to each modification record and the local hash value corresponding to each modification record, determine whether the modified plaintext stored in the business system has been tampered with.
[0026] In a possible implementation manner, based on the remote hash value corresponding to the initial record and the local hash value corresponding to the initial record, determining whether the initial plaintext stored in the business system has been tampered with includes:
[0027] If the remote hash value corresponding to the initial record is the same as the local hash value corresponding to the initial record, determine that the initial plaintext stored in the business system has not been tampered with; otherwise, determine that the initial plaintext stored in the business system has been tampered with.
[0028] In a possible implementation manner, based on the remote hash value corresponding to each modification record and the local hash value corresponding to each modification record, determining whether the modified plaintext stored in the business system has been tampered with includes:
[0029] If the remote hash value corresponding to each modification record is the same as the local hash value corresponding to each modification record, determine that the modified plaintext stored in the business system has not been tampered with; otherwise, determine that the modified plaintext stored in the business system has been tampered with.
[0030] In a second aspect, an embodiment of the present application provides a modification process determination device, including a first determination module, a second determination module, and a third determination module, where
[0031] The first determination module is configured to determine a target record, where the target record includes a target plaintext and target basic information, and the target plaintext is obtained by modifying the target basic information;
[0032] The second determination module is configured to, based on the target basic information, determine at least one modification record and an initial record corresponding to the target record in the business system, where the initial record includes an initial plaintext, and the at least one modification record is a record for modifying the initial plaintext to the target plaintext;
[0033] The third determination module is configured to determine modification process information for modifying the initial plaintext to the target plaintext according to at least one modification record corresponding to the target record and the initial record.
[0034] In a possible implementation manner, the second determination module is specifically configured to:
[0035] Determine the first modification record in the service system according to the target basic information, where the current information of the first modification record is the target basic information;
[0036] Determine the (i + 1)-th modification record in the service system according to the basic information in the i-th modification record, where the current information of the (i + 1)-th modification record is the basic information in the i-th modification record;
[0037] When i takes 1, 2,... in sequence until the determined modification record does not include basic information, the modification record that does not include basic information is determined as the initial record.
[0038] In a possible implementation manner, the i-th modification record includes current information and basic information;
[0039] The current information in the i-th modification record includes: the i-th plaintext, the i-th hash value corresponding to the i-th plaintext, and the i-th moment when the i-th hash value is uploaded to the blockchain node;
[0040] The basic information in the i-th modification record includes: the (i + 1)-th hash value corresponding to the (i + 1)-th plaintext, and the (i + 1)-th moment when the (i + 1)-th hash value is uploaded to the blockchain node;
[0041] Wherein, the i-th plaintext is obtained by modifying the (i + 1)-th plaintext.
[0042] In a possible implementation manner, the third determination module is specifically configured to:
[0043] Determine the modified plaintext and modification information corresponding to each modification record, where the modification information includes the moment when the hash value corresponding to the modified plaintext is uploaded to the blockchain node and the modifier information, and the modified plaintext is the plaintext after being modified by the modification record;
[0044] Determine the initial plaintext and initial information in the initial record, where the initial information includes the moment when the hash value corresponding to the initial plaintext is uploaded to the blockchain node and the writer information;
[0045] Determine that the modification process information includes: the initial plaintext, the initial information, and the modified plaintext and modification information corresponding to each modification record.
[0046] In a possible implementation, the device further includes a fourth determination module, and the fourth determination module is configured to:
[0047] Obtain the remote hash value corresponding to the initial record and the remote hash value corresponding to each modification record at the blockchain node;
[0048] Obtain the local hash value corresponding to the initial record and the local hash value corresponding to each modification record in the business system;
[0049] Determine whether the initial plaintext stored in the business system has been tampered with according to the remote hash value corresponding to the initial record and the local hash value corresponding to the initial record;
[0050] Determine whether the modified plaintext stored in the business system has been tampered with according to the remote hash value corresponding to each modification record and the local hash value corresponding to each modification record.
[0051] In a possible implementation, the fourth determination module is specifically configured to:
[0052] If the remote hash value corresponding to the initial record is the same as the local hash value corresponding to the initial record, determine that the initial plaintext stored in the business system has not been tampered with; otherwise, determine that the initial plaintext stored in the business system has been tampered with.
[0053] In a possible implementation, the fourth determination module is specifically configured to:
[0054] If the remote hash value corresponding to each modification record is the same as the local hash value corresponding to each modification record, determine that the modified plaintext stored in the business system has not been tampered with; otherwise, determine that the modified plaintext stored in the business system has been tampered with.
[0055] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory;
[0056] The memory stores computer execution instructions;
[0057] The processor executes the computer execution commands stored in the memory, so that the processor executes the modification process determination method according to any one of the first aspects.
[0058] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored, and when the computer execution instructions are executed by a processor, they are used to implement the modification process determination method according to any one of the first aspects.
[0059] In a fifth aspect, the present application provides a computer program product, including a computer program which, when executed by a processor, can implement the modification process determination method described in any one of the first aspect.
[0060] The present application provides a modification process determination method, apparatus, device, and storage medium. First, a target record is determined, where the target record includes a target plaintext and target basic information, and the target plaintext is obtained by modifying the target basic information; according to the target basic information, at least one modification record and an initial record corresponding to the target record are determined in the business system, where the initial record includes an initial plaintext, and the at least one modification record is a record for modifying the initial plaintext to the target plaintext; according to the at least one modification record and the initial record corresponding to the target record, modification process information for modifying the initial plaintext to the target plaintext is determined. By using a hash value instead of ciphertext, the storage space occupied by all records is reduced, thereby improving the efficiency of risk information traceability. On the other hand, using a hash value instead of ciphertext reduces the risk of being cracked and improves the security of shared information. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] To more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required to be used in the embodiments. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0062] Figure 1 It is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0063] Figure 2 It is a flowchart of a modification process determination method provided by an embodiment of the present application Figure 1 ;
[0064] Figure 3 It is a flowchart of determining at least one modification record and an initial record corresponding to a target record provided by an embodiment of the present application;
[0065] Figure 4 It is a flowchart of a modification process determination method provided by an embodiment of the present application Figure 2 ;
[0066] Figure 5 It is a flowchart of a modification process determination method provided by an embodiment of the present application Figure 3 ;
[0067] Figure 6 It is a flowchart of verifying whether the plaintext stored in the business system of an embodiment of the present application is tampered with;
[0068] Figure 7 The structural schematic diagram of a modification process determination device provided by an embodiment of the present application Figure 1 ;
[0069] Figure 8 The structural schematic diagram of a modification process determination device provided by an embodiment of the present application Figure 2 ;
[0070] Figure 9 The structural schematic diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0071] To make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the embodiments of the present application. Apparently, the described embodiments are some, rather than all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0072] For ease of understanding, the application scenarios applicable to the embodiments of the present application are described below in conjunction with Figure 1 , and the application scenarios applicable to the embodiments of the present application are described.
[0073] Figure 1 The schematic diagram of an application scenario provided by an embodiment of the present application. Please refer to Figure 1 , including a business system 101 and a blockchain 102.
[0074] The business system 101 can use a hashing algorithm to generate a hash value for the plaintext of the risk information accumulated by the business, and then upload the hash value to the blockchain 102. The blockchain 102 returns the on-chain time of this risk information to the business system 101, and the business system 101 records the plaintext, hash value, and on-chain time of this risk information.
[0075] A financial institution can modify the original risk information in the business system 101, and the modified risk information is recorded as risk information A. The business system 101 can use a hashing algorithm to generate a hash value for the plaintext content of risk information A, and then upload the hash value to the blockchain 102. The blockchain 102 returns the on-chain time of risk information A to the business system 101. The business system 101 records the plaintext content of risk information A, the hash value of the original risk information, the on-chain time of the original risk information, the hash value of risk information A, and the on-chain time of risk information A.
[0076] In the related art, the business system first assigns a unique code to the risk information, then encrypts the plaintext content of the risk information to generate a ciphertext, and finally uploads the unique code and the ciphertext of the risk information to the blockchain. Any subsequent modification to this piece of information is to upload the unique number and the modified ciphertext to the blockchain. When tracing the origin, all historical modification records of the risk information can be determined through the unique number of the risk information.
[0077] The above method for tracing the origin of risk information has at least the following technical problems:
[0078] 1. If the content of the risk information is large, the corresponding ciphertext will be large, occupying a large amount of storage space, which will in turn lead to poor efficiency in tracing the origin of the risk information.
[0079] 2. The risk information includes a large amount of personal sensitive information. Directly uploading the ciphertext after encrypting the risk information to the blockchain poses a risk of being cracked, resulting in low security.
[0080] In view of this, in this application, by using a hash value instead of the ciphertext, the storage space occupied by all risk information records is reduced, thereby improving the efficiency of tracing the origin of the risk information. On the other hand, using a hash value instead of the ciphertext reduces the risk of being cracked and improves the security of the shared information.
[0081] Next, the technical solutions shown in this application will be described in detail through specific embodiments. It should be noted that the following several embodiments can exist independently or be combined with each other. For the same or obvious content, it will not be repeated in different embodiments.
[0082] Figure 2 Flow diagram of a method for determining a modification process provided by an embodiment of this application Figure 1 . Please refer to Figure 2 , the method includes:
[0083] S201. Determine the target record, where the target record includes the target plaintext and the target basic information.
[0084] The execution subject of the embodiment of this application can be an electronic device or a modification process determination device set in the electronic device. The modification process determination device can be implemented through software or through a combination of software and hardware.
[0085] The record can be a record about risk information.
[0086] A financial institution can handle business based on the record. If the business handling fails, the corresponding record can be determined as the target record.
[0087] The plaintext can be the content of risk information, which may include customer information, the time of risk occurrence, risk details, the amount involved in the risk, etc.; the customer information may include the customer's name, mobile phone number, etc.
[0088] The target plaintext is modified based on the target basic information.
[0089] The basic information may include the hash value of the plaintext to be modified and the time when the hash value of the plaintext to be modified is uploaded to the blockchain.
[0090] The hash value of the plaintext can be obtained by changing the plaintext content into a hash value using a hash algorithm.
[0091] After the plaintext to be modified is modified, it becomes the current plaintext.
[0092] The time when it is uploaded to the blockchain can be simply referred to as the on-chain time.
[0093] The target record may further include target current information, and the current information may include the hash value of the current plaintext and the time when the hash value of the current plaintext is uploaded to the blockchain.
[0094] The content of the target record can be illustrated by Table 1 as follows:
[0095] Table 1
[0096]
[0097] S202. According to the target basic information, determine at least one modification record and an initial record corresponding to the target record in the business system.
[0098] The initial record may include an initial plaintext.
[0099] At least one modification record may be a record for modifying the initial plaintext to the target plaintext.
[0100] The following method can be used to determine at least one modification record and an initial record corresponding to the target record in the business system according to the target basic information:
[0101] According to the target basic information, determine the first modification record in the business system, and the current information of the first modification record is the target basic information; according to the basic information in the i-th modification record, determine the (i + 1)-th modification record in the business system, and the current information of the (i + 1)-th modification record is the basic information in the i-th modification record; i takes 1, 2,... in sequence until the modification record obtained does not include basic information, and then determine the modification record that does not include basic information as the initial record.
[0102] For the sake of easy understanding, below, in combination with Figure 3Describe in detail the process of determining at least one modification record and the initial record corresponding to the target record.
[0103] Figure 3 This is a schematic flowchart of the process for determining at least one modification record and the initial record corresponding to the target record provided by the embodiments of the present application. Please refer to Figure 3 , and take i = 3 as an example for illustration.
[0104] The target record includes the target plaintext, the target current information, and the target basic information. According to the target basic information, the first modification record can be determined; the first modification record includes the first plaintext, the first current information, and the first basic information, and the first current information is the target basic information; according to the first basic information of the first modification record, the second modification record can be determined. The second modification record includes the second plaintext, the second current information, and the second basic information, and the second current information is the first basic information; according to the second basic information of the second modification record, the third modification record can be determined. The third modification record includes the third plaintext and the third current information, and the third current information is the second basic information. The third modification record is the initial record.
[0105] S203. Determine the modification process information for modifying the initial plaintext to the target plaintext according to at least one modification record and the initial record corresponding to the target record.
[0106] The modification process information for modifying the initial plaintext to the target plaintext can be determined according to at least one modification record and the initial record corresponding to the target record in the following manner:
[0107] Determine the modified plaintext and the modification information corresponding to each modification record. The modification information includes the time when the hash value corresponding to the modified plaintext is uploaded to the blockchain node and the modifier information. The modified plaintext is the plaintext after being modified by the modification record; determine the initial plaintext and the initial information in the initial record. The initial information includes the time when the hash value corresponding to the initial plaintext is uploaded to the blockchain node and the writer information; determine that the modification process information includes: the initial plaintext, the initial information, and the modified plaintext and the modification information corresponding to each modification record.
[0108] Based on Figure 3 the embodiments shown, the modified plaintext corresponding to the first modification record is the first plaintext, the modified plaintext corresponding to the second modification record can be the second plaintext, and the initial plaintext corresponding to the initial record can be the third plaintext; the modification information corresponding to the first modification record can be the first current information, the modification information corresponding to the second modification record can be the second current information, and the third current information corresponding to the initial record can be the initial information.
[0109] In Figure 2In the illustrated embodiment, first, a target record is determined. The target record includes a target plaintext and target basic information, and the target plaintext is modified based on the target basic information. According to the target basic information, at least one modification record and an initial record corresponding to the target record are determined in the business system. The initial record includes an initial plaintext, and the at least one modification record is a record for modifying the initial plaintext to the target plaintext. According to the at least one modification record and the initial record corresponding to the target record, modification process information for modifying the initial plaintext to the target plaintext is determined. By using a hash value instead of a ciphertext, the storage space occupied by all records is reduced, thereby improving the efficiency of risk information traceability. On the other hand, using a hash value instead of a ciphertext reduces the risk of being cracked and improves the security of shared information.
[0110] Based on any of the above embodiments, hereinafter, with reference to Figure 4 the illustrated embodiment, the above method for determining the modification process will be described in detail.
[0111] Figure 4 The flowchart of a method for determining a modification process provided by an embodiment of the present application is shown Figure 2 . Please refer to Figure 4 , and it includes:
[0112] S401. Determine a target record, where the target record includes a target plaintext and target basic information.
[0113] It should be noted that the execution process of S401 can refer to the execution process of S201, which will not be elaborated here.
[0114] S402. According to the target basic information, determine the first modification record in the business system.
[0115] The first modification record may include current information and basic information;
[0116] The current information of the first modification record is the target basic information.
[0117] The current information of the first modification record may include: a first plaintext, a first hash value corresponding to the first plaintext, and a first moment when the first hash value is uploaded to the blockchain node.
[0118] The basic information of the first modification record may include: a second hash value corresponding to a second plaintext, and a second moment when the second hash value is uploaded to the blockchain node.
[0119] S403. Determine the (i + 1)-th modification record in the business system according to the basic information in the i-th modification record. Let i take values of 1, 2, … successively until the modification record obtained does not include the basic information. Then, determine the modification record without the basic information as the initial record.
[0120] The i-th modification record includes the current information and the basic information.
[0121] The current information in the i-th modification record includes: the i-th plaintext, the i-th hash value corresponding to the i-th plaintext, and the i-th moment when the i-th hash value is uploaded to the blockchain node.
[0122] The basic information in the i-th modification record includes: the (i + 1)-th hash value corresponding to the (i + 1)-th plaintext, and the (i + 1)-th moment when the (i + 1)-th hash value is uploaded to the blockchain node.
[0123] The i-th plaintext is obtained by modifying the (i + 1)-th plaintext.
[0124] The initial record includes the current information.
[0125] S404. Determine the modified plaintext and modified information corresponding to each modification record.
[0126] The modified plaintext is the plaintext after being modified by the modification record.
[0127] The modified information includes the moment when the hash value corresponding to the modified plaintext is uploaded to the blockchain node and the modifier information.
[0128] The modifier information may include the name, number, etc. of the modifier.
[0129] S405. Determine the initial plaintext and initial information in the initial record.
[0130] The initial information includes the moment when the hash value corresponding to the initial plaintext is uploaded to the blockchain node and the writer information.
[0131] The writer information may include the name, number, etc. of the writer.
[0132] S406. Determine the modification process information for modifying the initial plaintext to the target plaintext.
[0133] The modification process information includes the initial plaintext, the initial information, and the modified plaintext and modified information corresponding to each modification record.
[0134] In Figure 4In the illustrated embodiment, first determine the target record, which includes the target plaintext and the target basic information; according to the target basic information, determine the first modification record in the business system; according to the basic information in the i-th modification record, determine the (i + 1)-th modification record in the business system, where i takes values of 1, 2, …… in sequence until the modification record obtained does not include the basic information, then determine the modification record without the basic information as the initial record; then determine the modified plaintext and the modification information corresponding to each modification record; determine the initial plaintext and the initial information in the initial record; determine the modification process information for modifying the initial plaintext to the target plaintext, and the modification process information may include the initial plaintext, the initial information, and the modified plaintext and the modification information corresponding to each modification record. By using the hash value instead of the ciphertext, the storage space occupied by all records is reduced, thereby improving the efficiency of risk information traceability. On the other hand, using the hash value instead of the ciphertext reduces the risk of being cracked and improves the security of the shared information.
[0135] Based on any of the above embodiments, below, in combination with Figure 5 the method for determining the modification process will be specifically described.
[0136] Figure 5 The flowchart of the method for determining the modification process provided by the embodiment of the present application Figure 3 is as follows. Please refer to Figure 5 and the method includes:
[0137] Determine the target record, where the target record includes the current plaintext M e , the current target hash value H e , the time T when the current target hash value is uploaded to the blockchain e , the hash value H generated by the first plaintext d , the time T when the hash value generated by the first plaintext is uploaded to the blockchain d .
[0138] According to the hash value H d generated by the first plaintext in the target record and the time T d when the hash value generated by the first plaintext is uploaded to the blockchain, determine the first modification record, and the first modification record includes: the first plaintext M d , the current first hash value H d , the time T when the current first hash value is uploaded to the blockchain d , the hash value H generated by the second plaintext c , the time T when the hash value generated by the second plaintext is uploaded to the blockchain c .
[0139] According to the hash value H c generated by the second plaintext in the first modification record and the time T cDetermine the second modification record, and the second modification record includes: the second plaintext M c , the current second hash value H c , the time T when the current second hash value is uploaded to the blockchain c , the hash value H generated from the third plaintext b , the time T when the hash value generated from the third plaintext is uploaded to the blockchain b .
[0140] Determine the third modification record according to the hash value H generated from the third plaintext in the second modification record b , the time T when the hash value generated from the third plaintext is uploaded to the blockchain b Determine the third modification record, and the third modification record includes: the third plaintext M b , the current third hash value H b , the time T when the current third hash value is uploaded to the blockchain b , the hash value H generated from the fourth plaintext a , the time T when the hash value generated from the fourth plaintext is uploaded to the blockchain a .
[0141] Determine the hash value H generated from the fourth plaintext in the third modification record a , the time T when the hash value generated from the fourth plaintext is uploaded to the blockchain a Determine the initial record (the fourth modification record), and the initial record includes the fourth plaintext M a , the hash value H generated from the fourth plaintext a , the time T when the hash value generated from the fourth plaintext is uploaded to the blockchain a .
[0142] Determine the modifier information of the three modification records and the writer information of the initial record
[0143] After comparing the content in each record, the modification process information shown in Table 2 is finally obtained
[0144] Table 2
[0145]
[0146]
[0147] Figures 2 - 5 The embodiments shown illustrate in detail the method for determining the modification process of modifying the initial plaintext to the target plaintext. After determining the modification process, it is also possible to verify whether the plaintext stored in the business system has been tampered with according to the modification process information and the information in the blockchain. Next, the following Figure 6 The embodiments shown are used to specifically illustrate the specific process of verification
[0148] Figure 6Schematic diagram of the verification process for whether the plaintext stored in the business system provided by the embodiments of this application is tampered with. Please refer to Figure 6 The method includes:
[0149] S601. Obtain the remote hash value corresponding to the initial record and the remote hash value corresponding to each modification record at the blockchain node.
[0150] The initial plaintext can be used to generate an initial hash value through a hashing algorithm, and then the initial hash value is uploaded to the blockchain; during subsequent modifications, each modified plaintext generates a modified hash value, and then the modified hash value is uploaded to the blockchain. The initial hash value is the remote hash value corresponding to the initial record, and the modified hash value is the remote hash value corresponding to the modification record.
[0151] S602. Obtain the local hash value corresponding to the initial record and the local hash value corresponding to each modification record in the business system.
[0152] After the modification process is determined, determine the modified plaintext corresponding to each modification record and the initial plaintext corresponding to the initial record in the business system. The hash value generated by the initial plaintext stored in the business system is the local hash value corresponding to the initial record, and the hash value generated by the modified plaintext stored in the business system is the local hash value corresponding to the modification record.
[0153] S603. Determine whether the initial plaintext stored in the business system is tampered with according to the remote hash value corresponding to the initial record and the local hash value corresponding to the initial record.
[0154] The following method can be used to determine whether the initial plaintext stored in the business system is tampered with according to the remote hash value corresponding to the initial record and the local hash value corresponding to the initial record:
[0155] If the remote hash value corresponding to the initial record is the same as the local hash value corresponding to the initial record, it is determined that the initial plaintext stored in the business system is not tampered with; otherwise, it is determined that the initial plaintext stored in the business system is tampered with.
[0156] During the process of determining that the initial plaintext is tampered with, after determining that the remote hash value and the local hash value are the same, it is also possible to further determine whether the upload times to the blockchain node are the same.
[0157] First, obtain the remote upload time corresponding to the initial record at the blockchain node, and then obtain the local upload time corresponding to the initial record in the business system. If the remote upload time is the same as the local upload time, it is determined that the initial plaintext stored in the business system is not tampered with; otherwise, it is determined that the initial plaintext stored in the business system is tampered with.
[0158] S604. Determine whether the modified plaintext stored in the business system has been tampered with according to the remote hash value corresponding to each modification record and the local hash value corresponding to each modification record.
[0159] The following method can be used to determine whether the modified plaintext stored in the business system has been tampered with according to the remote hash value corresponding to each modification record and the local hash value corresponding to each modification record:
[0160] If the remote hash value corresponding to each modification record is the same as the local hash value corresponding to each modification record, it is determined that the modified plaintext stored in the business system has not been tampered with; otherwise, it is determined that the modified plaintext stored in the business system has been tampered with.
[0161] During the process of determining that the modified plaintext has been tampered with, after determining that the remote hash value and the local hash value are the same, it is also possible to further determine whether the upload times to the blockchain nodes are the same.
[0162] First, obtain the remote upload time corresponding to the modification record at the blockchain node, and then obtain the local upload time corresponding to the modification record in the business system. If the remote upload time is the same as the local upload time, it is determined that the modified plaintext stored in the business system has not been tampered with; otherwise, it is determined that the modified plaintext stored in the business system has been tampered with.
[0163] In Figure 6 the illustrated embodiment, it is possible to determine whether the plaintext stored in the business system has been tampered with according to the remote hash value and the local hash value of each piece of plaintext. This improves the accuracy of the determination during the modification process.
[0164] Figure 7 The structural schematic of a device for determining the modification process provided by an embodiment of the present application Figure 1 . Please refer to Figure 7 , the device 10 for determining the modification process includes a first determination module 11, a second determination module 12, and a third determination module 13, where,
[0165] The first determination module 11 is used to determine a target record, where the target record includes a target plaintext and target basic information, and the target plaintext is obtained by modifying the target basic information;
[0166] The second determination module 12 is used to determine, according to the target basic information, at least one modification record and an initial record corresponding to the target record in the business system, where the initial record includes an initial plaintext, and the at least one modification record is a record for modifying the initial plaintext to the target plaintext;
[0167] The third determination module 13 is configured to determine the modification process information for modifying the initial plaintext to the target plaintext according to at least one modification record and the initial record corresponding to the target record.
[0168] In a possible implementation manner, the second determination module 12 is specifically configured to:
[0169] Determine the first modification record in the service system according to the target basic information, where the current information of the first modification record is the target basic information;
[0170] Determine the (i + 1)-th modification record in the service system according to the basic information in the i-th modification record, where the current information of the (i + 1)-th modification record is the basic information in the i-th modification record;
[0171] When i sequentially takes 1, 2,..., until the determined modification record does not include the basic information, the modification record that does not include the basic information is determined as the initial record.
[0172] In a possible implementation manner, the i-th modification record includes current information and basic information;
[0173] The current information in the i-th modification record includes: the i-th plaintext, the i-th hash value corresponding to the i-th plaintext, and the i-th moment when the i-th hash value is uploaded to the blockchain node;
[0174] The basic information in the i-th modification record includes: the (i + 1)-th hash value corresponding to the (i + 1)-th plaintext, and the (i + 1)-th moment when the (i + 1)-th hash value is uploaded to the blockchain node;
[0175] Wherein, the i-th plaintext is obtained by modifying the (i + 1)-th plaintext.
[0176] In a possible implementation manner, the third determination module 13 is specifically configured to:
[0177] Determine the modified plaintext and modification information corresponding to each modification record, where the modification information includes the moment when the hash value corresponding to the modified plaintext is uploaded to the blockchain node and the modifier information, and the modified plaintext is the plaintext after being modified by the modification record;
[0178] Determine the initial plaintext and initial information in the initial record, where the initial information includes the moment when the hash value corresponding to the initial plaintext is uploaded to the blockchain node and the writer information;
[0179] Determine that the modification process information includes: the initial plaintext, the initial information, and the modified plaintext and modification information corresponding to each modification record.
[0180] Figure 8 Structural schematic of a modification process determination device provided by an embodiment of the present application Figure 2 Please refer to Figure 8 , the modification process determination device 10 further includes a fourth determination module 14, and the fourth determination module 14 is configured to:
[0181] Obtain the remote hash value corresponding to the initial record and the remote hash value corresponding to each modification record at the blockchain node;
[0182] Obtain the local hash value corresponding to the initial record and the local hash value corresponding to each modification record in the business system;
[0183] Determine whether the initial plaintext stored in the business system has been tampered with according to the remote hash value corresponding to the initial record and the local hash value corresponding to the initial record;
[0184] Determine whether the modified plaintext stored in the business system has been tampered with according to the remote hash value corresponding to each modification record and the local hash value corresponding to each modification record.
[0185] In a possible implementation manner, the fourth determination module 14 is specifically configured to:
[0186] If the remote hash value corresponding to the initial record is the same as the local hash value corresponding to the initial record, determine that the initial plaintext stored in the business system has not been tampered with; otherwise, determine that the initial plaintext stored in the business system has been tampered with.
[0187] In a possible implementation manner, the fourth determination module 14 is specifically configured to:
[0188] If the remote hash value corresponding to each modification record is the same as the local hash value corresponding to each modification record, determine that the modified plaintext stored in the business system has not been tampered with; otherwise, determine that the modified plaintext stored in the business system has been tampered with.
[0189] The modification process determination device 10 provided by the embodiment of the present application can execute the technical solutions shown in the above-mentioned modification process determination method embodiment, and its implementation principle and beneficial effects are similar, and will not be elaborated here.
[0190] Figure 9 Structural schematic of an electronic device provided by an embodiment of the present application. Please refer to Figure 9 , the service code generation device 20 may include: a memory 21 and a processor 22. Exemplarily, the memory 21 and the processor 22 are connected to each other through a bus 23.
[0191] The memory 21 stores computer-executable instructions;
[0192] The processor 22 executes the computer-executable commands stored in the memory 21, so that the processor executes the modified process determination method as described in any one of the above.
[0193] Figure 9 The service code generation device shown in the embodiment can execute the technical solution shown in the above-mentioned modified process determination method embodiment, and its implementation principle and beneficial effects are similar, so they will not be elaborated here.
[0194] An embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the modified process determination method as described in any one of the above.
[0195] An embodiment of the present application provides a computer program product, including a computer program, which can implement the modified process determination method as described in any one of the above when executed by a processor.
[0196] Those skilled in the art will readily think of other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include the common general knowledge or conventional technical means in the technical field not disclosed in the present application. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present application are pointed out by the following claims.
[0197] It should be understood that the present application is not limited to the exact structure already described and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present application is only limited by the appended claims.
[0198] It should be noted that in the technical solution of the present application, the collection, storage, use, processing, transmission, provision, and disclosure of information such as financial data or user data comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
Claims
1. A method for determining a modification process, characterized in that, Including: Determine a target record, where the target record includes a target plaintext and target basic information, and the target plaintext is modified based on the target basic information; According to the target basic information, determine the first modification record in the business system, and the current information of the first modification record is the target basic information; According to the basic information in the i-th modification record, determine the (i + 1)-th modification record in the business system, and the current information of the (i + 1)-th modification record is the basic information in the i-th modification record; Let i take 1, 2,... in sequence. When the determined modification record does not include basic information, determine the modification record without basic information as the initial record; the initial record includes an initial plaintext, and at least one modification record is a record that modifies the initial plaintext to the target plaintext; Determine the modified plaintext and modification information corresponding to each modification record. The modification information includes the time when the hash value corresponding to the modified plaintext is uploaded to the blockchain node and the modifier information, and the modified plaintext is the plaintext after being modified by the modification record; Determine the initial plaintext and initial information in the initial record. The initial information includes the time when the hash value corresponding to the initial plaintext is uploaded to the blockchain node and the writer information; Determine the modification process information including: the initial plaintext, the initial information, and the modified plaintext and modification information corresponding to each modification record.
2. The method according to claim 1, characterized in that, The i-th modification record includes current information and basic information; The current information in the i-th modification record includes: the i-th plaintext, the i-th hash value corresponding to the i-th plaintext, and the i-th time when the i-th hash value is uploaded to the blockchain node; The basic information in the i-th modification record includes: the (i + 1)-th hash value corresponding to the (i + 1)-th plaintext and the (i + 1)-th time when the (i + 1)-th hash value is uploaded to the blockchain node; Wherein, the i-th plaintext is obtained by modifying the (i + 1)-th plaintext.
3. The method according to claim 1, wherein The method further includes: Obtain the remote hash value corresponding to the initial record and the remote hash value corresponding to each modification record at the blockchain node; Obtain the local hash value corresponding to the initial record and the local hash value corresponding to each modification record in the business system; According to the remote hash value corresponding to the initial record and the local hash value corresponding to the initial record, determine whether the initial plaintext stored in the business system is tampered with; According to the remote hash value corresponding to each modification record and the local hash value corresponding to each modification record, determine whether the modified plaintext stored in the business system is tampered with.
4. The method according to claim 3, characterized in that, According to the remote hash value corresponding to the initial record and the local hash value corresponding to the initial record, determining whether the initial plaintext stored in the business system is tampered with includes: If the remote hash value corresponding to the initial record is the same as the local hash value corresponding to the initial record, determine that the initial plaintext stored in the business system is not tampered with; otherwise, determine that the initial plaintext stored in the business system is tampered with.
5. The method according to claim 3, characterized in that, Determining whether the modified plaintext stored in the business system is tampered with according to the remote hash value corresponding to each modification record and the local hash value corresponding to each modification record, including: If the remote hash value corresponding to each modification record is the same as the local hash value corresponding to each modification record, it is determined that the modified plaintext stored in the business system is not tampered with; otherwise, it is determined that the modified plaintext stored in the business system is tampered with.
6. A modification process determination device, characterized in that, Including a first determination module, a second determination module, and a third determination module, where The first determination module is configured to determine a target record, where the target record includes a target plaintext and target basic information, and the target plaintext is obtained by modifying based on the target basic information; The second determination module is configured to, according to the target basic information, determine the first modification record in the business system, where the current information of the first modification record is the target basic information; according to the basic information in the i-th modification record, determine the (i + 1)-th modification record in the business system, where the current information of the (i + 1)-th modification record is the basic information in the i-th modification record; i sequentially takes 1, 2,..., until the determined modification record does not include basic information, and the modification record that does not include basic information is determined as the initial record; the initial record includes an initial plaintext, and the at least one modification record is a record that modifies the initial plaintext to the target plaintext; The third determination module is configured to determine the modified plaintext and modification information corresponding to each modification record, where the modification information includes the time when the hash value corresponding to the modified plaintext is uploaded to the blockchain node and the modifier information, and the modified plaintext is the plaintext after being modified by the modification record; determine the initial plaintext and initial information in the initial record, where the initial information includes the time when the hash value corresponding to the initial plaintext is uploaded to the blockchain node and the writer information; determine the modification process information including: the initial plaintext, the initial information, and the modified plaintext and modification information corresponding to each modification record.
7. An electronic device, characterized in that, Including a processor and a memory; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory, so that the processor executes the modified process determination method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, Computer execution instructions are stored in the computer-readable storage medium, and when the computer execution instructions are executed by the processor, they are used to implement the modified process determination method according to any one of claims 1 to 5.
9. A computer program product, characterized in that, Including a computer program, which when executed by the processor implements the modified process determination method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Block chain data desensitization and traceability storage method and device
CN111538786A
A to-be-checked text modification method and device based on a block chain, equipment and a medium
CN113342835A