Data processing method, device, electronic device and storage medium

By dividing the initial hash data into multiple sub-data and performing hash processing, the problem of hardware device memory limitation is solved and effective data processing is achieved under memory-constrained conditions.

CN114077490BActive Publication Date: 2025-09-23FU TAI HUA IND SHENZHEN +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010827226.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-17
Publication Date
2025-09-23
Estimated Expiration
2040-08-17

AI Technical Summary

Technical Problem

The memory limitations of hardware devices limit traditional hash processing methods and make it impossible to process data effectively.

Method used

By dividing the initial hash data into multiple sub-data, the value of each sub-data is less than or equal to the fixed value of the memory cache, and hashing each sub-data to obtain a first hash value, and finally obtaining a processing result based on these hash values.

Benefits of technology

It enables hash processing on memory-constrained hardware devices, solves the problem of memory size limitations, and ensures the integrity and efficiency of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114077490B_ABST
    Figure CN114077490B_ABST
Patent Text Reader

Abstract

The present application provides a data processing method, apparatus, electronic device and storage medium, including pre-comparing the value of initial hash data with the fixed value size of the memory cache of the electronic device. When the value of the initial hash data is greater than the fixed value of the memory cache of the electronic device, the initial hash data is divided into N sub-data so that the value of each sub-data is less than or equal to the fixed value of the memory cache of the electronic device, thereby solving the problem that the memory size of the electronic device is limited and hash processing cannot be implemented. For each sub-data, hash processing is performed according to an initial vector to obtain a first hash value. A processing result is obtained according to the first hash value of each sub-data, thereby completing hash processing of the data to be processed on the electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a data processing method, device, electronic device and storage medium. Background Art

[0002] With the large-scale application of some sensors and smart devices in the current era of global electronic interconnection, the information security of these hardware devices is more important than ever due to the emergence of viruses, hackers, electronic theft, etc. However, these hardware devices are often subject to various resource constraints, such as the computing power, memory and energy consumption of the central processing unit (CPU), all of which will limit the application of traditional hash processing methods. Summary of the Invention

[0003] In view of this, it is necessary to provide a data processing method, device, electronic device and storage medium that can process data on hardware devices without being limited by the memory of the hardware.

[0004] An embodiment of the present application provides a data processing method, including:

[0005] Acquire initial hash data and a fixed value, wherein the initial hash data includes data to be processed by the electronic device, and the fixed value includes a fixed value cached in a memory of the electronic device;

[0006] When the value of the initial hash data is greater than the fixed value, dividing the initial hash data into N sub-data, wherein the value of each sub-data is less than or equal to the fixed value, and N is an integer greater than 1;

[0007] Inputting the sub-data into the memory of the electronic device to obtain a first hash value after hashing the sub-data; and

[0008] A processing result is obtained according to the first hash value of each sub-data.

[0009] According to some embodiments of the present application, the step of obtaining a processing result according to the first hash value of each sub-data includes:

[0010] Stringing the first hash value of each sub-data into a character string; and

[0011] A processing result is obtained according to the character string.

[0012] According to some embodiments of the present application, the step of obtaining a processing result according to the character string includes:

[0013] When the string is greater than the fixed value, the following steps are repeated until the value of the new string is less than or equal to the fixed value:

[0014] Split a string greater than the fixed value into M substrings, where M is an integer greater than 1;

[0015] Inputting the substring into the memory of the electronic device to obtain a second hash value after the substring is hashed;

[0016] A new string is obtained according to the second hash value of each substring.

[0017] According to some embodiments of the present application, the step of obtaining a processing result according to the character string includes:

[0018] When the value of the character string is less than or equal to the fixed value, a processing result is obtained.

[0019] According to some embodiments of the present application, the data processing method further includes:

[0020] When the value of the initial hash data is less than or equal to the fixed value, the initial hash data is input into the memory of the electronic device to obtain a processing result obtained after hashing the initial hash data.

[0021] According to some embodiments of the present application, the data processing method further includes:

[0022] Get random values ​​of size;

[0023] The random values ​​of size are divided to obtain the same or different segmentation values.

[0024] An embodiment of the present application provides a data processing device, including:

