File verification method and device based on memristor cross array and computer equipment

CN116204930BActive Publication Date: 2026-08-18TSINGHUA UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111442318.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2026-08-18
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

[0004]然而,采用单向散列函数进行文件校验时会涉及大量的运算,在硬件层面,这些运算采用基础的与门、或门、非门进行组合来实现,不仅会消耗大量的运算时间,还会占用大量的硬件资源

Benefits of technology

[0059] The aforementioned file verification method, apparatus, computer device, storage medium, and computer program product based on memristor cross arrays obtain bit grouping results corresponding to a target file. The bit grouping results include bit groups obtained by grouping the bit sequence of the target file based on a preset number of bits. Based on the memristor cross array, a preset one-way hash function, and the bit groups, a target hash value corresponding to the target file is determined. The memristor cross array is used to perform XOR operations in the one-way hash function. The number of rows in the memristor cross array is determined according to the preset number of bits, and the number of columns in the memristor cross array is determined according to the maximum number of consecutive XOR operations in the one-way hash function. Based on the target hash value corresponding to the target file and the reference hash value corresponding to a pre-stored reference file, a file verification result corresponding to the target file is obtained. Logical XOR operations in computers are divided into multiple XOR consecutive operations and bitwise XOR operations. In multiple XOR consecutive operations (e.g.: Performing a multi-OR operation on k characters requires k-1 logical XOR calculations. In bitwise XOR operations (e.g.: Performing a bitwise XOR operation on n m-bit strings requires (n-1)*m logical XOR calculations. However, the memristor cross-array in this application can perform XOR operations in a one-way hash function, unaffected by the number of consecutive XOR operations or the number of bits in the bitwise XOR operation. It can obtain the result in one step for both multiple consecutive XOR operations and bitwise XOR operations, significantly reducing the XOR operation time and effectively improving the efficiency of XOR operations, thereby reducing the computation time for file verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116204930B_ABST
    Figure CN116204930B_ABST
Patent Text Reader

Abstract

The application relates to a file verification method and device based on a memristor cross array, computer equipment, a storage medium and a computer program product. The method comprises the following steps: obtaining a bit grouping result corresponding to a target file; the bit grouping result comprises bit groups obtained by grouping a bit sequence of the target file based on a preset bit number; determining a target hash value corresponding to the target file based on a memristor cross array, a preset one-way hash function and the bit groups; the memristor cross array is used for performing exclusive or operation processing in the one-way hash function, the number of rows of the memristor cross array is determined according to the preset bit number, and the number of columns of the memristor cross array is determined according to the maximum number of continuous exclusive or operation processing in the one-way hash function; and obtaining a file verification result corresponding to the target file according to the target hash value corresponding to the target file and a reference hash value corresponding to a reference file stored in advance. The method can reduce the operation time of file verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a file verification method, apparatus, computer device, storage medium, and computer program product based on a memristor cross array. Background Technology

[0002] With the continuous development of computer technology, software and other files are frequently subjected to unauthorized attacks. Therefore, it is essential to determine the integrity and consistency of files to ensure that they have not been tampered with.

[0003] In related technologies, file verification is commonly used to determine the integrity or consistency of files. One-way hash functions are one of the important functions in the file verification process.

[0004] However, using one-way hash functions for file verification involves a large amount of computation. At the hardware level, these computations are implemented by combining basic AND, OR, and NOT gates, which not only consumes a lot of computation time but also occupies a lot of hardware resources. Summary of the Invention

[0005] Therefore, it is necessary to provide a file verification method, apparatus, computer device, computer-readable storage medium, and computer program product based on memristor cross array that can reduce computation time in response to the above-mentioned technical problems.

[0006] Firstly, this application provides a file verification method based on a memristor cross array. The method includes:

[0007] Obtain the bit grouping result corresponding to the target file; the bit grouping result includes bit groups obtained by grouping the bit sequence of the target file based on a preset number of bits.

[0008] Based on the memristor cross array, the preset one-way hash function, and the bit group, the target hash value corresponding to the target file is determined; the memristor cross array is used to perform the XOR operation processing in the one-way hash function, the number of rows of the memristor cross array is determined according to the preset number of bits, and the number of columns of the memristor cross array is determined according to the maximum number of consecutive XOR operations in the one-way hash function;

[0009] Based on the target hash value corresponding to the target file and the base hash value corresponding to the pre-stored base file, the file verification result corresponding to the target file is obtained.

[0010] In one embodiment, the process by which the memristor cross array performs the XOR operation in the one-way hash function includes:

[0011] Obtain at least two file value groups that are XORed in the one-way hash function; the file value groups include the bit groups.

[0012] Based on the at least two sets of file values, the resistance type of each memristor in the memristor cross array is determined; the resistance type includes a high-resistance state and a low-resistance state.

[0013] Power each memristor is supplied with a preset voltage, and the reference current corresponding to the low-resistance memristor and the row current corresponding to each row of memristors in the memristor cross array are obtained.

[0014] Based on the reference current and the row current corresponding to each of the memristor rows, the XOR operation result of the XOR operation in the one-way hash function is determined.

[0015] In one embodiment, determining the resistance type of each memristor in the memristor cross array based on the at least two file value groups includes:

[0016] In the at least two groups of file values, determine the file values ​​with the same bits;

[0017] For each bit in the file value group, determine the target row number corresponding to the bit in the memristor cross array, and determine the resistance type of each memristor in the target row number according to the file value corresponding to the bit.

[0018] In one embodiment, determining the XOR operation result of the XOR operation in the one-way hash function based on the reference current and the row current corresponding to each of the memristor rows includes:

[0019] For each memristor row, determine the current ratio between the row current corresponding to the memristor row and the reference current;

[0020] If the current ratio is odd, then the result of the XOR operation of the bits corresponding to the memristor row is determined to be the first file value;

[0021] If the current ratio is not odd, then the result of the XOR operation of the bits corresponding to the memristor row is determined to be the second file value;

[0022] The result of the XOR operation on the bits corresponding to each memristor row constitutes the result of the XOR operation processing.

[0023] In one embodiment, determining the target hash value corresponding to the target file based on the memristor cross array, a preset one-way hash function, and the bit group includes:

[0024] Based on the memristor cross array, the input value of the preset stirring function is determined according to the internal state bits and the bit group; the internal state bits are the preset number of bits contained in the internal state corresponding to the target file;

[0025] The internal state is updated based on the output value of the stirring function;

[0026] Based on the internal state after the update stops, the target hash value corresponding to the target file is obtained.

[0027] In one embodiment, the processing of the stirring function includes:

[0028] Based on the memristor cross array, the first column of results corresponding to the first column of input values ​​is determined according to the file value in the first column of input values ​​of the stirring function; based on the memristor cross array, the second column of results corresponding to the second column of input values ​​is determined according to the file value in the second column of input values ​​of the stirring function.

[0029] Based on the results in the first column and the second column, determine the permutation result;

[0030] According to preset movement rules and preset asymmetry rules, the displacement result is subjected to movement and asymmetry operations to obtain the output value of the stirring function.

[0031] Secondly, this application also provides a file verification device based on a memristor cross array. The device includes:

[0032] The acquisition module is used to acquire the bit grouping result corresponding to the target file; the bit grouping result includes bit groups obtained by grouping the bit sequence of the target file based on a preset number of bits.

[0033] The determination module is used to determine the target hash value corresponding to the target file based on the memristor cross array, the preset one-way hash function, and the bit group; the memristor cross array is used to perform the XOR operation processing in the one-way hash function, the number of rows of the memristor cross array is determined according to the preset number of bits, and the number of columns of the memristor cross array is determined according to the maximum number of consecutive XOR operations in the one-way hash function;

[0034] The verification module is used to obtain the file verification result corresponding to the target file based on the target hash value corresponding to the target file and the benchmark hash value corresponding to the pre-stored benchmark file.

[0035] In one embodiment, the determining module is specifically used for:

[0036] Obtain at least two file value groups that are XORed in the one-way hash function; the file value groups include the bit groups.

[0037] Based on the at least two sets of file values, the resistance type of each memristor in the memristor cross array is determined; the resistance type includes a high-resistance state and a low-resistance state.

[0038] Power each memristor is supplied with a preset voltage, and the reference current corresponding to the low-resistance memristor and the row current corresponding to each row of memristors in the memristor cross array are obtained.

[0039] Based on the reference current and the row current corresponding to each of the memristor rows, the XOR operation result of the XOR operation in the one-way hash function is determined.

[0040] In one embodiment, the determining module is specifically used for:

[0041] In the at least two groups of file values, determine the file values ​​with the same bits;

[0042] For each bit in the file value group, determine the target row number corresponding to the bit in the memristor cross array, and determine the resistance type of each memristor in the target row number according to the file value corresponding to the bit.

[0043] In one embodiment, the determining module is specifically used for:

[0044] For each memristor row, determine the current ratio between the row current corresponding to the memristor row and the reference current;

[0045] If the current ratio is odd, then the result of the XOR operation of the bits corresponding to the memristor row is determined to be the first file value;

[0046] If the current ratio is not odd, then the result of the XOR operation of the bits corresponding to the memristor row is determined to be the second file value;

[0047] The result of the XOR operation on the bits corresponding to each memristor row constitutes the result of the XOR operation processing.

[0048] In one embodiment, the determining module is specifically used for:

[0049] Based on the memristor cross array, the input value of the preset stirring function is determined according to the internal state bits and the bit group; the internal state bits are the preset number of bits contained in the internal state corresponding to the target file;

[0050] The internal state is updated based on the output value of the stirring function;

[0051] Based on the internal state after the update stops, the target hash value corresponding to the target file is obtained.

[0052] In one embodiment, the determining module is specifically used for:

[0053] Based on the memristor cross array, the first column of results corresponding to the first column of input values ​​is determined according to the file value in the first column of input values ​​of the stirring function; based on the memristor cross array, the second column of results corresponding to the second column of input values ​​is determined according to the file value in the second column of input values ​​of the stirring function.

[0054] Based on the results in the first column and the second column, determine the permutation result;

[0055] According to preset movement rules and preset asymmetry rules, the displacement result is subjected to movement and asymmetry operations to obtain the output value of the stirring function.

[0056] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps described in the first aspect.

[0057] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the steps described in the first aspect.

[0058] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps described in the first aspect.

[0059] The aforementioned file verification method, apparatus, computer device, storage medium, and computer program product based on memristor cross arrays obtain bit grouping results corresponding to a target file. The bit grouping results include bit groups obtained by grouping the bit sequence of the target file based on a preset number of bits. Based on the memristor cross array, a preset one-way hash function, and the bit groups, a target hash value corresponding to the target file is determined. The memristor cross array is used to perform XOR operations in the one-way hash function. The number of rows in the memristor cross array is determined according to the preset number of bits, and the number of columns in the memristor cross array is determined according to the maximum number of consecutive XOR operations in the one-way hash function. Based on the target hash value corresponding to the target file and the reference hash value corresponding to a pre-stored reference file, a file verification result corresponding to the target file is obtained. Logical XOR operations in computers are divided into multiple XOR consecutive operations and bitwise XOR operations. In multiple XOR consecutive operations (e.g.: Performing a multi-OR operation on k characters requires k-1 logical XOR calculations. In bitwise XOR operations (e.g.: Performing a bitwise XOR operation on n m-bit strings requires (n-1)*m logical XOR calculations. However, the memristor cross-array in this application can perform XOR operations in a one-way hash function, unaffected by the number of consecutive XOR operations or the number of bits in the bitwise XOR operation. It can obtain the result in one step for both multiple consecutive XOR operations and bitwise XOR operations, significantly reducing the XOR operation time and effectively improving the efficiency of XOR operations, thereby reducing the computation time for file verification. Attached Figure Description

[0060] Figure 1 This is a flowchart illustrating a file verification method based on a memristor cross array in one embodiment;

[0061] Figure 2 This is a flowchart illustrating the steps for determining the target hash value corresponding to a target file in one embodiment;

[0062] Figure 3 This is a flowchart illustrating the processing procedure of the stirring function in one embodiment;

[0063] Figure 4 A schematic diagram of an embodiment that determines a permutation result;

[0064] Figure 5 This is a flowchart illustrating the process of a memristor cross array performing an XOR operation in a one-way hash function in one embodiment.

[0065] Figure 6 This is a flowchart illustrating the steps for determining the resistance type of each memristor in a memristor cross array in one embodiment.

[0066] Figure 7 This is a schematic diagram illustrating the determination of file values ​​with the same bit in five file value groups in one embodiment;

[0067] Figure 8 This is a schematic diagram illustrating the resistance type of each memristor in a memristor cross array in one embodiment;

[0068] Figure 9 This is a flowchart illustrating the steps for determining the XOR operation result in a one-way hash function, as shown in one embodiment.

[0069] Figure 10 This is a schematic diagram of an XOR operation simulation circuit in one embodiment;

[0070] Figure 11This is a structural block diagram of a file verification device based on a memristor cross array in one embodiment;

[0071] Figure 12 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0072] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0073] In one embodiment, such as Figure 1 As shown, a file verification method based on a memristor cross array is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. The server can be implemented using a standalone server or a server cluster composed of multiple servers. In this embodiment, the method includes the following steps:

[0074] Step 101: Obtain the bit grouping results corresponding to the target file.

[0075] The bit grouping results include bit groups obtained by grouping the bit sequence of the target file based on a preset number of bits.

[0076] In this embodiment, the terminal can first obtain the original bit sequence of the target file. Then, the terminal can pad the original bit sequence of the target file and use the padded sequence as the bit sequence of the target file. Next, the terminal can group the bit sequence of the target file based on a preset number of bits to obtain the bit grouping result corresponding to the target file. The target file can be a text document, an image, or a program.

[0077] In one example, the terminal can first use a custom bit sequence as a padding bit sequence, and then append this padding bit sequence to the original bit sequence in the target file. For example, the values ​​of the padding bit sequence can all be 0 or 1.

[0078] Step 102: Determine the target hash value corresponding to the target file based on the memristor cross array, the preset one-way hash function, and the bit group.

[0079] The memristor cross array is used to perform the XOR operation in the one-way hash function. The number of rows of the memristor cross array is determined according to the preset number of bits, and the number of columns of the memristor cross array is determined according to the maximum number of consecutive XOR operations in the one-way hash function.

[0080] In this embodiment, the terminal can first determine the number of rows of the memristor cross array based on a preset number of bits. Then, the terminal can determine the number of columns of the memristor cross array based on the maximum number of consecutive XOR operations in a preset one-way hash function. Next, the terminal can construct the memristor cross array based on the number of rows and columns of the memristor cross array. Then, the terminal can calculate the target hash value corresponding to the target file based on the preset one-way hash function and the bit group corresponding to the target file. Furthermore, the terminal can use the constructed memristor cross array to perform all or part of the XOR operations in the one-way hash function.

[0081] Step 103: Based on the target hash value corresponding to the target file and the base hash value corresponding to the pre-stored base file, obtain the file verification result corresponding to the target file.

[0082] In this embodiment, the terminal can pre-store the reference hash value corresponding to the reference file. The reference hash value is determined based on a memristor cross-array, a preset one-way hash function, and the bit groups of the reference file. Then, the terminal can compare the target hash value corresponding to the target file with the pre-stored reference hash value corresponding to the reference file. If the target hash value of the target file and the pre-stored reference hash value are the same, the terminal can determine that the target file is consistent with the reference file. If the target hash value of the target file and the pre-stored reference hash value are different, the terminal can determine that the target file is inconsistent with the reference file. The file verification result corresponding to the target file can indicate whether the target file and the reference file are consistent.

[0083] In the aforementioned file verification method based on memristor cross arrays, the terminal determines the target hash value corresponding to the target file based on the memristor cross array, a preset one-way hash function, and the bit group corresponding to the target file. Specifically, the terminal uses the memristor cross array to perform the XOR operation in the one-way hash function. Logical XOR operations in computers are divided into multiple XOR consecutive operations and bitwise XOR operations. In multiple XOR consecutive operations (e.g.: Performing a multi-OR operation on k characters requires k-1 logical XOR calculations. In bitwise XOR operations (e.g.: Performing a bitwise XOR operation on n m-bit strings requires (n-1)*m logical XOR calculations. However, this memristor cross-array can perform XOR operations in a one-way hash function, unaffected by the number of consecutive XOR operations or the number of bits in the bitwise XOR operation. It can obtain the result in one step for both multiple consecutive XOR operations and bitwise XOR operations, significantly reducing the XOR operation time and effectively improving efficiency, thus reducing file verification time. Furthermore, at the algorithm level, multiple logical XOR calculations are typically implemented using a while loop. At the hardware level, due to the large number of components required for logical XOR circuits, basic AND, OR, and NOT gates are often used to implement logical XOR calculations. For a large number of XOR operations, this consumes a significant amount of computation time at the algorithm level and substantial hardware resources at the hardware level. The number of rows in the memristor cross array is determined by a preset number of bits, and the number of columns in the memristor cross array is determined by the maximum number of consecutive XOR operations in the one-way hash function. In other words, the memristor cross array can sequentially and repeatedly execute all XOR operations in the one-way hash function, greatly reducing the occupation of hardware resources.

[0084] To facilitate understanding, the calculation process of the target hash value is first explained in the embodiments of this application. For example... Figure 2 As shown, the specific process of determining the target hash value corresponding to the target file based on the memristor cross array, the preset one-way hash function, and the bit group includes the following steps:

[0085] Step 201: Based on the memristor cross array, determine the input value of the preset stirring function according to the internal state bits and bit groups.

[0086] Among them, the internal state bits are the preset number of bits contained in the internal state corresponding to the target file.

[0087] In this embodiment, the terminal can first determine the internal state corresponding to the target file in a preset one-way hash function. The initial internal state corresponding to the target file can be a sequence of all zeros. Then, the terminal can, in the internal state corresponding to the target file, take a preset number of bits as internal state bits and the remaining bits as surplus bits, in a forward-to-back order. Next, the terminal can perform an XOR operation on the internal state bits and the bit group corresponding to the target file based on a memristor cross-array to determine the result of the internal state XOR operation. Then, the terminal can sort the internal state XOR operation result and the surplus bits in a forward-to-back order to form the input value of a preset stirring function.

[0088] Step 202: Update the internal state based on the output value of the stirring function.

[0089] In this embodiment, the terminal can first calculate the output value of the stirring function based on a preset stirring function and its input value. Then, the terminal can use the calculated output value of the stirring function as the new internal state corresponding to the target file, thus updating the internal state of the target file.

[0090] Step 203: Based on the internal state after the update stops, obtain the target hash value corresponding to the target file.

[0091] In this embodiment, after the last bit group corresponding to the target file participates in updating the internal state of the target file, the terminal can stop updating the internal state of the target file. Then, the terminal can perform a preset extrusion operation on the internal state after the update stops to obtain the target hash value corresponding to the target file.

[0092] Specifically, the terminal can first use the internal state after the update stops as the output state. Then, the terminal can use a preset number of bits from the output state as output packets. Next, the terminal can use the output state as the input value of the stirring function to obtain the output value of the stirring function. The terminal then uses the output value of the stirring function as the new output state corresponding to the target file, completing the update of the output state corresponding to the target file. Finally, the terminal uses all the obtained output packets to form the target hash value corresponding to the target file.

[0093] In the aforementioned file verification method based on a memristor cross array, the terminal, using the memristor cross array, determines the input value of a preset stirring function based on the internal state bits and bit groups, and obtains the target hash value corresponding to the target file based on the input value of the stirring function. Specifically, the terminal can use the memristor cross array to perform bitwise XOR operations on the internal state bits and bit groups in the one-way hash function. The time to obtain the XOR result is not affected by the number of bits in the bitwise XOR operation, allowing for a one-step calculation and significantly reducing the XOR operation time. This effectively improves the efficiency of the XOR operation and reduces the computation time for file verification. Furthermore, the memristor cross array can sequentially and repeatedly perform bitwise XOR operations on all internal state bits and bit groups in the one-way hash function, greatly reducing hardware resource consumption.

[0094] In one embodiment, such as Figure 3 As shown, the specific process of the stirring function includes the following steps:

[0095] Step 301: Based on the memristor cross array, determine the first column result corresponding to the first column input value according to the file value in the first column input value of the stirring function; based on the memristor cross array, determine the second column result corresponding to the second column input value according to the file value in the second column input value of the stirring function.

[0096] In this embodiment, the terminal can first divide the input values ​​of the stirring function into column input value groups. Each column input value group includes the first column input values ​​and the second column input values ​​that require a substitution operation in the stirring function.

[0097] For each column of input values, the terminal can first use the file values ​​in the first column of the stirring function's input values ​​as the first column of file values ​​to perform a continuous XOR operation. Then, the terminal can perform a continuous XOR operation on the first column of file values ​​based on the memristor cross array. Next, the terminal can use the result of the continuous XOR operation corresponding to the first column of file values ​​as the first column of results corresponding to the first column of input values. Simultaneously, the terminal can first use the file values ​​in the second column of the stirring function's input values ​​as the second column of file values ​​to perform a continuous XOR operation. Then, the terminal can perform a continuous XOR operation on the second column of file values ​​based on the memristor cross array. Next, the terminal can use the result of the continuous XOR operation corresponding to the second column of file values ​​as the second column of results corresponding to the second column of input values.

[0098] For example, such as Figure 4 As shown, a column of input values ​​includes the first column of input values ​​(1, 0, 1, 1, 0) and the second column of input values ​​(0, 0, 1, 1, 0) that require substitution operations in the stirring function. The terminal can perform a series of XOR operations on the first column of file values ​​based on the memristor cross array, resulting in a value of 1 for the first column. Simultaneously, the terminal can perform a series of XOR operations on the second column of file values ​​based on the memristor cross array, resulting in a value of 0 for the second column.

[0099] Step 302: Determine the permutation result based on the results in the first column and the second column.

[0100] In this embodiment, for each column input value group, the terminal can first perform an XOR operation on the first and second column results based on the memristor cross array to obtain the column XOR operation result. Then, the terminal can permutate the column XOR operation result according to a preset permutation rule to determine the sub-permutation result. Next, the terminal can use the sub-permutation results corresponding to each column input value group to form the permutation result.

[0101] For example, such as Figure 4 As shown, the first column result is 1, and the second column result is 0. The terminal first performs an XOR operation on the first and second column results based on the memristor cross array, obtaining a column XOR result of 1. Then, the terminal permutes the column XOR result 1 according to a preset permutation rule to determine the sub-permutation result.

[0102] Step 303: According to the preset movement rules and preset asymmetric rules, perform movement and asymmetric operations on the displacement results to obtain the output value of the stirring function.

[0103] In this embodiment, the terminal can move the displacement result according to a preset movement rule to obtain the movement result corresponding to the target file. Then, the terminal can perform asymmetric operations on the displacement result according to a preset asymmetric rule to obtain the output value of the stirring function.

[0104] In the aforementioned file verification method based on a memristor cross array, the terminal performs multiple XOR consecutive operations on the file values ​​in all columns of the input values ​​of the stirring function, based on the memristor cross array, to determine the column results corresponding to each column input value. This memristor cross array can be used to perform the XOR operation processing in the stirring function, and the time to obtain the XOR operation result is not affected by the number of consecutive XOR operations, allowing for a one-step calculation result, thus significantly reducing the XOR operation time and effectively improving the efficiency of the XOR operation, thereby reducing the file verification computation time. Furthermore, this memristor cross array can simultaneously perform multiple XOR consecutive operations on the column input values ​​in the stirring function, further reducing the file verification computation time.

[0105] In one embodiment, such as Figure 5 As shown, the specific process of the memristor cross array performing the XOR operation in the one-way hash function includes the following steps:

[0106] Step 501: Obtain at least two file value groups that are XORed in a one-way hash function.

[0107] The file value group includes bit groups.

[0108] In this embodiment, the terminal can first determine at least two file value groups to be XORed in the one-way hash function, and then obtain these at least two file value groups. In one example, the at least two file value groups can be internal state bits and bit groups. In another example, the at least two file value groups can be any column of input values ​​from the input values ​​of the stirring function.

[0109] Step 502: Determine the resistance type of each memristor in the memristor cross array based on at least two file value groups.

[0110] The resistance types include high resistance and low resistance.

[0111] In this embodiment, the terminal can determine the resistance type of the memristor in the memristor cross array corresponding to each file value based on the file values ​​of at least two file value groups. Specifically, when the file value is 1, the resistance type of the memristor corresponding to that file value is determined to be low resistance; when the file value is 0, the resistance type of the memristor corresponding to that file value is determined to be high resistance. For example, when the file value is 1, the resistance value of the memristor corresponding to that file value is determined to be 1kΩ; when the file value is 0, the resistance value of the memristor corresponding to that file value is determined to be 1GΩ.

[0112] Step 503: Power each memristor with a preset voltage and obtain the reference current corresponding to the low-resistance memristor and the row current corresponding to each row of memristors in the memristor cross array.

[0113] In this embodiment, the terminal can first supply power to each memristor using a preset voltage. Then, the terminal can obtain the current corresponding to the low-resistance state of the memristor under the preset voltage and use it as the reference current for the low-resistance state memristor. Simultaneously, the terminal can obtain the row current corresponding to each row of memristors in the memristor cross array.

[0114] Step 504: Determine the XOR operation result of the XOR operation in the one-way hash function based on the reference current and the row current corresponding to each memristor row.

[0115] In this embodiment, the terminal can determine the bit result corresponding to each memristor row based on the row current and the reference current. Then, the terminal can construct the XOR operation result of the XOR operation in the one-way hash function from the bit results corresponding to each memristor row.

[0116] In one example, the terminal can calculate the ratio of the row current to the reference current for each memristor row, obtaining the current ratio for each memristor row. Then, based on the current ratios for each memristor row, the terminal can determine the bit result for each memristor row. Next, the terminal can use the bit results for each memristor row to construct the XOR operation result of the one-way hash function.

[0117] In another example, the terminal can first convert the row current and reference current corresponding to each memristor row into voltages, obtaining the row voltage and reference voltage for each memristor row. For example, the terminal can use a current-to-voltage circuit to convert the row voltage and reference voltage for each memristor row into voltages. Then, the terminal can calculate the ratio of the row voltage to the reference voltage for each memristor row, obtaining the voltage ratio for each memristor row. For example, the terminal can use a division circuit to calculate the ratio of the row voltage to the reference voltage for each memristor row. Next, the terminal can determine the bit result for each memristor row based on the voltage ratio. Then, the terminal can use the bit results for each memristor row to form the XOR operation result in a one-way hash function.

[0118] In the aforementioned file verification method based on a memristor cross array, the terminal determines the resistance type of each memristor in the memristor cross array based on at least two file value groups. Then, it supplies power to each memristor with a preset voltage and acquires the reference current corresponding to the low-resistance memristor and the row current corresponding to each row of memristors in the memristor cross array. Next, based on the reference current and the row current corresponding to each row of memristors, it determines the XOR operation result in the one-way hash function. This transforms the XOR operation in the one-way hash function into a simplified setup of the memristor cross array and the acquisition and processing of current. The memristor cross array can be used to perform the XOR operation in the one-way hash function, unaffected by the number of consecutive XOR operations or the number of bits in the bitwise XOR operation. For multiple consecutive XOR operations and bitwise XOR operations, the calculation result can be obtained in one step, significantly reducing the XOR operation time and effectively improving the efficiency of the XOR operation, thereby reducing the computation time for file verification.

[0119] In one embodiment, such as Figure 6 As shown, the specific process of determining the resistance type of each memristor in a memristor cross array based on at least two sets of file values ​​includes the following steps:

[0120] Step 601: Determine the file values ​​with the same bits in at least two file value groups.

[0121] In this embodiment of the application, the terminal can determine the file values ​​with the same bits in at least two file value groups. For example, such as Figure 7 As shown, the terminal can determine the file value of the first position in the five file value groups as 1, 0, 0, 0, 1, the file value of the second position as 1, 1, 0, 0, 0, and the file value of the third position as 0, 1, 1, 0, 1.

[0122] Step 602: For each bit in the file value group, determine the target row number corresponding to that bit in the memristor cross array, and determine the resistance type of each memristor in the target row number based on the file value corresponding to that bit.

[0123] In this embodiment, the terminal can first determine the target row number corresponding to each bit in the file value group in the memristor cross array. Then, for each bit in the file value group, the terminal can determine the resistance type of each memristor in the target row number corresponding to that bit based on the file value corresponding to that bit.

[0124] For example, such as Figure 7 As shown, in the memristor cross array, the terminal determines the target row number corresponding to the first digit of the file value group as the first row, the target row number corresponding to the second digit of the file value group as the second row, and the target row number corresponding to the third digit of the file value group as the third row. Then, as... Figure 8As shown, the terminal can determine the resistance type of each memristor in the first row of the memristor array based on the first file value; the terminal can determine the resistance type of each memristor in the second row of the memristor array based on the second file value; and the terminal can determine the resistance type of each memristor in the third row of the memristor array based on the third file value.

[0125] In the aforementioned file verification method based on memristor cross arrays, the terminal determines the file value with the same bit in at least two file value groups. Then, for each bit in the file value group, it determines the target row number corresponding to that bit in the memristor cross array, and based on the file value corresponding to that bit, it determines the resistance type of each memristor in the target row number. This transforms the bitwise XOR operation in the one-way hash function into a simplified setup of the memristor cross array and the acquisition and processing of current. The memristor cross array can be used to perform XOR operations in the one-way hash function, unaffected by the number of consecutive XOR operations or the number of bits in the bitwise XOR operation. For both multiple consecutive XOR operations and bitwise XOR operations, the calculation result can be obtained in one step, significantly reducing the XOR operation time and effectively improving the efficiency of XOR operations, thereby reducing the computation time for file verification.

[0126] In one embodiment, such as Figure 9 As shown, the specific process of determining the XOR operation result in the one-way hash function based on the reference current and the corresponding row current of each memristor row includes the following steps:

[0127] Step 901: For each memristor row, determine the current ratio between the row current and the reference current corresponding to the memristor row.

[0128] In this embodiment, the terminal can calculate the ratio of the row current to the reference current for each memristor row to obtain the current ratio for each memristor row. For example, the reference current is 1mA; the row current for the first memristor row is 2mA, the terminal calculates the row current for the second memristor row as 2mA, and the terminal calculates the row current for the third memristor row as 3mA. The terminal calculates the ratio of the row current to the reference current for each memristor row to obtain a current ratio of 2 for the first memristor row, 2 for the second memristor row, and 3 for the third memristor row.

[0129] Step 902: If the current ratio is odd, then determine the XOR operation result of the corresponding bit of the memristor row as the first file value.

[0130] In this embodiment, the terminal can determine whether the current ratio corresponding to each memristor row is odd. If the current ratio is odd, the XOR operation result of the bits corresponding to the memristor row is determined to be a first file value, where the first file value is 1. For example, the current ratio corresponding to the third row of memristors is 3, which is odd. Therefore, the terminal can determine that the XOR operation result of the third bit corresponding to the third row of memristors is 1.

[0131] Step 903: If the current ratio is not odd, then determine the result of the XOR operation of the corresponding bit of the memristor row as the second file value.

[0132] The result of the XOR operation on the corresponding bits of each memristor row constitutes the result of the XOR operation processing.

[0133] In this embodiment, the terminal can determine whether the current ratio corresponding to each memristor row is odd. If the current ratio is not odd, the XOR operation result of the bits corresponding to the memristor row is determined to be the second file value, where the second file value is 0. Then, the terminal uses the XOR operation results of the bits corresponding to each memristor row to form the XOR operation result of the XOR operation processing.

[0134] For example, the current ratios corresponding to the first and second rows of memristors are both 2, neither of which is odd. Therefore, the terminal can determine that the XOR operation result of the first bit corresponding to the first row of memristors is 0, and the XOR operation result of the second bit corresponding to the second row of memristors is 0. The current ratio corresponding to the third row of memristors is 3, which is odd. Therefore, the terminal can determine that the XOR operation result of the third bit corresponding to the third row of memristors is 1. Then, the terminal uses the XOR operation results of the bits corresponding to each row of memristors to form the XOR operation result 001.

[0135] Because the memristor switches are relatively large, the current through the high-configuration memristors is negligible. Therefore, the row current corresponding to each memristor row in the memristor cross array is the sum of the currents of the low-resistivity memristors in each row. Furthermore, based on the row current and the reference current for each memristor row, the number of low-resistivity memristors in each row can be obtained, which in turn gives the number of 1s in each bit of the file value corresponding to each memristor row in at least two file value groups. In the XOR operation, for a single bit in at least two file value groups, if the number of 1s in the file value is odd, the XOR result for that bit is 1; if the number of 1s in the file value is not odd, the XOR result for that bit is 0.

[0136] In the aforementioned file verification method based on memristor cross arrays, for each memristor row, the terminal determines the current ratio between the row current and the reference current. By checking if this ratio is odd, the XOR operation result for the corresponding bits in the memristor row is determined. This transforms the bitwise XOR operation in a one-way hash function into a simplified setup of the memristor cross array and the acquisition and processing of current. The memristor cross array can be used to perform XOR operations in a one-way hash function, unaffected by the number of consecutive XOR operations or the number of bits in the bitwise XOR operation. Both multiple consecutive XOR operations and bitwise XOR operations can be performed in one step, significantly reducing the XOR operation time and effectively improving its efficiency, thereby reducing the file verification computation time.

[0137] In one instance, the memristor cross-array performs an XOR operation in the one-way hash function, including 110⊕011⊕001⊕000⊕101. The terminal retrieves the five file value groups included in this XOR operation, such as... Figure 7 As shown, the terminal can determine the file value of the first digit in the five file value groups as 1, 0, 0, 0, 1, the file value of the second digit as 1, 1, 0, 0, 0, and the file value of the third digit as 0, 1, 1, 0, 1. For each bit in the file value group, the terminal determines the target row number corresponding to that bit in the memristor cross array; that is, the target row number corresponding to the first bit in the file value group is the first row; the target row number corresponding to the second bit in the file value group is the second row; and the target row number corresponding to the third bit in the file value group is the third row. Then, as... Figure 8As shown, the terminal can determine the resistance type of each memristor in the first row of the memristor array based on the first file value; the terminal can determine the resistance type of each memristor in the second row of the memristor array based on the second file value; and the terminal can determine the resistance type of each memristor in the third row of the memristor array based on the third file value. Next, the terminal supplies each memristor with a 1V DC power supply and obtains the reference current corresponding to the low-resistance memristor and the row current corresponding to each row of memristors in the cross array. The terminal then uses a current-to-voltage circuit based on an operational amplifier to convert both the reference current and the row current corresponding to each row of memristors in the cross array into voltages, obtaining the row voltage and reference voltage for each row of memristors. The reference voltage is 1V; the row voltage corresponding to the first row of memristors is 2V, the terminal calculates the row voltage corresponding to the second row of memristors as 2V, and the terminal calculates the row voltage corresponding to the third row of memristors as 3V. The terminal calculates the ratio of the row voltage to the reference voltage for each memristor row, obtaining a ratio of 2 for the first row, 2 for the second row, and 3 for the third row. Then, based on the fact that the voltage ratios for the first and second rows are both 2 (not odd), the terminal determines that the XOR operation result for the first bit of the first row is 0, and the XOR operation result for the second bit of the second row is 0. Based on the fact that the voltage ratio for the third row is 3 (an odd number), the terminal determines that the XOR operation result for the third bit of the third row is 1. Finally, the terminal combines the bit results from each memristor row to form the XOR operation result 001 in the one-way hash function. (See also...) Figure 10 , Figure 10 The simulation circuit structure of the first row of memristors in this embodiment is shown. The simulation circuit structures of the other rows of memristors are similar to those of the first row.

[0138] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0139] It is understood that this method can also be applied to other application scenarios involving XOR operations, and the embodiments of this application are not limited thereto. In one example, this method can also be applied to some application scenarios of one-way hash functions, such as constructing message authentication codes, digital signatures, constructing pseudo-random number generators, and constructing one-time passwords based on password-based encryption (PBE).

[0140] Based on the same inventive concept, this application also provides a memristor-based cross-array file verification device for implementing the aforementioned memristor-based cross-array file verification method. The solution provided by this device is similar to the implementation described in the above method. Therefore, the specific limitations of one or more memristor-based cross-array file verification device embodiments provided below can be found in the limitations of the memristor-based cross-array file verification method described above, and will not be repeated here.

[0141] In one embodiment, such as Figure 11 As shown, a file verification device 1100 based on a memristor cross array is provided, including: an acquisition module 1110, a determination module 1120, and a verification module 1130, wherein:

[0142] The acquisition module 1110 is used to acquire the bit grouping result corresponding to the target file; the bit grouping result includes bit groups obtained by grouping the bit sequence of the target file based on a preset number of bits;

[0143] The determining module 1120 is used to determine the target hash value corresponding to the target file based on the memristor cross array, the preset one-way hash function, and the bit group; the memristor cross array is used to perform the XOR operation processing in the one-way hash function, the number of rows of the memristor cross array is determined according to the preset number of bits, and the number of columns of the memristor cross array is determined according to the maximum number of consecutive XOR operations in the one-way hash function;

[0144] The verification module 1130 is used to obtain the file verification result corresponding to the target file based on the target hash value corresponding to the target file and the reference hash value corresponding to the pre-stored reference file.

[0145] Optionally, the determining module 1120 is specifically used for:

[0146] Obtain at least two file value groups that are XORed in the one-way hash function; the file value groups include the bit groups.

[0147] Based on the at least two sets of file values, the resistance type of each memristor in the memristor cross array is determined; the resistance type includes a high-resistance state and a low-resistance state.

[0148] Power each memristor is supplied with a preset voltage, and the reference current corresponding to the low-resistance memristor and the row current corresponding to each row of memristors in the memristor cross array are obtained.

[0149] Based on the reference current and the row current corresponding to each of the memristor rows, the XOR operation result of the XOR operation in the one-way hash function is determined.

[0150] Optionally, the determining module 1120 is specifically used for:

[0151] In the at least two groups of file values, determine the file values ​​with the same bits;

[0152] For each bit in the file value group, determine the target row number corresponding to the bit in the memristor cross array, and determine the resistance type of each memristor in the target row number according to the file value corresponding to the bit.

[0153] Optionally, the determining module 1120 is specifically used for:

[0154] For each memristor row, determine the current ratio between the row current corresponding to the memristor row and the reference current;

[0155] If the current ratio is odd, then the result of the XOR operation of the bits corresponding to the memristor row is determined to be the first file value;

[0156] If the current ratio is not odd, then the result of the XOR operation of the bits corresponding to the memristor row is determined to be the second file value;

[0157] The result of the XOR operation on the bits corresponding to each memristor row constitutes the result of the XOR operation processing.

[0158] Optionally, the determining module 1120 is specifically used for:

[0159] Based on the memristor cross array, the input value of the preset stirring function is determined according to the internal state bits and the bit group; the internal state bits are the preset number of bits contained in the internal state corresponding to the target file;

[0160] The internal state is updated based on the output value of the stirring function;

[0161] Based on the internal state after the update stops, the target hash value corresponding to the target file is obtained.

[0162] Optionally, the determining module 1120 is specifically used for:

[0163] Based on the memristor cross array, the first column of results corresponding to the first column of input values ​​is determined according to the file value in the first column of input values ​​of the stirring function; based on the memristor cross array, the second column of results corresponding to the second column of input values ​​is determined according to the file value in the second column of input values ​​of the stirring function.

[0164] Based on the results in the first column and the second column, determine the permutation result;

[0165] According to preset movement rules and preset asymmetry rules, the displacement result is subjected to movement and asymmetry operations to obtain the output value of the stirring function.

[0166] Each module in the aforementioned memristor-based cross-array file verification device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0167] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 12 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a file verification method based on a memristor cross array. The display screen can be an LCD screen or an e-ink display screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0168] Those skilled in the art will understand that Figure 12 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0169] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0170] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0171] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0172] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0173] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0174] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0175] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A file verification method based on memristor cross array, characterized in that, The method includes: Obtain the bit grouping result corresponding to the target file; the bit grouping result includes bit groups obtained by grouping the bit sequence of the target file based on a preset number of bits. Based on the memristor cross array, the preset one-way hash function, and the bit group, the target hash value corresponding to the target file is determined; the memristor cross array is used to perform the XOR operation processing in the one-way hash function, the number of rows of the memristor cross array is determined according to the preset number of bits, and the number of columns of the memristor cross array is determined according to the maximum number of consecutive XOR operations in the one-way hash function; Based on the target hash value corresponding to the target file and the base hash value corresponding to the pre-stored base file, the file verification result corresponding to the target file is obtained; The process by which the memristor cross array performs the XOR operation in the one-way hash function includes: Obtain at least two file value groups that are XORed in the one-way hash function; the file value groups include the bit groups. Based on the at least two sets of file values, the resistance type of each memristor in the memristor cross array is determined; the resistance type includes a high-resistance state and a low-resistance state. Power each memristor is supplied with a preset voltage, and the reference current corresponding to the low-resistance memristor and the row current corresponding to each row of memristors in the memristor cross array are obtained. Based on the reference current and the row current corresponding to each of the memristor rows, the XOR operation result of the XOR operation in the one-way hash function is determined.

