Data verification method and device, equipment and medium
The data verification method uses XOR processing with random bit strings to enhance data security by preventing inference through hash values, addressing the security risks of direct hash calculation in existing methods.
Patent Information
- Application Number
- CN202411099406.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-08-12
AI Technical Summary
Existing data verification methods lack sufficient data security, as they directly calculate hash values, risking leakage of original image information.
A data verification method involving multiple rounds of XOR processing with random bit strings to generate verification bit strings, ensuring data privacy and security by utilizing the irreversible nature of hash values.
Ensures data privacy and security during verification by preventing inference of verification bit strings or intermediate bit strings through hash values, improving performance without complex operations.
Smart Images

Figure CN119106444A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data verification method, device, equipment and medium. Background Art
[0002] At present, the common data type of production data is string data, including strings composed of Chinese, English, symbols, numbers and other characters, such as ID number, name, address, account name, etc. When the sender reports the production data to the receiver, the receiver often encounters problems such as inaccurate data or human tampering, which may lead to wrong decisions and resource allocation. Therefore, the receiver needs to verify the production data reported by the sender with the current production data of the sender to ensure the authenticity and consistency of the data previously reported by the sender.
[0003] However, the data verification method in the prior art usually adopts a method of directly calculating the hash value of a specified string. This method has the security risk of leaking the original image information of the hash value. Therefore, the data verification method in the prior art has the problem of being unable to guarantee data security during the data verification process. Summary of the invention
[0004] The embodiments of the present application provide a data verification method, device, equipment and medium, which are used to solve the problem that the data verification method in the prior art cannot guarantee the data security during the data verification process.
[0005] In a first aspect, the present application provides a data verification method, which is applied to a first end, and the method includes:
[0006] In response to the data verification instruction, determine a first string to be verified indicated by the data verification instruction, and notify the second end to determine a verification bit string of a second string to be verified corresponding to the first string to be verified;
[0007] Perform at least one round of verification bit string generation process on the first string to be verified, and determine the verification result of the first string to be verified according to the first verification bit string obtained in the last round and the second verification bit string determined by the second end, or send the hash value of the first verification bit string obtained in the last round to the second end, so as to determine the verification result of the second string to be verified;
[0008] The generation process of any round of verification bit string includes the following steps:
[0009] Performing XOR processing on the initial bit string of this round and the random bit string randomly generated in this round to obtain an intermediate bit string, wherein if this round is the first round, the initial bit string is determined based on the first string to be verified; if this round is not the first round, the initial bit string is determined based on the verification bit string obtained in the previous round;
[0010] XOR processing is performed on the intermediate bit string and the random bit string randomly generated in this round received by the second end to obtain the verification bit string of this round, wherein the number of bits of the random bit string is the same as the number of bits of the initial bit string; and the random bit string randomly generated in this round is sent to the second end so that the second end can determine the verification bit string of this round.
[0011] In a possible embodiment, the initial bit string of the first round is generated in the following manner:
[0012] Determine a binary bit representation corresponding to each character in the first character string to be verified based on the first character string to be verified and a preset character binary encoding rule;
[0013] The initial bit string is determined based on the binary bit representation corresponding to each character in the first character string to be verified.
[0014] In a possible embodiment, before determining the binary bit representation corresponding to each character in the first character string to be verified based on the first character string to be verified and a preset character binary encoding rule, the method further includes:
[0015] It is determined that the character length of the first to-be-verified character string is less than a preset character length.
[0016] In a possible embodiment, after determining the initial bit string, the method further includes:
[0017] Determining whether the number of bits of the initial bit string meets a preset number of bits;
[0018] If the number of bits of the initial bit string is less than the preset number of bits, based on the preset bit code, the preset bit code is padded at the front end of the initial bit string until the number of bits of the initial bit string after padding is equal to the preset number of bits.
[0019] In a possible embodiment, the method of determining the verification result of the first character string to be verified according to the first verification bit string obtained in the last round and the second verification bit string determined by the second end includes:
[0020] Receiving a hash value of the second verification bit string sent by the second end;
[0021] Comparing the hash value of the first verification bit string with the hash value of the second verification bit string;
[0022] If the hash value of the first verification bit string is equal to the hash value of the second verification bit string, determining that the verification result of the first character string to be verified is passed;
[0023] If the hash value of the first verification bit string is not equal to the hash value of the second verification bit string, it is determined that the verification result of the first character string to be verified is verification failure.
[0024] In a possible embodiment, the first end is a receiving end, and the second end is a sending end, then the first character string to be verified is part or all of the production data sent by the second end to the first end; the second character string to be verified is the target production data corresponding to the first character string to be verified in the production data of the second end; or
[0025] The first end is a sending end and the second end is a receiving end, then the first string to be verified is part or all of the production data of the first end, and the second string to be verified is the target production data corresponding to the first string to be verified in the production data sent by the first end to the second end.
[0026] In a second aspect, the present application provides a data verification device, which is configured at a first end, and the device includes:
[0027] a determination module, configured to determine, in response to a data verification instruction, a first string to be verified indicated by the data verification instruction, and notify the second end to determine a verification bit string of a second string to be verified corresponding to the first string to be verified;
[0028] a verification module, configured to perform at least one round of verification bit string generation process on the first string to be verified, and determine a verification result of the first string to be verified based on the first verification bit string obtained in the last round and the second verification bit string determined by the second end, or send a hash value of the first verification bit string obtained in the last round to the second end, so as to determine a verification result of the second string to be verified;
[0029] The generation process of any round of verification bit string includes the following steps:
[0030] Performing XOR processing on the initial bit string of this round and the random bit string randomly generated in this round to obtain an intermediate bit string, wherein if this round is the first round, the initial bit string is determined based on the first string to be verified; if this round is not the first round, the initial bit string is determined based on the verification bit string obtained in the previous round;
[0031] XOR processing is performed on the intermediate bit string and the random bit string randomly generated in this round received by the second end to obtain the verification bit string of this round, wherein the number of bits of the random bit string is the same as the number of bits of the initial bit string; and the random bit string randomly generated in this round is sent to the second end so that the second end can determine the verification bit string of this round.
[0032] In a possible embodiment, the verification module generates the initial bit string of the first round in the following manner:
[0033] Determine a binary bit representation corresponding to each character in the first character string to be verified based on the first character string to be verified and a preset character binary encoding rule;
[0034] The initial bit string is determined based on the binary bit representation corresponding to each character in the first character string to be verified.
[0035] In a possible embodiment, before the verification module determines the binary bit representation corresponding to each character in the first character string to be verified based on the first character string to be verified and a preset character binary encoding rule, the verification module is further configured to:
[0036] It is determined that the character length of the first to-be-verified character string is less than a preset character length.
[0037] In a possible embodiment, after the verification module determines the initial bit string, the verification module is further configured to:
[0038] Determining whether the number of bits of the initial bit string meets a preset number of bits;
[0039] If the number of bits of the initial bit string is less than the preset number of bits, based on the preset bit code, the preset bit code is padded at the front end of the initial bit string until the number of bits of the initial bit string after padding is equal to the preset number of bits.
[0040] In a possible embodiment, the verification module is specifically used for:
[0041] Receiving a hash value of the second verification bit string sent by the second end;
[0042] Comparing the hash value of the first verification bit string with the hash value of the second verification bit string;
[0043] If the hash value of the first verification bit string is equal to the hash value of the second verification bit string, determining that the verification result of the first character string to be verified is passed;
[0044] If the hash value of the first verification bit string is not equal to the hash value of the second verification bit string, it is determined that the verification result of the first character string to be verified is verification failure.
[0045] In a possible embodiment, the first end is a receiving end, and the second end is a sending end, then the first character string to be verified is part or all of the production data sent by the second end to the first end; the second character string to be verified is the target production data corresponding to the first character string to be verified in the production data of the second end; or
[0046] The first end is a sending end and the second end is a receiving end, then the first string to be verified is part or all of the production data of the first end, and the second string to be verified is the target production data corresponding to the first string to be verified in the production data sent by the first end to the second end.
[0047] In a third aspect, the present application provides an electronic device, including:
[0048] A memory for storing program instructions;
[0049] The processor is used to call the program instructions stored in the memory, and execute the steps included in any one of the methods in the first aspect according to the obtained program instructions.
[0050] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes any one of the methods described in the first aspect.
[0051] In a fifth aspect, the present application provides a computer program product, comprising: a computer program code, when the computer program code is run on a computer, the computer executes any one of the methods described in the first aspect.
[0052] The beneficial effects of this application are as follows:
[0053] In an embodiment of the present application, the first end determines the first string to be verified indicated by the data verification instruction in response to the data verification instruction, and notifies the second end to determine the verification bit string of the second string to be verified corresponding to the first string to be verified; performs at least one round of verification bit string generation process on the first string to be verified, and determines the verification result of the first string to be verified based on the first verification bit string obtained in the last round and the second verification bit string determined by the second end, or sends the hash value of the first verification bit string obtained in the last round to the second end, so as to determine the verification result of the second string to be verified; wherein any round of verification bit string generation process includes: The next step is: XORing the initial bit string of this round with the random bit string randomly generated in this round to obtain an intermediate bit string, wherein if this round is the first round, the initial bit string is determined based on the first character string to be verified, and if this round is not the first round, the initial bit string is determined based on the verification bit string obtained in the previous round, XORing the intermediate bit string with the random bit string randomly generated in this round received by the second end to obtain the verification bit string of this round, wherein the number of bits of the random bit string is the same as the number of bits of the initial bit string; and sending the random bit string randomly generated in this round to the second end so that the second end can determine the verification bit string of this round. The generation process of the intermediate bit string and the generation process of the verification bit string in the present application are both random. Afterwards, the verification result of the first string to be verified is determined based on the first verification bit string obtained in the last round and the second verification bit string determined by the second end, or the hash value of the first verification bit string obtained in the last round is sent to the second end to determine the verification result of the second string to be verified. Due to the irreversible property of the hash value, the two ends cannot infer the verification bit string or the intermediate bit string through the hash value, which effectively ensures the data privacy and security during the data verification process.
[0054] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 A schematic diagram of an application scenario of a data verification method provided in an embodiment of the present application;
[0056] Figure 2 A flowchart of a data verification method provided in an embodiment of the present application;
[0057] Figure 3 A flowchart of a verification bit string generation process provided in an embodiment of the present application;
[0058] Figure 4A flowchart of a first-round initial bit string generation process provided in an embodiment of the present application;
[0059] Figure 5 A flowchart of another verification bit string generation process provided in an embodiment of the present application;
[0060] Figure 6 A structural diagram of a data verification device provided in an embodiment of the present application;
[0061] Figure 7 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be arbitrarily combined with each other. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.
[0063] The terms "first" and "second" in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive protection. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. "Multiple" in the present application can mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.
[0064] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description. It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0065] In the technical solution of this application, the acquisition, transmission, storage, and use of data are in compliance with the requirements of relevant national laws and regulations.
[0066] Before introducing the data verification method provided in the embodiment of the present application, in order to facilitate understanding, the technical background of the embodiment of the present application is first introduced in detail below.
[0067] At present, the common data type of production data is string data, including strings composed of Chinese, English, symbols, numbers and other characters, such as ID number, name, address, account name, etc. When the sender reports the production data to the receiver, the receiver often encounters problems such as inaccurate data or human tampering, which may lead to wrong decisions and resource allocation. Therefore, the receiver needs to verify the production data reported by the sender with the current production data of the sender to ensure the authenticity and consistency of the data previously reported by the sender.
[0068] However, the data verification method in the prior art usually adopts a method of directly calculating the hash value of a specified string, which has the security risk of leaking the original image information of the hash value.
[0069] In view of this, in order to solve the problem that the data verification method in the prior art cannot guarantee the data security during the data verification process, the embodiments of the present application provide a data verification method, device, equipment and medium. The following describes some preferred embodiments of the present application in conjunction with the drawings of the specification.
[0070] The application scenarios of the embodiments of the present application are introduced below.
[0071] See also Figure 1 , Figure 1 A schematic diagram of an application scenario of a data verification method provided in an embodiment of the present application includes a first end 10 and a second end 20.
[0072] The first end 10, in response to the data verification instruction, determines the first string to be verified indicated by the data verification instruction, and notifies the second end 20 to determine the verification bit string of the second string to be verified corresponding to the first string to be verified; performs at least one round of verification bit string generation process on the first string to be verified, and determines the verification result of the first string to be verified based on the first verification bit string obtained in the last round and the second verification bit string determined by the second end 20, or sends the hash value of the first verification bit string obtained in the last round to the second end 20, so as to determine the verification result of the second string to be verified;
[0073] The generation process of any round of verification bit string includes the following steps:
[0074] Performing XOR processing on the initial bit string of this round and the random bit string randomly generated in this round to obtain an intermediate bit string, wherein if this round is the first round, the initial bit string is determined based on the first character string to be verified; if this round is not the first round, the initial bit string is determined based on the verification bit string obtained in the previous round;
[0075] The intermediate bit string is XOR-ed with the random bit string randomly generated by the second end 20 in this round to obtain the verification bit string of this round, wherein the number of bits of the random bit string is the same as the number of bits of the initial bit string; and the random bit string randomly generated in this round is sent to the second end 20 so that the second end 20 can determine the verification bit string of this round.
[0076] When the first end 10 is a receiving end and the second end 20 is a sending end, the first character string to be verified is part or all of the production data sent by the second end 20 to the first end 10; the second character string to be verified is the target production data corresponding to the first character string to be verified in the production data of the second end 20; or
[0077] When the first end 10 is a sending end and the second end 20 is a receiving end, the first string to be verified is part or all of the production data of the first end 10, and the second string to be verified is the target production data corresponding to the first string to be verified in the production data sent by the first end 10 to the second end 20.
[0078] The first end 10 and the second end 20 are connected to each other through the Internet to achieve mutual communication. Optionally, the Internet uses standard communication technology and / or protocol. The Internet is usually the Internet, but it can also be any network, including but not limited to any combination of local area network (LAN), metropolitan area network (MAN), wide area network (WAN), mobile, wired or wireless network, dedicated network or virtual private network. In some embodiments, the data exchanged through the network is represented by technology and / or format including HyperText Mark-up Language (HTML), Extensible Markup Language (XML), etc. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec) can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technology can also be used to replace or supplement the above data communication technology.
[0079] It should be noted that Figure 1 It is only an example of an application scenario and does not constitute a limitation on the technical solution provided in the embodiments of the present application. A person skilled in the art may appreciate that, with the emergence of new application scenarios, the technical solution provided in the embodiments of the present application is also applicable to similar technical problems.
[0080] The data verification method provided by the exemplary embodiment of the present application is described below with reference to the accompanying drawings.
[0081] Please refer to Figure 2 , is a flow chart of a data verification method provided in an embodiment of the present application, the method is applied to Figure 1 The method comprises the following steps:
[0082] In step 201, in response to a data verification instruction, a first string to be verified indicated by the data verification instruction is determined, and a second end is notified to determine a verification bit string of a second string to be verified corresponding to the first string to be verified.
[0083] In a specific implementation, if the first end is a receiving end and the second end is a sending end, the first character string to be verified is part or all of the production data sent by the second end to the first end; the second character string to be verified is the target production data corresponding to the first character string to be verified in the production data of the second end;
[0084] For example, the production data of the second end is data 1, data 2, data 3, and data 4, and the second end sends data 1 and data 2 to the first end, then the first string to be verified can be data 1 or data 2 or data 1 and data 2. Taking the first string to be verified as data 1 as an example, the target production data corresponding to the first string to be verified in the production data of the second end is data 1, that is, the second string to be verified is data 1.
[0085] In specific implementation, if the first end is the sending end and the second end is the receiving end, the first string to be verified is part or all of the production data of the first end, and the second string to be verified is the target production data corresponding to the first string to be verified in the production data sent by the first end to the second end.
[0086] For example, the production data of the first end is data 1, data 2, data 3, and data 4, and the first end sends data 3 and data 4 to the second end, then the first string to be verified can be data 3 or data 4 or data 3 and data 4. Taking the first string to be verified as data 3 as an example, the target production data corresponding to the first string to be verified in the production data sent by the first end to the second end is data 3, that is, the second string to be verified is data 3.
[0087] In specific implementation, the same character string to be verified may be set to have the same identifier in the first end and the second end, and if there are multiple character strings to be verified, the arrangement order of the character strings to be verified is the same in the first end and the second end.
[0088] In specific implementation, the data verification instruction may be generated by the first end based on the received user operation instruction, or may be automatically triggered when a preset verification period is reached, which is not limited in this application.
[0089] In specific implementation, the first end can determine the first character string to be verified indicated by the data verification instruction in response to the data verification instruction. After that, the first end can send it to the second end according to the identifier of the first character string to be verified. The second end searches for the corresponding verification bit string of the second character string to be verified according to the identifier and determines the verification bit string of the second character string to be verified.
[0090] In step 202, at least one round of verification bit string generation process is performed on the first string to be verified, and the verification result of the first string to be verified is determined based on the first verification bit string obtained in the last round and the second verification bit string determined by the second end, or the hash value of the first verification bit string obtained in the last round is sent to the second end to determine the verification result of the second string to be verified.
[0091] For specific implementation, please refer to Figure 3 , is a flowchart of a verification bit string generation process provided in an embodiment of the present application, the method is applied to Figure 1 The method comprises the following steps:
[0092] In step 301, an initial bit string of this round is XORed with a random bit string randomly generated in this round to obtain an intermediate bit string.
[0093] If this round is the first round, the initial bit string is determined based on the first string to be verified; if this round is not the first round, the initial bit string is determined based on the verification bit string obtained in the previous round.
[0094] Please refer to Figure 4 , is a flowchart of a first-round initial bit string generation process provided in an embodiment of the present application, and the method is applied to Figure 1 The method comprises the following steps:
[0095] In step 401, based on the first character string to be verified and a preset character binary encoding rule, a binary bit representation corresponding to each character in the first character string to be verified is determined.
[0096] In a specific implementation, based on the first character string to be verified and the preset character binary encoding rules, before determining the binary bit representation corresponding to each character in the first character string to be verified, it is also possible to first determine whether the character length of the first character string to be verified is less than the preset character length, wherein the preset character length is, for example, set to 32 characters, and the specific character length can be determined based on the actual character length of the character string data in the actual application. In this way, it is stipulated that the character string to be verified does not exceed the preset character length, which can further ensure that any character string to be verified can be verified normally, thereby further improving the accuracy of the verification.
[0097] Among them, the preset character binary encoding rules are, for example, the American Standard Code for Information Interchange (ASCII). ASCII encoding uses a specified 7-bit or 8-bit binary number combination to represent 128 or 256 possible characters, including English letters, numbers, punctuation marks, and some control characters, or UTF-8, etc.
[0098] Taking the preset character binary encoding rule as ASCII encoding as an example, assuming that the first character string to be verified is (Hello, World!), then the binary bit representation corresponding to each character is calculated according to the ASCII encoding rule as follows:
[0099] H: Decimal: 72, corresponding binary: 01001000;
[0100] e: Decimal is 101, corresponding to binary is 01100101;
[0101] l: Decimal is 108, corresponding to binary is 01101100;
[0102] l: Decimal is 108, corresponding to binary is 01101100;
[0103] o: Decimal is 111, corresponding to binary is 01101111;
[0104] ,: decimal is 44, corresponding to binary: 00101100;
[0105] Space: decimal is 32, corresponding to binary: 00100000;
[0106] W: decimal is 87, corresponding to binary: 01010111;
[0107] o: Decimal is 111, corresponding to binary is 01101111;
[0108] r: Decimal is 114, corresponding to binary: 01110010;
[0109] l: Decimal is 108, corresponding to binary is 01101100;
[0110] d: The decimal number is 100, and the corresponding binary number is: 01100100;
[0111] !: Decimal is 33, corresponding to binary: 00100001;
[0112] Among them, ASCII encoding uses one byte (8 bits) to represent each character, that is, the binary representation of each character consists of 8 bits.
[0113] In step 402, an initial bit string is determined based on the binary bit representation corresponding to each character in the first character string to be verified.
[0114] In a specific implementation, according to the binary bit representation corresponding to each character of the character string (Hello, World!) in ASCII encoding, the initial bit string is (01001000011001010110110001101100011011110010110000100000010101110110111101110010011011000110010000100001).
[0115] In specific implementation, after determining the initial bit string, it is possible to further determine whether the number of bits of the initial bit string meets the preset number of bits, where the preset number of bits is, for example, 256 bits. If the number of bits of the initial bit string is less than the preset number of bits, then based on the preset bit code, the preset bit code is filled at the front end of the initial bit string until the number of bits of the initial bit string after filling is equal to the preset number of bits, where the preset bit code can be 0 or 1.
[0116] In this way, because the character length of each string is different, the number of bits of the generated initial bit string is also different. Therefore, the initial bit string can be supplemented to a preset number of bits, and then the corresponding random bit string can be generated to facilitate XOR processing.
[0117] For example, assuming that the preset number of bits is 256 bits and the preset bit code is 0, taking the initial bit string of the character string (Hello, World!) as (0100100001100101011011000110110001101111001011000010000001010111011011011101110010011011000110010000100001) as an example, since the number of bits of the initial bit string is 104, which is less than 256, 152 zeros can be filled at the front end of the initial bit string.
[0118] Afterwards, according to the length of the initial bit string of this round, a random number is assigned to each bit position, which can be 0 or 1. Then, these random numbers are combined into a new bit string, that is, the random bit string randomly generated in this round. Therefore, the number of bits in the random bit string is the same as that of the initial bit string.
[0119] Then, the initial bit string of this round is XORed with the random bit string randomly generated in this round to obtain an intermediate bit string.
[0120] In specific implementation, the XOR operation is a bitwise operator. For two bits, if they are the same, the result is 0, and if they are different, the result is 1. For example, 0 XOR 0 = 0; 0 XOR 1 = 1; 1 XOR 0 = 1; 1 XOR 1 = 0. The initial bit string of this round can be XORed with the corresponding bit position in the random bit string randomly generated in this round to obtain an intermediate bit string. Therefore, the number of bits in the intermediate bit string is the same as the number of bits in the random bit string and the number of bits in the initial bit string.
[0121] Assume that the initial bit string of this round is initial bit string A (0100100001100101), and the random bit string randomly generated in this round is random bit string B (0110010001101100). The initial bit string A and the random bit string B are XORed, that is, 0 XOR 0=0, 1 XOR 1=0, 0 XOR 1=1, 0 XOR 0=0, 1 XOR 0=1, and the obtained intermediate bit string C is (0010110000001001).
[0122] In step 302, the intermediate bit string is XORed with the random bit string randomly generated by the second end in this round to obtain the verification bit string of this round.
[0123] In the specific implementation, assuming that the intermediate bit string is the intermediate bit string C (0010110000001001), and the random bit string randomly generated by the second end in this round is the random bit string D (1001101010000011), then the intermediate bit string C and the random bit string D are XORed, and the verification bit string of this round is (1011011010001010).
[0124] In step 303, the random bit string randomly generated in this round is sent to the second end so that the second end can determine the verification bit string of this round.
[0125] In a specific implementation, the first end sends the random bit string randomly generated in this round as random bit string B to the second end, so that the second end can determine the verification bit string of this round.
[0126] It should be noted that after the second end determines the second string to be verified corresponding to the first string to be verified, at least one round of verification bit string generation process can be performed on the second string to be verified. Figure 5 , is a flowchart of another verification bit string generation process provided in an embodiment of the present application, the method is applied to Figure 1 The method comprises the following steps:
[0127] In step 501, an initial bit string of this round is XORed with a random bit string randomly generated in this round to obtain an intermediate bit string.
[0128] Among them, if this round is the first round, the initial bit string is determined based on the second character string to be verified. If this round is not the first round, the initial bit string is determined based on the verification bit string obtained in the previous round. For example, the verification bit string obtained in the previous round is directly used as the initial bit string of this round. In this way, after multiple rounds of calculations, it is beneficial to further improve the data security in the data verification process.
[0129] The specific implementation process refers to step 301, and this application will not elaborate on it here.
[0130] In step 502, the intermediate bit string is XORed with the random bit string randomly generated by the first end in this round to obtain the verification bit string of this round.
[0131] The specific implementation process refers to step 302, and this application will not elaborate on it here.
[0132] In step 503, the random bit string randomly generated in this round is sent to the first end so that the first end can determine the verification bit string of this round.
[0133] In specific implementation, the verification result of the first string of characters to be verified is determined based on the first verification bit string obtained in the last round and the second verification bit string determined by the second end, and the hash value of the second verification bit string sent by the second end is received; the hash value of the first verification bit string is compared with the hash value of the second verification bit string to determine the verification result of the first string of characters to be verified.
[0134] Among them, if the hash value of the first verification bit string is equal to the hash value of the second verification bit string, the verification result of the first string to be verified is determined to be passed; if the hash value of the first verification bit string is not equal to the hash value of the second verification bit string, the verification result of the first string to be verified is determined to be failed.
[0135] Assume that the first end includes verification bit string A, character string A to be verified, initial bit string A, random bit string A, and intermediate bit string A, and the second end includes verification bit string B, character string B to be verified, initial bit string B, random bit string B, and intermediate bit string B.
[0136] Then, the verification bit string A = intermediate bit string A XOR random bit string B, because the intermediate bit string A = initial bit string A XOR random bit string A; therefore, the verification bit string A = initial bit string A XOR random bit string A XOR random bit string B; and the initial bit string A is determined based on the character string A to be verified.
[0137] Verification bit string B = intermediate bit string B XOR random bit string A. Since intermediate bit string B = initial bit string B XOR random bit string B, verification bit string B = initial bit string B XOR random bit string B XOR random bit string A. In addition, initial bit string B is determined according to character string B to be verified. It can be seen that verification bit string A and verification bit string B both contain random bit string A XOR random bit string B. If verification bit string B is the same as verification bit string A, it means that character string B to be verified is consistent with character string A to be verified. Otherwise, it means that character string B to be verified is consistent with character string A to be verified.
[0138] In this way, according to the generation process of the intermediate bit string and the generation process of the verification bit string in this scheme, there is randomness, and then the verification is performed according to the hash value of each verification bit string. Due to the irreversible nature of the hash value, the two ends cannot infer the verification bit string or the intermediate bit string through the hash value, which effectively ensures the data privacy and security in the data verification process. At the same time, compared with the prior art, the method for string data privacy verification, such as directly calculating the hash is to calculate the hash of the original data and then send it to the other party. Although the other party cannot directly perform hash inversion, it can continuously collect sample information and perform hash calculation matching. Therefore, this method has leakage. The security risk of the original image information of the hash value; the method of obfuscating circuits requires both parties to calculate and transmit the obfuscated truth table for each bit of the data. This method has a huge amount of communication and cannot meet the performance requirements of the business; the method of homomorphic encryption requires the sender to encrypt the full amount of data and send it to the other party's node. This method has the potential risk of ciphertext leaving the domain; the method of secret sharing requires additional steps such as multiplication triplet generation and multiplication secret sharing for equality verification calculation tasks, which brings a lot of computing performance loss. Therefore, this solution does not rely on complex operations such as obfuscating circuits and homomorphic encryption, nor does it require pre-calculation work such as multiplication triplets. It improves performance while protecting data privacy.
[0139] The data verification method of the present application is described below by taking the example of a first end receiving a hash value of a second verification bit string of a second end and verifying a verification result of a first character string to be verified of the first end.
[0140] Assume that the first string to be verified at the first end is (tom), the second string to be verified at the second end is (tom), the binary encoding rule is ASCII encoding, and 8 bits (i.e. one byte) are used to represent each ASCII character, the preset number of bits is set to 24, and a round of verification bit string generation process is set to be executed.
[0141] The first end performs the first to fourth steps of the verification bit string generation process as follows:
[0142] Step 1: Based on (tom) and ASCII encoding rules, determine the binary bit representation corresponding to each character in (tom): t: decimal: 116, binary: 01110100, o: decimal: 111, binary: 01101111, m: decimal: 109, binary: 01101101, and generate an initial bit string A of (011101000110111101101101), which meets the preset number of bits.
[0143] Step 2: Based on the initial bit string A, generate a random bit string A with the same number of bits as the initial bit string A. Assume that the random bit string A is (110001101100100100100111).
[0144] Step 3: XOR the initial bit string A with the random bit string A to obtain the intermediate bit string A.
[0145] In the specific implementation, the initial bit string A is XOR-ed with each bit in the random bit string A. The XOR result of the same bit is 0, and the XOR result of different bits is 1. The intermediate bit string A is (011101000110111101101101) XOR (110001101100100100100111) = (101100101010011001001010).
[0146] Step 4: Send the random bit string A to the second end, and receive the random bit string B sent by the second end.
[0147] Similarly, the second end performs the first to fourth steps of the verification bit string generation process as follows:
[0148] Step 1: Based on (tom) and ASCII encoding rules, determine the binary bit representation corresponding to each character in (tom), and generate an initial bit string B as (011101000110111101101101), which meets the preset number of bits.
[0149] Step 2: Based on the initial bit string B, generate a random bit string B with the same number of bits as the initial bit string B. Assume that the random bit string B is (011111000010011110001010).
[0150] Step 3: XOR the initial bit string B with the random bit string B to obtain the intermediate bit string B.
[0151] In the specific implementation, the initial bit string B is XOR-ed with each bit in the random bit string B. The XOR result of the same bit is 0, and the XOR result of the different bit is 1. The intermediate bit string B is (011101000110111101101) XOR (011111000010011110001010) = (000010000100100011100111).
[0152] Step 4: Send the random bit string B to the first end, and receive the random bit string A (110001101100100100100111) sent by the first end.
[0153] Step 5: XOR the intermediate bit string B with the random bit string A to obtain the verification bit string B.
[0154] In specific implementation, the intermediate bit string B is XOR-ed with each bit in the random bit string A, and the verification bit string B = (000010000100100011100111) XOR (110001101100100100100111) = (110011101000000111000000).
[0155] Step 6: Calculate the hash value of the verification bit string B and send it to the first end.
[0156] The first end performs the fifth to seventh steps of the verification bit string generation process as follows:
[0157] Step 5: XOR the intermediate bit string A with the random bit string B to obtain the verification bit string A.
[0158] In the specific implementation, the intermediate bit string A is XOR-ed with each bit in the random bit string B, and the verification bit string A = (101100101010011001001010) XOR (011111000010011110001010) = (110011101000000111000000).
[0159] Step 6: Calculate the hash value of the verification bit string A, and receive the hash value of the verification bit string B sent by the first end.
[0160] Step 7: Compare the hash value of verification bit string A with the hash value of verification bit string B to determine the verification result of the first character string to be verified.
[0161] Since the verification bit string A is the same as the verification bit string B, the obtained hash values must be the same. Therefore, the verification result of the first string to be verified is determined to be passed.
[0162] Assume again that the first string to be verified at the first end is (tom), the second string to be verified at the second end is (Tom), the binary encoding rule is ASCII encoding, and 8 bits (i.e., one byte) are used to represent each ASCII character, the preset number of bits is set to 24, and a round of verification bit string generation process is set to be executed.
[0163] The first end performs the first to fourth steps of the verification bit string generation process as follows:
[0164] Step 1: Based on (tom) and ASCII encoding rules, determine the binary bit representation corresponding to each character in (tom): t: decimal: 116, binary: 01110100, o: decimal: 111, binary: 01101111, m: decimal: 109, binary: 01101101, and generate an initial bit string A of (011101000110111101101101), which meets the preset number of bits.
[0165] Step 2: Based on the initial bit string A, generate a random bit string A with the same number of bits as the initial bit string A. Assume that the random bit string A is (110001101100100100100111).
[0166] Step 3: XOR the initial bit string A with the random bit string A to obtain the intermediate bit string A.
[0167] In the specific implementation, the initial bit string A is XOR-ed with each bit in the random bit string A. The XOR result of the same bit is 0, and the XOR result of different bits is 1. The intermediate bit string A is (011101000110111101101101) XOR (110001101100100100100111) = (101100101010011001001010).
[0168] Step 4: Send the random bit string A to the second end, and receive the random bit string B sent by the second end.
[0169] Similarly, the second end performs the first to fourth steps of the verification bit string generation process as follows:
[0170] Step 1: Based on (Tom) and ASCII encoding rules, determine the binary bit representation corresponding to each character in (tom): T: decimal: 84, binary: 01010100, o: decimal: 111, binary: 01101111, m: decimal: 109, binary: 01101101, and generate an initial bit string B of (010101000110111101101101), which meets the preset number of bits.
[0171] Step 2: Based on the initial bit string B, generate a random bit string B with the same number of bits as the initial bit string B. Assume that the random bit string B is (011111000010011110001010).
[0172] Step 3: XOR the initial bit string B with the random bit string B to obtain the intermediate bit string B.
[0173] In the specific implementation, the initial bit string B is XOR-ed with each bit in the random bit string B. The XOR result of the same bit is 0, and the XOR result of different bits is 1. The intermediate bit string B is (010101000110111101101) XOR (011111000010011110001010) = (001010000100100011100111).
[0174] Step 4: Send the random bit string B to the first end, and receive the random bit string A (110001101100100100100111) sent by the first end.
[0175] Step 5: XOR the intermediate bit string B with the random bit string A to obtain the verification bit string B.
[0176] In specific implementation, the intermediate bit string B is XOR-ed with each bit in the random bit string A, and the verification bit string B = (001010000100100011100111) XOR (110001101100100100100111) = (111011101000000111000000).
[0177] Step 6: Calculate the hash value of the verification bit string B and send it to the first end.
[0178] The first end performs the fifth to seventh steps of the verification bit string generation process as follows:
[0179] Step 5: XOR the intermediate bit string A with the random bit string B to obtain the verification bit string A.
[0180] In the specific implementation, the intermediate bit string A is XOR-ed with each bit in the random bit string B, and the verification bit string A = (101100101010011001001010) XOR (011111000010011110001010) = (110011101000000111000000).
[0181] Step 6: Calculate the hash value of the verification bit string A, and receive the hash value of the verification bit string B sent by the first end.
[0182] Step 7: Compare the hash value of verification bit string A with the hash value of verification bit string B to determine the verification result of the first character string to be verified.
[0183] Since, verification bit string A = (110011101000000111000000), verification bit string B = (111011101000000111000000), verification bit string A is different from verification bit string B, so the obtained hash values must be different. Therefore, it can be determined that the verification result of the first character string to be verified is failure to pass the verification.
[0184] Based on the same inventive concept, the present application embodiment provides a data verification device, please refer to Figure 6 , the device comprises:
[0185] The determination module 601 is used to determine, in response to the data verification instruction, a first string to be verified indicated by the data verification instruction, and notify the second end to determine a verification bit string of a second string to be verified corresponding to the first string to be verified;
[0186] A verification module 602 is used to perform at least one round of verification bit string generation process on the first string to be verified, and determine the verification result of the first string to be verified according to the first verification bit string obtained in the last round and the second verification bit string determined by the second end, or send the hash value of the first verification bit string obtained in the last round to the second end to determine the verification result of the second string to be verified;
[0187] The generation process of any round of verification bit string includes the following steps:
[0188] Performing XOR processing on the initial bit string of this round and the random bit string randomly generated in this round to obtain an intermediate bit string, wherein if this round is the first round, the initial bit string is determined based on the first string to be verified; if this round is not the first round, the initial bit string is determined based on the verification bit string obtained in the previous round;
[0189] XOR processing is performed on the intermediate bit string and the random bit string randomly generated in this round received by the second end to obtain the verification bit string of this round, wherein the number of bits of the random bit string is the same as the number of bits of the initial bit string; and the random bit string randomly generated in this round is sent to the second end so that the second end can determine the verification bit string of this round.
[0190] In a possible embodiment, the verification module 602 generates the initial bit string of the first round in the following manner:
[0191] Determine a binary bit representation corresponding to each character in the first character string to be verified based on the first character string to be verified and a preset character binary encoding rule;
[0192] The initial bit string is determined based on the binary bit representation corresponding to each character in the first character string to be verified.
[0193] In a possible embodiment, before the verification module 602 determines the binary bit representation corresponding to each character in the first character string to be verified based on the first character string to be verified and a preset character binary encoding rule, the verification module 602 is further configured to:
[0194] It is determined that the character length of the first to-be-verified character string is less than a preset character length.
[0195] In a possible embodiment, after the verification module 602 determines the initial bit string, the verification module 602 is further configured to:
[0196] Determining whether the number of bits of the initial bit string meets a preset number of bits;
[0197] If the number of bits of the initial bit string is less than the preset number of bits, based on the preset bit code, the preset bit code is padded at the front end of the initial bit string until the number of bits of the initial bit string after padding is equal to the preset number of bits.
[0198] In a possible embodiment, the verification module 602 is specifically used for:
[0199] Receiving a hash value of the second verification bit string sent by the second end;
[0200] Comparing the hash value of the first verification bit string with the hash value of the second verification bit string;
[0201] If the hash value of the first verification bit string is equal to the hash value of the second verification bit string, determining that the verification result of the first character string to be verified is passed;
[0202] If the hash value of the first verification bit string is not equal to the hash value of the second verification bit string, it is determined that the verification result of the first character string to be verified is verification failure.
[0203] In a possible embodiment, the first end is a receiving end, and the second end is a sending end, then the first character string to be verified is part or all of the production data sent by the second end to the first end; the second character string to be verified is the target production data corresponding to the first character string to be verified in the production data of the second end; or
[0204] The first end is a sending end and the second end is a receiving end, then the first string to be verified is part or all of the production data of the first end, and the second string to be verified is the target production data corresponding to the first string to be verified in the production data sent by the first end to the second end.
[0205] Based on the same inventive concept, the present application embodiment provides an electronic device, which can realize the functions of the data verification device discussed above. Please refer to Figure 7 The device includes a memory 701, one or more processors 702 and a bus 703.
[0206] The memory 701 is used to store computer programs executed by the processor 701. The memory 701 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and programs required for running the instant messaging function, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.
[0207] The memory 701 may be a volatile memory, such as a random-access memory (RAM); the memory 701 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or the memory 701 may be any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 701 may be a combination of the above memories.
[0208] The processor 702 may include one or more central processing units (CPU) or a digital processing unit, etc. The processor 702 is used to implement the data verification method in the above embodiment when calling the computer program stored in the memory 702 .
[0209] The specific connection medium between the memory 701 and the processor 702 is not limited in the embodiment of the present application. Figure 7 In the embodiment, the memory 701 and the processor 702 are connected via a bus 703. The bus 703 is connected to the processor 702 via a bus 703. Figure 7 The connections between other components are shown in bold lines, which are only for illustration and are not intended to be limiting. Bus 703 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0210] Based on the same inventive concept, the embodiment of the present application provides a computer-readable storage medium, and the computer program product includes: computer program code, when the computer program code is run on a computer, the computer executes any of the data verification methods discussed above. Since the principle of solving the problem by the above-mentioned computer-readable storage medium is similar to that of the data verification method, the implementation of the above-mentioned computer-readable storage medium can refer to the implementation of the method, and the repeated parts will not be repeated.
[0211] Based on the same inventive concept, the embodiment of the present application also provides a computer program product, which includes: computer program code, when the computer program code is run on a computer, the computer executes any of the data verification methods discussed above. Since the principle of solving the problem by the above computer program product is similar to that of the data verification method, the implementation of the above computer program product can refer to the implementation of the method, and the repeated parts will not be repeated.
[0212] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0213] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0214] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0215] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of user-operated steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0216] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A data verification method, characterized in that: Applied to the first end, the method comprises: In response to the data verification instruction, determine a first string to be verified indicated by the data verification instruction, and notify the second end to determine a verification bit string of a second string to be verified corresponding to the first string to be verified; Perform at least one round of verification bit string generation process on the first string to be verified, and determine the verification result of the first string to be verified according to the first verification bit string obtained in the last round and the second verification bit string determined by the second end, or send the hash value of the first verification bit string obtained in the last round to the second end, so as to determine the verification result of the second string to be verified; The generation process of any round of verification bit string includes the following steps: Performing XOR processing on the initial bit string of this round and the random bit string randomly generated in this round to obtain an intermediate bit string, wherein if this round is the first round, the initial bit string is determined based on the first string to be verified; if this round is not the first round, the initial bit string is determined based on the verification bit string obtained in the previous round; XOR processing is performed on the intermediate bit string and the random bit string randomly generated in this round received by the second end to obtain the verification bit string of this round, wherein the number of bits of the random bit string is the same as the number of bits of the initial bit string; and the random bit string randomly generated in this round is sent to the second end so that the second end can determine the verification bit string of this round.
2. The method according to claim 1, characterized in that The initial bit string for the first round is generated in the following way: Determine a binary bit representation corresponding to each character in the first character string to be verified based on the first character string to be verified and a preset character binary encoding rule; The initial bit string is determined based on the binary bit representation corresponding to each character in the first character string to be verified.
3. The method according to claim 2, characterized in that Before determining the binary bit representation corresponding to each character in the first character string to be verified based on the first character string to be verified and a preset character binary encoding rule, the method further includes: It is determined that the character length of the first to-be-verified character string is less than a preset character length.
4. The method according to claim 2, characterized in that After determining the initial bit string, the method further includes: Determining whether the number of bits of the initial bit string meets a preset number of bits; If the number of bits of the initial bit string is less than the preset number of bits, based on the preset bit code, the preset bit code is padded at the front end of the initial bit string until the number of bits of the initial bit string after padding is equal to the preset number of bits.
5. The method according to claim 1, characterized in that The method of determining a verification result of the first character string to be verified according to the first verification bit string obtained in the last round and the second verification bit string determined by the second end includes: Receiving a hash value of the second verification bit string sent by the second end; Comparing the hash value of the first verification bit string with the hash value of the second verification bit string; If the hash value of the first verification bit string is equal to the hash value of the second verification bit string, determining that the verification result of the first character string to be verified is passed; If the hash value of the first verification bit string is not equal to the hash value of the second verification bit string, it is determined that the verification result of the first character string to be verified is verification failure.
6. The method according to any one of claims 1 to 5, characterized in that: The first end is a receiving end, and the second end is a sending end, then the first character string to be verified is part or all of the production data sent by the second end to the first end; the second character string to be verified is the target production data corresponding to the first character string to be verified in the production data of the second end; or The first end is a sending end and the second end is a receiving end, then the first string to be verified is part or all of the production data of the first end, and the second string to be verified is the target production data corresponding to the first string to be verified in the production data sent by the first end to the second end.
7. A data verification device, characterized in that: Configured at the first end, the device includes: a determination module, configured to determine, in response to a data verification instruction, a first string to be verified indicated by the data verification instruction, and notify the second end to determine a verification bit string of a second string to be verified corresponding to the first string to be verified; a verification module, configured to perform at least one round of verification bit string generation process on the first string to be verified, and determine a verification result of the first string to be verified based on the first verification bit string obtained in the last round and the second verification bit string determined by the second end, or send a hash value of the first verification bit string obtained in the last round to the second end, so as to determine a verification result of the second string to be verified; The generation process of any round of verification bit string includes the following steps: Performing XOR processing on the initial bit string of this round and the random bit string randomly generated in this round to obtain an intermediate bit string, wherein if this round is the first round, the initial bit string is determined based on the first string to be verified; if this round is not the first round, the initial bit string is determined based on the verification bit string obtained in the previous round; XOR processing is performed on the intermediate bit string and the random bit string randomly generated in this round received by the second end to obtain the verification bit string of this round, wherein the number of bits of the random bit string is the same as the number of bits of the initial bit string; and the random bit string randomly generated in this round is sent to the second end so that the second end can determine the verification bit string of this round.
8. The device according to claim 7, characterized in that The verification module generates the initial bit string of the first round in the following manner: Determine a binary bit representation corresponding to each character in the first character string to be verified based on the first character string to be verified and a preset character binary encoding rule; The initial bit string is determined based on the binary bit representation corresponding to each character in the first character string to be verified.
9. The device according to claim 8, characterized in that Before the verification module determines the binary bit representation corresponding to each character in the first character string to be verified based on the first character string to be verified and a preset character binary encoding rule, the verification module is further configured to: It is determined that the character length of the first to-be-verified character string is less than a preset character length.
10. The device according to claim 8, characterized in that After the verification module determines the initial bit string, the verification module is further used to: Determining whether the number of bits of the initial bit string meets a preset number of bits; If the number of bits of the initial bit string is less than the preset number of bits, based on the preset bit code, the preset bit code is padded at the front end of the initial bit string until the number of bits of the initial bit string after padding is equal to the preset number of bits.
11. The device according to claim 7, characterized in that The verification module is specifically used for: Receiving a hash value of the second verification bit string sent by the second end; Comparing the hash value of the first verification bit string with the hash value of the second verification bit string; If the hash value of the first verification bit string is equal to the hash value of the second verification bit string, determining that the verification result of the first character string to be verified is passed; If the hash value of the first verification bit string is not equal to the hash value of the second verification bit string, it is determined that the verification result of the first character string to be verified is verification failure.
12. The device according to any one of claims 7 to 11, characterized in that: The first end is a receiving end, and the second end is a sending end, then the first character string to be verified is part or all of the production data sent by the second end to the first end; the second character string to be verified is the target production data corresponding to the first character string to be verified in the production data of the second end; or The first end is a sending end and the second end is a receiving end, then the first string to be verified is part or all of the production data of the first end, and the second string to be verified is the target production data corresponding to the first string to be verified in the production data sent by the first end to the second end.
13. An electronic device, characterized in that: include: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory, and execute the steps included in any one of claims 1-6 according to the obtained program instructions.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method according to any one of claims 1 to 6.
15. A computer program product, characterized in that The computer program product comprises: a computer program code, and when the computer program code is run on a computer, the computer is enabled to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Behavior verification method, node, and system in blockchain, and electronic device
CN108833095A
Data processing method and device and storage medium
CN114422209A
Data verification method, terminal and storage medium
CN114785502A
Systems and methods for secure data transmission
US20200119927A1