[0025] an acquisition module, configured to acquire initial hash data and a fixed value, wherein the initial hash data includes data to be processed by the electronic device, and the fixed value includes a fixed value cached in a memory of the electronic device;

[0026] a segmentation module, configured to segment the initial hash data into N sub-data when the value of the initial hash data is greater than the fixed value, wherein the value of each sub-data is less than or equal to the fixed value, and N is an integer greater than 1;

[0027] a hash module, configured to input the sub-data into a memory of the electronic device to obtain a first hash value after hashing the sub-data; and

[0028] A result module is configured to obtain a processing result according to the first hash value of each sub-data.

[0029] Preferably, the result module includes:

[0030] a string unit, configured to string the first hash value of each sub-data into a string;

[0031] The result unit is used to obtain a processing result according to the character string.

[0032] An embodiment of the present application provides an electronic device, the electronic device comprising: a memory and one or more processors;

[0033] Memory, used to store data to be processed;

[0034] When one or more programs are executed by the one or more processors, the one or more processors implement the data processing method described above.

[0035] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the data processing method as described above is implemented.

[0036] The data processing method, device, electronic device and storage medium provided in the embodiments of the present application include pre-comparing the value of initial hash data with the fixed value size of the memory cache of the electronic device. When the value of the initial hash data is greater than the fixed value of the memory cache of the electronic device, the initial hash data is divided into N sub-data so that the value size of each sub-data is less than or equal to the fixed value of the memory cache of the electronic device, thereby solving the problem that hash processing cannot be implemented due to the limited memory size of the electronic device. For each sub-data, hash processing is performed according to the initial vector to obtain a first hash value. A processing result is obtained according to the first hash value of each sub-data, thereby completing the hash processing of the data to be processed on the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 This is a flowchart of the existing hash operation;

[0038] Figure 2 Schematic diagram of the structure of an electronic device according to one embodiment of the present application;

[0039] Figure 3 is a flow chart of a data processing method according to an embodiment of the present application;

[0040] Figure 4 Schematic diagram of data segmentation according to one embodiment of the present application;

[0041] Figure 5 is a flowchart of another data processing method according to one embodiment of the present application;

[0042] Figure 6 Schematic diagram of a data processing device according to one embodiment of the present application.

[0043] Description of main component symbols

[0044] Hash input data 110

[0045] Sub-block 120 of input data for hash calculation

[0046] Initial vector 130

[0047] Hash Function 140

[0048] Internal hash state value 150

[0049] Final hash value 160

[0050] electronic device 100

[0051] Memory 11

[0052] Processor 12

[0053] Data processing device 10

[0054] Segmented sub-data 330

[0055] Hash Function 340

[0056] First hash value 350

[0057] String 360

[0058] Get Module 21

[0059] Segmentation module 22

[0060] Hash Module 23

[0061] Results Module 24

[0062] The following specific implementation methods will further illustrate the present application in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION

[0063] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.

[0064] Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0065] In order to facilitate those skilled in the art to have a deeper understanding of the embodiments of the present application, the definitions of the professional terms involved in the embodiments of the present application will be first introduced below.

[0066] Hashing is the process of transforming an input of any length into a fixed-length output through a hash algorithm. The output is the hash value. The space of hash values ​​is usually much smaller than the space of inputs. Different inputs may hash to the same output, and it is impossible to uniquely determine the input value from the hash value. A hash function is a function that compresses a message of any length into a message digest of a fixed length. The definition of the hash function H(x):

[0067] H(x1)=h1, H(x2)=h2, and the lengths of h1 and h2 must be the same.

[0068] H(x1)=h1, H(x2)=h2, if h1=h2, x1 must be equal to x2.

[0069] If x1 and x2 are different, the probability that h1 and h2 are the same is very low.

[0070] H(x1)=h1, x1 cannot be obtained by reversing h1.

[0071] The hash algorithm can be applied accordingly according to the electronic device 100 and the applications on the electronic device 100, for example, it can be applied to error correction, voice recognition and information security, and information security may include file verification, digital signatures and authentication protocols.