2. The method according to claim 1, characterized in that, Determining the resistance type of each memristor in the memristor cross array based on the at least two file value groups includes: In the at least two groups of file values, determine the file values ​​with the same bits; For each bit in the file value group, determine the target row number corresponding to the bit in the memristor cross array, and determine the resistance type of each memristor in the target row number according to the file value corresponding to the bit.

3. The method according to claim 1, characterized in that, The step of determining the XOR operation result of the one-way hash function based on the reference current and the row current corresponding to each of the memristor rows includes: For each memristor row, determine the current ratio between the row current corresponding to the memristor row and the reference current; If the current ratio is odd, then the result of the XOR operation of the bits corresponding to the memristor row is determined to be the first file value; If the current ratio is not odd, then the result of the XOR operation of the bits corresponding to the memristor row is determined to be the second file value; The result of the XOR operation on the bits corresponding to each memristor row constitutes the result of the XOR operation processing.

4. The method according to claim 1, characterized in that, The determination of the target hash value corresponding to the target file based on the memristor cross array, the preset one-way hash function, and the bit group includes: Based on the memristor cross array, the input value of the preset stirring function is determined according to the internal state bits and the bit group; the internal state bits are the preset number of bits contained in the internal state corresponding to the target file; The internal state is updated based on the output value of the stirring function; Based on the internal state after the update stops, the target hash value corresponding to the target file is obtained.