[0072] The software implements the hash processing method flow. The PC is installed with a 64-bit operating system, equipped with a corresponding processor and static memory storage, and installed with a corresponding software running platform. After the user enters the data, the running platform will perform the following Figure 1 The operation shown includes: hash input data 110, i.e., initial hash data, a sub-block of input data used for hash calculation 120, an initial vector 130, a hash function 140, an internal hash state value 150, and a final hash value 160. Hash processing involves the combination of data blocks and hash function calculations. The input data is divided into sub-blocks. For the first block, a hash operation is performed using the initial vector to obtain an internal hash state value. The internal hash state value of the first block is output as the initial vector to the second block, and so on, to obtain the final hash value.

[0073] It should be noted that hash processing can be implemented by software or hardware. When the hash operation is implemented by software, all data is input into the memory at once, and then the software processes all the data. The processing involves dividing the data. Dividing the data into sub-blocks is a preprocessing operation of the hash operation, the purpose of which is to make all the input data conform to the standard format. When the hash operation is implemented by hardware, the hardware device is subject to its resource limitations, such as the memory size of the hardware device. It cannot store data that exceeds its memory size, and thus cannot be implemented by hardware. This application proposes a data processing method to solve this problem, so that the hash processing of data can be implemented by hardware through this data processing method.

[0074] See also Figure 2 The data processing device 10 runs in an electronic device 100. The electronic device 100 includes, but is not limited to, a memory 11 and at least one processor 12, and the above components can be connected via a bus.

[0075] It should be noted that Figure 2 The electronic device 100 is illustrated for illustrative purposes only. In other embodiments, the electronic device 100 may include more or fewer components, or have a different component configuration. The electronic device 100 may include various IoT terminals or devices, including mobile phones, smart watches, smart speakers, virtual reality devices, tablet computers, laptop computers, car computers, desktop computers, e-book readers, MP3 players, MP4 players, set-top boxes, wearable devices, and the like.

[0076] In one embodiment, the memory 11 is a memory of the electronic device 100, and is used to store data to be processed. The data processing device 10 is logically connected to the memory 11, so that data is input into the memory 11 through the data processing device 10. The processor 12 is connected to the memory 11, directly addresses the memory 11, obtains the data to be processed, performs calculations, and completes functions such as hardware implementation of hash processing.

[0077] The data processing device 10 described in the embodiment of the present application can be implemented as a client or a plug-in. The electronic device 100 can obtain and install the plug-in from a remote server, thereby implementing the data processing method provided in the embodiment of the present application through the client or the plug-in. The client may include at least one application program that can be run on the electronic device 100 to implement the data processing method provided in the embodiment of the present application. The plug-in may be included in an application program that runs on the electronic device 100, thereby implementing the data processing method provided in the embodiment of the present application.

[0078] See also Figure 3 , Figure 3Flowchart of a data processing method according to an embodiment of the present application. The data processing method includes the following steps.

[0079] Step S00: Obtain data processing instructions.

[0080] In an embodiment of the present application, a data processing instruction can be obtained when the electronic device 100 is about to perform at least the following hash processing: error correction, voice recognition, file verification, digital signature, and authentication protocol. When performing the hash processing, a data processing instruction can be output by a process or program performing the hash processing, or the data processing device 10 can be triggered to output a data processing instruction when performing the hash processing. The data processing device 10 will obtain the data processing instruction and start executing the following steps according to the instruction to ensure that the hash processing can be implemented by hardware.

[0081] Step S10 : Acquire initial hash data and fixed values, wherein the initial hash data includes data to be processed by the electronic device 100 , and the fixed values ​​include memory cache fixed values ​​of the memory 11 in the electronic device 100 .

[0082] In the embodiment of the present application, the data processing device 10 obtains the data processing instruction according to step S00 and reads the corresponding initial hash data and fixed value. For example, when performing file verification, it is necessary to obtain the data of the file to be verified. It is understood that the initial hash data is the data to be processed and can include digital information, IP information packets, disk files, etc.

[0083] In the embodiment of the present application, the fixed memory values ​​of the memories 11 of two different electronic devices 100 may be the same or different. It is understood that the memory values ​​of each memory 11 may be the same or different, specifically determined based on the actual memory capacity of the memory 11. For a specific electronic device 100, its memory value is fixed. By reading the parameter memory capacity of the memory 11, the numerical value of the data that the memory 11 can cache is obtained, such as 64MB, 128MB, 256MB, etc.