5. The method according to claim 4, characterized in that, The processing steps of the stirring function include: Based on the memristor cross array, the first column of results corresponding to the first column of input values ​​is determined according to the file value in the first column of input values ​​of the stirring function; based on the memristor cross array, the second column of results corresponding to the second column of input values ​​is determined according to the file value in the second column of input values ​​of the stirring function. Based on the results in the first column and the second column, determine the permutation result; According to preset movement rules and preset asymmetry rules, the displacement result is subjected to movement and asymmetry operations to obtain the output value of the stirring function.

6. A document verification device based on a memristor cross array, characterized in that, The device includes: The acquisition module is used to acquire the bit grouping result corresponding to the target file; the bit grouping result includes bit groups obtained by grouping the bit sequence of the target file based on a preset number of bits. The determination module is used to determine the target hash value corresponding to the target file based on the memristor cross array, the preset one-way hash function, and the bit group; the memristor cross array is used to perform the XOR operation processing in the one-way hash function, the number of rows of the memristor cross array is determined according to the preset number of bits, and the number of columns of the memristor cross array is determined according to the maximum number of consecutive XOR operations in the one-way hash function; The verification module is used to obtain the file verification result corresponding to the target file based on the target hash value corresponding to the target file and the benchmark hash value corresponding to the pre-stored benchmark file. The determining module is configured to acquire at least two file value groups that are XORed in the one-way hash function; the file value groups include the bit groups. Based on the at least two sets of file values, the resistance type of each memristor in the memristor cross array is determined; the resistance type includes a high-resistance state and a low-resistance state. Power each memristor is supplied with a preset voltage, and the reference current corresponding to the low-resistance memristor and the row current corresponding to each row of memristors in the memristor cross array are obtained. Based on the reference current and the row current corresponding to each of the memristor rows, the XOR operation result of the XOR operation in the one-way hash function is determined.

7. The apparatus according to claim 6, characterized in that, The determining module is used to determine file values ​​with the same bit in the at least two file value groups; For each bit in the file value group, determine the target row number corresponding to the bit in the memristor cross array, and determine the resistance type of each memristor in the target row number according to the file value corresponding to the bit.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Non-volatile multi-level-cell memory with decoupled bits for higher performance and energy efficiency

    CN105103235A

  • Method and apparatus for reducing silent data errors in non-volatile memory systems

    CN109582493A