[0084] Step S20: Determine whether the initial hash data is greater than a fixed value.

[0085] In the embodiment of the present application, the data processing device 10 compares the initial hash data with a fixed value to determine whether the initial hash data is greater than the fixed value, so as to detect whether the memory 11 can store the initial hash data.

[0086] When the data processing device 10 determines that the value of the obtained initial hash data is not greater than the fixed value, that is, is less than or equal to the fixed value, step S60 is performed.

[0087] Step S60: When the value of the initial hash data is less than or equal to the fixed value, the initial hash data is input into the memory of the electronic device to obtain a processing result obtained by hashing the initial hash data.

[0088] In an embodiment of the present application, the value of the initial hash data is less than or equal to a fixed value, that is, the initial hash data can be directly stored in the memory, and the hash data is directly input into the memory 11. The processor 12 of the electronic device 100 directly addresses the memory 11 to obtain the corresponding data and performs hash processing on the obtained hash data.

[0089] When the data processing device 10 determines that the value of the obtained initial hash data is greater than the fixed value, step S30 is performed.

[0090] Step S30: When the value of the initial hash data is greater than a fixed value, the initial hash data is divided into N sub-data, wherein the value of each sub-data is less than or equal to the fixed value, and N is an integer greater than 1.

[0091] In the embodiment of the present application, the data segmentation performed during software implementation is distinguished. The purpose of the initial hash data segmentation in the embodiment of the present application is to segment the data to be hashed when its value is too large to be stored in the memory 11 of the electronic device 100, and input the segmented sub-data into the memory 11 in batches, that is, to input the initial hash data that was originally unable to be input into the memory 11 in a "time-for-space" manner.

[0092] In an embodiment of the present application, specific segmentation methods may include but are not limited to random size segmentation and fixed segmentation. Random size segmentation includes pre-generating a set of random size values, the data processing device 10 obtains a corresponding number of random size values ​​according to the number of parts to be segmented, and performs random size segmentation on the initial hash data based on the obtained set of random size values. The size of each sub-data segmented may be the same or different. When the initial vector is leaked, the split size based on the initial hash data is random, and its final hash value cannot be calculated. Fixed segmentation can also be performed according to a preset size value, that is, the initial hash data is segmented according to a preset preset value, so that the size of the sub-data after segmentation is equal to the preset value, and the size of the data obtained after segmentation is the same and less than or equal to the fixed value.

[0093] In the embodiments of this application, Figure 4 The value of the sub-data 330 after the segmentation is less than or equal to the fixed value. Based on the random size segmentation or fixed segmentation, the sizes of the sub-data 330 can be the same or different. The number N of the segmented sub-data 330 can be set according to actual conditions.

[0094] Step S40: inputting the sub-data into a memory of the electronic device to obtain a first hash value after hashing the sub-data.

[0095] In the embodiment of the present application, a group of sub-data of variable size can be obtained by using random values ​​of size. After the data processing device 10 inputs the segmented sub-data into the memory 11, the processor 12 directly addresses the memory 11 to read the corresponding sub-data, and performs a hash operation on each sub-data to obtain the corresponding first hash value. Figure 4 The hash function 340 in the hash calculation is used. The specific hash calculation process can be referred to Figure 1 , which may include pre-processing the input sub-data and then performing calculations through a hash function. The specific algorithms for hash processing can refer to MD4, MD5, SHA-1, SHA-256, SHA-384 and SHA-512, etc., which will not be described in detail in this application.

[0096] Step S50: Obtain a processing result according to the first hash value of each sub-data.

[0097] In the embodiment of the application, the first hash value obtained by hashing each sub-data is the result of data processing on the initial hash data. The data processing device 10 can obtain the data processing result by reading the first hash value. It can be understood that the first hash value or second hash value mentioned in the embodiment of the application is a set of binary values ​​obtained by hashing the initial hash data.

[0098] According to some embodiments of the present application, step S50 obtains a processing result according to the first hash value of each sub-data, which can be specifically performed by the following steps, see Figure 5 :

[0099] Step S51: string the first hash value of each sub-data into a character string.

[0100] In the embodiments of this application, Figure 4 As shown, the data processing device 10 strings the first hash value 350 of each sub-data 330 into a character string 360. The character string is the result obtained by the data processing device 10 of this application processing the initial hash data. The data processing device 10 obtains the processing result based on the character string.

[0101] Step S52: Determine whether the character string is greater than a fixed value.

[0102] According to some embodiments of the present application, when the data processing device 10 determines that the value of the character string is less than or equal to the fixed value, step S53 is performed.

[0103] Step S53: When the numerical value of the character string is less than or equal to the fixed value, a processing result is obtained according to the character string.

[0104] In an embodiment of the present application, after the data processing device 10 compares the string and the fixed value and obtains that the value of the string is less than or equal to the fixed value, the data processing device 10 can directly store the string as the final result in the memory 11, and the processor 12 addresses the memory 11 to obtain the hash processing result and outputs the string as the processing result.

[0105] According to some embodiments of the present application, when the data processing device 10 determines that the value of the string is greater than the fixed value, the following steps are looped until the value of the new string is less than or equal to the fixed value.

[0106] In the embodiment of the present application, the data processing device 10 compares the string composed of the first hash value with the fixed value, and performs multiple hash operations when the string is larger than the fixed value, thereby increasing the complexity of the collision attack.

[0107] Step S54: Split the character string greater than a fixed value into M sub-strings, where M is an integer greater than 1.

[0108] In the embodiment of the present application, when performing step S54, the specific segmentation method can refer to the above-mentioned random segmentation or fixed segmentation to obtain segmentation values ​​with the same or different values. This application does not make any specific limitations on this.

[0109] Step S55: inputting the substring into the memory of the electronic device to obtain a second hash value after hashing the substring.

[0110] In the embodiment of the present application, the specific operating principle of the hash processing is similar to that of step S40 and will not be repeated here.

[0111] Step S56: Obtain a new string according to the second hash value of each substring.

[0112] In the embodiment of the present application, the data processing device 10 continues to compare the numerical value of the new string obtained by using the second hash value of each substring with the fixed value until the numerical value of the final string is smaller than the fixed value.

[0113] See also Figure 6In this embodiment, the data processing device 10 can be divided into one or more modules, which can be stored in the processor 12 and the processor 12 can execute the data processing method of the embodiment of the present application. The one or more modules can be a series of computer program instruction segments that can perform specific functions, and the instruction segments are used to describe the execution process of the data processing device 10 in the electronic device 100. For example, the data processing device 10 can be divided into Figure 6 The acquisition module 21, the segmentation module 22, the hash module 23 and the result module 24.

[0114] The acquisition module 21 is used to acquire initial hash data and a fixed value, wherein the initial hash data includes data to be processed by the electronic device, and the fixed value includes a memory cache fixed value of the memory.

[0115] The segmentation module 22 is configured to segment the initial hash data into N sub-data when the value of the initial hash data is greater than the fixed value, wherein the value of each sub-data is less than or equal to the fixed value, and N is an integer greater than 1.

[0116] The hash module 23 is used to input the sub-data into the memory to obtain a first hash value after the sub-data is hashed.

[0117] The result module 24 is configured to obtain a processing result according to the first hash value of each sub-data.

[0118] According to some embodiments of the present application, the result module 24 includes:

[0119] The string unit 241 is used to string the first hash value of each sub-data into a string.

[0120] The result unit 242 is used to obtain a processing result according to the character string.

[0121] The data processing device 10 can process the initial hash data so that it can be stored in the memory, thereby completing the hardware implementation of the hash processing. Specific details can be found in the embodiment of the data processing method above, which will not be described in detail here.

[0122] The data processing method, device, electronic device and storage medium provided in the embodiments of the present application include pre-comparing the value of initial hash data with the fixed value size of the memory cache of the electronic device 100. When the value of the initial hash data is greater than the fixed value of the memory cache of the electronic device 100, the initial hash data is divided into N sub-data so that the value size of each sub-data is less than or equal to the fixed value of the memory cache of the electronic device 100, thereby solving the problem that hash processing cannot be implemented due to the limited memory size of the electronic device 100. For each sub-data, hash processing is performed according to the initial vector to obtain a first hash value. A processing result is obtained according to the first hash value of each sub-data, thereby completing the hash processing of the data to be processed on the electronic device 100.

[0123] In one embodiment, the processor 12 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor 12 may be any other conventional processor, etc.

[0124] If the modules in the data processing device 10 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0125] It is understood that the module division described above is a logical functional division, and other division methods may be used in actual implementation. In addition, the functional modules in the various embodiments of the present application can be integrated into the same processing unit, or each module can exist physically separately, or two or more modules can be integrated into the same unit. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0126] In another embodiment, the electronic device 100 may further include a memory (not shown), and the one or more modules may be stored in the memory and executed by the processor 12. The memory may be an internal memory of the electronic device 100, that is, a memory built into the electronic device 100. In other embodiments, the memory may also be an external memory of the electronic device 100, that is, a memory external to the electronic device 100.

[0127] In some embodiments, the memory is used to store program codes and various data, for example, to store program codes of the data processing device 10 installed in the electronic device 100, and to achieve high-speed and automatic access to programs or data during the operation of the electronic device 100.

[0128] The memory may include random access memory and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage device.

[0129] It will be apparent to those skilled in the art that the present application is not limited to the details of the exemplary embodiments described above, and that the present application can be implemented in other specific forms without departing from the spirit or essential features of the present application. Therefore, the embodiments described above should be considered exemplary and non-restrictive in all respects, and the scope of the present application is defined by the appended claims rather than the foregoing description, and all variations that come within the meaning and range of equivalents of the claims are intended to be encompassed within the present application.

Claims

1. A data processing method, characterized in that: include: Acquire initial hash data and a fixed value, wherein the initial hash data includes data to be processed by the electronic device, and the fixed value includes a fixed value cached in a memory of the electronic device; When the value of the initial hash data is greater than the fixed value, dividing the initial hash data into N sub-data, wherein the value of each sub-data is less than or equal to the fixed value, and N is an integer greater than 1; Inputting the sub-data into a memory of the electronic device to obtain a first hash value after hashing the sub-data; Stringing the first hash value of each sub-data into a character string; When the value of the string is greater than the fixed value, Split the string into M substrings, where M is an integer greater than 1; Inputting the substring into the memory of the electronic device to obtain a second hash value after hashing the substring; and The second hash value of each substring is strung together to form a new string, and the value of the new string is continuously compared with the fixed value until the value of the string finally obtained is less than or equal to the fixed value.

2. The data processing method according to claim 1, wherein: The method further comprises: When the value of the character string is less than or equal to the fixed value, a processing result is obtained.

3. The data processing method according to claim 1, wherein: The method further comprises: When the value of the initial hash data is less than or equal to the fixed value, the initial hash data is input into the memory of the electronic device to obtain a processing result obtained after hashing the initial hash data.

4. The data processing method according to any one of claims 1 to 3, characterized in that: The dividing the initial hash data into N sub-data includes: Get N random values ​​of different sizes; The initial hash data is divided according to the N random values ​​of different sizes to obtain the N sub-data with the same or different values.

5. A data processing device, characterized in that: include: an acquisition module, configured to acquire initial hash data and a fixed value, wherein the initial hash data includes data to be processed by the electronic device, and the fixed value includes a fixed value cached in a memory of the electronic device; a segmentation module, configured to segment the initial hash data into N sub-data when the value of the initial hash data is greater than the fixed value, wherein the value of each sub-data is less than or equal to the fixed value, and N is an integer greater than 1; a hash module, configured to input the sub-data into a memory of the electronic device to obtain a first hash value after hashing the sub-data; and A result module, the result module includes: a string unit, configured to string the first hash value of each sub-data into a string; When the value of the string is greater than the fixed value, the string is divided into M substrings, where M is an integer greater than 1; the substrings are input into the memory of the electronic device to obtain second hash values ​​of the substrings after hashing; and the second hash values ​​of each substring are strung together into a new string, and the value of the new string is continuously compared with the fixed value until the value of the final string is less than or equal to the fixed value.

6. An electronic device, characterized in that: The electronic device includes: a memory and one or more processors; Memory, used to store data to be processed; When one or more programs are executed by the one or more processors, the one or more processors implement the data processing method according to any one of claims 1 to 4.

7. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the data processing method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Object storage device and methods of operating the object storage device

    CN107526542A