Data processing method and device, storage medium and computer program product
By using the first hash table in the cuckoo filter to quickly determine whether the target data exists and using the second hash table for further verification during hash conflicts, the problem of poor accuracy of the cuckoo filter when performing database data processing is solved, and the accuracy and efficiency of data operations are improved.
Patent Information
- Application Number
- CN202510311219.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-06-24
AI Technical Summary
The cuckoo filter has poor accuracy when performing database-related data processing operations, mainly due to errors in data existence judgment caused by hash conflicts.
A data processing method is proposed, by querying the first fingerprint data in the first hash table to quickly determine whether the target data exists, and use the second fingerprint data in the second hash table to further verify and operate when there is a hash conflict. The storage length of the second fingerprint data is greater than the first fingerprint data, which improves its uniqueness and reduces the possibility of hash conflicts.
The first hash table quickly determines whether the target data exists, reduces unnecessary full table scanning, and improves the accuracy of data operations through the high unique fingerprint data of the second hash table, and reduces misjudgment caused by hash conflicts.
Smart Images

Figure CN120196633A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of electrical data processing, and in particular, to a data processing method, device, storage medium, and computer program product. Background Art
[0002] In the Internet of Things, a Cuckoo Filter can be added between a web application and Redis of a database. For a network access request sent from the web application, it will first pass through the Cuckoo Filter. The Cuckoo Filter quickly determines whether the requested data exists in the database. If it does not exist, the access request is directly rejected to end the process. If it exists, the request is allowed to flow to the Redis layer or the database layer.
[0003] The Cuckoo Filter sets a single hash table to quickly determine whether a record exists in the database. However, when using a hash function, there is a situation where different inputs are mapped to the same hash value or the same hash table index position by the hash function, resulting in hash conflicts. Therefore, after being judged by the Cuckoo Filter, when the result is that the data exists, there may be a situation where the data actually does not exist in the database, that is, the Cuckoo Filter has a problem of poor accuracy in performing data processing operations related to the database. Summary of the Invention
[0004] The main purpose of this application is to provide a data processing method, device, storage medium, and computer program product, aiming to solve the technical problem of poor accuracy in the Cuckoo Filter performing data processing operations related to the database.
[0005] To achieve the above object, this application proposes a data processing method, and the method includes:
[0006] In response to a data operation request corresponding to target data in a database, determining first fingerprint data corresponding to the target data;
[0007] When the first fingerprint data is queried in a first hash table, determining second fingerprint data corresponding to the target data, where the storage length of the second fingerprint data is greater than the storage length of the first fingerprint data;
[0008] Performing a target data operation corresponding to the data operation request on the second fingerprint data based on a second hash table;
[0009] Wherein, the storage length of the fingerprint data in the second hash table is greater than the storage length of the fingerprint data in the first hash table, and the fingerprint data in the first hash table and the second hash table both represent the data in the database.
[0010] In one embodiment, the data operation request includes a data query request sent by an application, and the data query request is set to query whether the target data exists in the database and / or the data cache layer of the database. The step of performing the target data operation corresponding to the data operation request on the second fingerprint data based on the second hash table includes:
[0011] Query the second fingerprint data in the second hash table;
[0012] If the second fingerprint data is found in the second hash table, query whether the target data exists in the data cache layer corresponding to the database and / or the database;
[0013] If the second fingerprint data is not found in the second hash table, determine that the target data exists in the database and / or the data cache layer of the database.
[0014] In one embodiment, before the step of querying the second fingerprint data in the second hash table, it further includes:
[0015] Determine a first storage location according to the first hash function and the target data;
[0016] Determine a second storage location according to the second hash function, the second fingerprint data, and the first storage location;
[0017] The step of querying the second fingerprint data in the second hash table includes:
[0018] Query the second fingerprint data at the first storage location and the second storage location in the second hash table.
[0019] In one embodiment, the step of querying whether the target data exists in the data cache layer corresponding to the database and / or the database includes:
[0020] Query the target data in the data cache layer;
[0021] If the target data is not found in the data cache layer, query whether the target data exists in the database;
[0022] If the target data is found in the data cache layer, determine that the target data exists in the data cache layer.
[0023] In one embodiment, the data operation request includes a data query request. After the step of determining the first fingerprint data corresponding to the target data, it further includes:
[0024] When the first fingerprint data is not stored in the first hash table, it is determined that the target data does not exist in the database.
[0025] In one embodiment, the data operation request includes a data insertion request, and the data insertion request is set to add the fingerprint data corresponding to the target data. The step of performing the target data operation corresponding to the data operation request on the second fingerprint data based on the second hash table includes:
[0026] Insert the second fingerprint data into the second hash table.
[0027] In one embodiment, before the step of inserting the second fingerprint data into the second hash table, it further includes:
[0028] Determine a first storage location according to a first hash function and the target data;
[0029] Determine a second storage location according to a second hash function, the second fingerprint data, and the first storage location;
[0030] The step of inserting the second fingerprint data into the second hash table includes:
[0031] Insert the second fingerprint data into the first storage location or the second storage location in the second hash table.
[0032] In one embodiment, the data operation request includes a data insertion request, and the data insertion request is set to add the fingerprint data corresponding to the target data. After the step of determining the first fingerprint data corresponding to the target data, it further includes:
[0033] When the first fingerprint data is not queried in the first hash table, insert the first fingerprint data into the first hash table.
[0034] In addition, to achieve the above object, the present application also proposes a data processing device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor. The computer program is configured to implement the steps of the data processing method as described above.
[0035] In addition, to achieve the above object, the present application also proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium, and when the computer program is executed by a processor, it implements the steps of the data processing method as described above.
[0036] In addition, to achieve the above object, the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the data processing method described above are implemented.
[0037] One or more technical solutions proposed by the present application have at least the following technical effects:
[0038] By querying the first fingerprint data through the first hash table, it is possible to quickly determine whether the target data exists, thereby reducing unnecessary full-table scans. Since the storage length of the second fingerprint data is greater than that of the first fingerprint data, this means that the second fingerprint data has higher uniqueness, which can further reduce the possibility of hash conflicts, thereby improving the accuracy of data operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present application and used together with the specification to explain the principles of the present application.
[0040] To more clearly illustrate the technical solutions in the embodiments of the present application or in the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0041] Figure 1 It is a schematic flow chart of the response feedback of the server of the present application to a data operation request;
[0042] Figure 2 It is a schematic flow chart provided by Embodiment 1 of the data processing method of the present application;
[0043] Figure 3 It is a schematic diagram of the hash table of the cuckoo filter in the data processing method of the present application;
[0044] Figure 4 It is a schematic flow chart provided by Embodiment 2 of the data processing method of the present application;
[0045] Figure 5 It is a schematic flow chart of the cuckoo filter querying data in the embodiment of the present application;
[0046] Figure 6 It is a schematic flow chart provided by Embodiment 3 of the data processing method of the present application;
[0047] Figure 7 It is a schematic flow chart provided by Embodiment 4 of the data processing method of the present application;
[0048] Figure 8Schematic diagram of the process of inserting data into the cuckoo filter in an embodiment of the present application;
[0049] Figure 9 Schematic diagram of the process of inserting data into the cuckoo filter in an embodiment of the present application;
[0050] Figure 10 Schematic diagram of the process provided in the fifth embodiment of the data processing method of the present application;
[0051] Figure 11 Schematic diagram of the device structure of the hardware operating environment involved in the data processing method in an embodiment of the present application.
[0052] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. Detailed implementation manners
[0053] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0054] For a better understanding of the technical solutions of the present application, the following will be described in detail in combination with the accompanying drawings of the specification and specific implementation manners.
[0055] In the Internet of Things, a cuckoo filter can be added between a web application and Redis of a database. As Figure 1 shown, a network access request sent from a web application will first pass through the cuckoo filter. The cuckoo filter quickly determines whether the requested data exists in the database. If it does not exist, the access request is directly rejected and the process ends. If it exists, the request is allowed to flow to the Redis layer or the database layer.
[0056] The cuckoo filter sets a single hash table to quickly determine whether a record exists in the database. However, when using a hash function, there is a situation where different inputs are mapped to the same hash value or the same hash table index position by the hash function, resulting in hash conflicts. Therefore, after being judged by the cuckoo filter, when the result is that the data exists, there may be a situation where the data actually does not exist in the database, that is, there is a problem of poor accuracy in the cuckoo filter performing database-related data processing operations.
[0057] The main solution of the embodiment of the present application is: in response to a data operation request corresponding to target data in the database, determine first fingerprint data corresponding to the target data; in the case where the first fingerprint data is queried in the first hash table, determine second fingerprint data corresponding to the target data, and the storage length of the second fingerprint data is greater than the storage length of the first fingerprint data; perform a target data operation corresponding to the data operation request on the second fingerprint data based on the second hash table.
[0058] In this embodiment, for the convenience of description, the following describes the execution subject as a data processing device.
[0059] This application provides a solution. By querying the first fingerprint data through the first hash table, it is possible to quickly determine whether the target data exists, thereby reducing unnecessary full-table scans. Since the storage length of the second fingerprint data is greater than that of the first fingerprint data, this means that the second fingerprint data has higher uniqueness, which can further reduce the possibility of hash collisions, thereby improving the accuracy of data operations.
[0060] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a data processing device, etc. that can implement the above functions. The following uses a data processing device as an example to illustrate this embodiment and the following embodiments.
[0061] Based on this, an embodiment of this application provides a data processing method, referring to Figure 2 , Figure 2 which is a schematic flowchart of the first embodiment of the data processing method of this application.
[0062] In this embodiment, the data processing method includes steps S10 to S30:
[0063] Step S10, in response to a data operation request corresponding to target data in the database, determine the first fingerprint data corresponding to the target data.
[0064] It should be noted that the target data is the data corresponding to the data operation request. In this embodiment, the target data may or may not exist in the database and further judgment is required.
[0065] Optionally, the data operation request includes network access requests such as a data query request, a data insertion request, and a data deletion request for the target data initiated by an application. Among them, the data query request is set to query whether the target data exists in the database and / or the data cache layer of the database. The data insertion request is set to add the fingerprint data corresponding to the target data. The data deletion request is set to delete the fingerprint data corresponding to the target data.
[0066] The fingerprint data refers to a unique identifier generated for the target data through a specific algorithm and is used to quickly compare and verify the integrity and uniqueness of the target data. Exemplarily, the fingerprint data can be a hash fingerprint, a cyclic redundancy check fingerprint (CRC, Cyclic Redundancy Check), etc.
[0067] When using a Cuckoo Filter, there is no need to store specific information because the entire filter's function is only to prove whether the current element may exist. Therefore, the key information that can prove this element needs to be put in, and this key information is called fingerprint data. The fingerprint data is an n-bit bit string generated by a hash function, such as 8 bits. The specific size of n is set by the acceptable false positive rate. If the storage space for each fingerprint data is larger, the false positive rate is smaller, but it will also make the hash table larger. Additionally, it should be noted that since the fingerprint data is obtained by calculating the hash function for the element, according to the pigeonhole principle, there will inevitably be a problem of hash collision, that is, the situation where the fingerprint data is the same.
[0068] Step S20, when the first fingerprint data is found in the first hash table, determine the second fingerprint data corresponding to the target data, where the storage length of the second fingerprint data is greater than the storage length of the first fingerprint data.
[0069] In this embodiment, the fingerprint data is unique and sensitive. Storing the fingerprint data in the form of a hash table can reduce the risk of data leakage. The first hash table stores the first fingerprint data.
[0070] It should be noted that the basic unit of the hash table is called an entry, and each entry stores a fingerprint data. The hash table consists of an array of buckets, and one bucket can have multiple entries. For example, Figure 3 there are four entries. And each bucket has four fingerprint positions, which means that after one hash calculation, the Cuckoo Filter has four nests available, and the four nests are in consecutive positions, which can better utilize the CPU cache. That is to say, the size of each bucket is 4 * 8 bits.
[0071] As an optional embodiment, before step S20, it further includes: determining a third storage location according to a third hash function and the target data; determining a fourth storage location according to a fourth hash function, the first fingerprint data, and the third storage location; step S20 includes: querying the first fingerprint data in the third storage location and the fourth storage location of the first hash table.
[0072] It should be noted that a hash function is a function that transforms an input of any length into an output of a fixed length, and is usually used in fields such as password protection, file verification, and data integrity verification. Fingerprint data refers to an n-bit bit string generated by a hash function, and the specific size of n is set by the acceptable false positive rate, such as using a fingerprint size of 8 bits.
[0073] This embodiment is described by taking the simplest two hash functions as an example, but is not limited to the case of two hash functions.
[0074] Exemplarily, as shown in the following formula:
[0075] f = fingerprint(x);
[0076] Where f is the first fingerprint data, x is the target data, and fingerprint() is a function for generating fingerprint data, such as a hash function, which converts the input data into a binary sequence of a fixed length, having the characteristics of uniqueness and fixed length. In a cuckoo filter, by designing the fingerprint length and the hash function, the collision probability can be effectively reduced.
[0077] When there are two storage locations, two different hash functions h3 and h4 are used to calculate the third storage location i1 and the fourth storage location i2.
[0078] i1 = h3(x);
[0079] i2 = h4(f) = i3 ⊕ h(f);
[0080] Where h3() is the third hash function, h4() is the fourth hash function, and h(f) is the value obtained by performing a hash operation on the first fingerprint data.
[0081] In the case where the first fingerprint data is found in the first hash table, since there may be a hash collision, it indicates that the target data corresponding to the data operation request may exist in the database. Therefore, it is necessary to further confirm whether the target data corresponding to the data operation request exists in the database.
[0082] It should be noted that a hash collision refers to the situation where different inputs are mapped to the same hash value or the same hash table index position when using a hash function. Since the input of a hash function can be data of any length and its combinations are infinite, while the output of a hash function is a value of a fixed length, usually an integer or a binary string of a fixed length, the output domain is finite. According to the pigeonhole principle, there will inevitably be multiple different inputs mapped to the same output value, thus resulting in a hash collision. The hash collision in a cuckoo filter specifically refers to the situation where for different insertion values x and y, assuming that the fingerprint data obtained from x is xf, and the two candidate storage locations are xi1 and xi2, while the fingerprint data obtained from y is yf, and the two candidate storage locations are yi1 and yi2, but the result is xf = yf, xi1 = yi1, and xi2 = yi2.
[0083] To avoid the situation of hash conflicts, a second hash table is introduced in this application. The second hash table stores second fingerprint data, where the storage length of the second fingerprint data is greater than that of the first fingerprint data. Exemplarily, the storage length of the first fingerprint data is 8 bit, and the storage length of the second fingerprint data is 24 bit. As an alternative embodiment for generating the second fingerprint data, the storage length of the first fingerprint data is increased to generate the second fingerprint data.
[0084] In the case where the first fingerprint data is not found in the first hash table, it indicates that the target data corresponding to the data operation request does not exist in the database and / or the cache layer of the database.
[0085] In this embodiment, the data operation request includes a data query request. After step S10, it further includes: in the case where the first fingerprint data is not stored in the first hash table, determining that the target data does not exist in the database. At this time, a query result indicating that the target data does not exist is returned to the application.
[0086] Most requests for accessing non-existent data in the database will be intercepted and filtered by the cuckoo filter. At most, only a small number of data operation requests for non-existent data in the database will be transferred to the database, avoiding the database from crashing due to being unable to withstand a large number of concurrent requests, and ensuring the security, stability, and reliability of the Internet of Things system.
[0087] Step S30, performing the target data operation corresponding to the data operation request on the second fingerprint data based on the second hash table; where the storage length of the fingerprint data in the second hash table is greater than that of the fingerprint data in the first hash table, and the fingerprint data in both the first hash table and the second hash table represents the data in the database.
[0088] As an alternative embodiment, when the target data operation corresponding to the data operation request is a query request for target data, check whether there is second fingerprint data in the second hash table. When no second fingerprint data is found in the second hash table, it is determined that the target data exists in the database. When second fingerprint data is found in the second hash table, it is determined that the target data may exist in the database and further query is required.
[0089] As an alternative embodiment, when the target data operation corresponding to the data operation request is an insertion request for target data, check whether there is second fingerprint data in the second hash table. When no second fingerprint data is found in the second hash table, insert the second fingerprint data into the second hash table.
[0090] As an alternative embodiment, when the target data operation corresponding to the data operation request is a deletion request for target data, query whether there is second fingerprint data in the second hash table. When second fingerprint data is found in the second hash table, delete the second fingerprint data from the second hash table.
[0091] In the technical solution of this embodiment, in response to a data operation request corresponding to target data in a database, determine first fingerprint data corresponding to the target data; when the first fingerprint data is found in the first hash table, determine second fingerprint data corresponding to the target data, where the storage length of the second fingerprint data is greater than that of the first fingerprint data; perform the target data operation corresponding to the data operation request on the second fingerprint data based on the second hash table. By querying the first fingerprint data through the first hash table, it is possible to quickly determine whether the target data exists, thereby reducing unnecessary full-table scans. Since the storage length of the second fingerprint data is greater than that of the first fingerprint data, this means that the second fingerprint data has higher uniqueness, which can further reduce the possibility of hash collisions, thereby improving the accuracy of data operations.
[0092] Based on the first embodiment of the present application, in the second embodiment of the present application, for content that is the same as or similar to the above embodiment, reference may be made to the above introduction and will not be elaborated hereinafter. On this basis, please refer to Figure 4 , step S30 includes:
[0093] Step S31, query the second fingerprint data in the second hash table;
[0094] Step S32, when the second fingerprint data is found in the second hash table, query whether the target data exists in the data cache layer corresponding to the database and / or the database;
[0095] Step S33, when the second fingerprint data is not found in the second hash table, determine that the target data exists in the database and / or the data cache layer of the database.
[0096] In this embodiment, the data operation request includes a data query request sent by an application, and the data query request is set to query whether the target data exists in the database and / or the data cache layer of the database.
[0097] It should be noted that since the data cache layer supports a large number of concurrent accesses, which is much larger than that of the database, the data in the database is cached in the data cache layer. For example, the data cache layer is a Remote Dictionary Server (Redis), and Redis is a cache database that can support up to 100,000 concurrent accesses per second. The database can be a relational database, such as MySQL, which can support up to several hundred concurrent accesses per second.
[0098] As an alternative embodiment, before step S31, it further includes: determining a first storage location according to a first hash function and target data; determining a second storage location according to a second hash function, second fingerprint data and the first storage location; step S31 includes: querying the second fingerprint data in the first storage location and the second storage location of the second hash table.
[0099] This embodiment is described by taking the simplest two hash functions as an example, but is not limited to the case of two hash functions. Exemplarily, the second fingerprint data is shown by the following formula:
[0100] f# = fingerprint(x);
[0101] Wherein, f# is the second fingerprint data, x is the target data, and fingerprint() is a function for generating fingerprint data, such as a hash function, which converts the input data into a binary sequence with a fixed length through the hash function, and has the characteristics of uniqueness and fixed length.
[0102] When there are two storage locations, two different hash functions h1 and h2 are used to calculate the first storage location i1# and the second storage location i2#.
[0103] i1# = h3(x);
[0104] i2# = h4(f) = i1# ⊕ h(f#);
[0105] Wherein, h1() is the first hash function, h2() is the second hash function, and h(f#) is the value obtained by performing a hash operation on the second fingerprint data.
[0106] When the second fingerprint data is queried in the second hash table, it is determined that there is a hash collision. At this time, the target data may exist in the data cache layer corresponding to the database, and / or the target data may exist in the database, and it is necessary to query the data cache layer corresponding to the database and / or the database to determine whether the target data exists.
[0107] In an alternative embodiment, step S32 includes: querying the target data in the data cache layer; if the target data is not queried in the data cache layer, querying whether the target data exists in the database; if the target data is queried in the data cache layer, it is determined that the target data exists in the data cache layer.
[0108] It should be noted that if the target data is not found in the data cache layer, the database is queried to see whether the target data exists. If the target data is found in the database, it is determined that the target data exists in the database, and the query result of the target data is returned to the application. If the target data is not found in the database, it is determined that the target data does not exist in both the data cache layer and the database, and the query result that the target data does not exist is returned to the application. If the target data is found in the data cache layer, it is determined that the target data exists in the data cache layer, and the query result of the target data is returned to the application.
[0109] When the second fingerprint data is not found in the second hash table, it indicates that there is no hash conflict. At this time, the target data exists in the database and / or the target data exists in the data cache layer of the database. Optionally, the target data is queried in the data cache layer; if the target data is not found in the data cache layer, the target data is queried in the database, and the query result of the target data is returned to the application. If the target data is found in the data cache layer, the query result of the target data is returned to the application.
[0110] When data is written, if no hash collision occurs, the data is stored in the first hash table, and if a hash collision is detected, the data is stored in the second hash table. Therefore, the improvement process of the cuckoo filter query data will be combined around the two hash tables to make a joint judgment query. The specific flow chart is as follows Figure 5 As shown:
[0111] When a user initiates a web request to the server to query data x, data x will first be transferred to the cuckoo filter, and the cuckoo filter will start to query whether x exists, and first calculate the first fingerprint data f and storage locations i1 and i2.
[0112] It is queried in the respective entries of the storage locations i1 and i2 in the first hash table whether fingerprint data f already exists.
[0113] When the first fingerprint data f cannot be found, it proves that the data x does not exist in Redis and the database. If a large amount of such non-existent data is put into the database for query in a high-concurrency scenario, it will cause excessive pressure on the database, seriously affecting the performance of the system and even causing the database to crash. Therefore, the user's query request process should be terminated here and the web application should be informed that the data x does not exist.
[0114] When the fingerprint data identical to the first fingerprint data f is found, the second fingerprint data f# and the storage locations i1# and i2# of the data x in the second hash table need to be recalculated.
[0115] It should be noted that the second fingerprint data f# after recalculation occupies more storage space than the first fingerprint data f. Therefore, the second fingerprint data f# can express more data information than the second fingerprint data f. Exemplarily, for two query data x1 and x2, after being converted into binary, they will become 1111000011110001 11110000 and 1111000000000001 11110000 respectively. Since the first fingerprint data f only occupies 8 bits, the binary form of the fingerprint data of x1 becomes 11110000 and the binary form of the fingerprint data of x2 becomes 11110000 after f = fingerprint(x), that is, x1 = x2 at this time; and because f# occupies 24 bits, the binary form of the fingerprint data of x1 becomes 11110000 11110001 11110000 and the binary form of the fingerprint data of x2 becomes 1111000000000001 11110000 after f# = fingerprint(x), that is, x1 ≠ x2 at this time). In summary, increasing the storage length of fingerprint data can reduce the probability of hash collision, that is, it can reduce the probability of false positives.
[0116] After obtaining f#, i1#, and i2#, query whether f# already exists at the address i1# or i2# in the second hash table. If it does not exist, it proves that no hash collision occurred during the insertion of the data x, that is, the data x must exist in Redis or the database. Then continue to query downward. If the record of the data x is found in the Redis layer, return the data result to the web application. If the record of the data x is not found in the Redis layer, continue to query the database layer. After querying the database layer, return the data result to the web application.
[0117] After obtaining f#, i1#, and i2#, query whether f# already exists at address i1# or i2# in the second hash table. If it exists, it proves that a hash collision occurred when data x was inserted. At this time, it can only be determined that the query result of data x may exist, that is, there is a false positive at this time. Exemplarily, insert a data x3 into the cuckoo filter. Assume that after converting x3 into binary, it becomes 11110000 10000001 11110000. When querying the cuckoo filter, if the query number is x3, that is, the inserted number itself, so the fingerprint data of x3 exists in both the first hash table and the second hash table. However, assume that when the query number becomes x4, after converting x4 into binary, it becomes 11110000 10111101 11110000. Since f only occupies 8 bits, after f = fingerprint(x), the binary form of the fingerprint data of x4 becomes 11110000, and the binary form of the data of x3 at this time is also 11110000, that is, at this time x4 = x3, that is, x4 exists in the first hash table; and because f# occupies 24 bits, after f# = fingerprint(x), the binary form of the fingerprint data of x4 becomes 11110000 10111101 11110000, while the binary form of the fingerprint data of x3 is 11110000 10000001 11110000, that is, at this time x4 ≠ x3, that is, x4 does not exist in the second hash table. For data x in this case, its actual data may be x3 or x4, that is, the query result of data x in the second hash table may exist or may not exist. When the data actually does not exist but is mistakenly considered to exist, a false positive occurs.
[0118] After proving that the data may exist, then continue to query downward. If a record of data x is found in the Redis layer, return the data result to the web application. If no record of data x is found in the Redis layer, continue to query the database layer. After querying the database layer, return the data result to the web application.
[0119] In this application, when the cuckoo filter filters data, it provides a mechanism that can efficiently filter data without consuming a large amount of space, and is particularly suitable for scenarios of high-concurrency query data. In the Internet of Things field of smart home, the Internet of Things system is connected to smart devices such as smart toilets, smart bathtubs, smart bathroom heaters, smart electric towel racks, smart drying racks, smart magic mirrors, and smart water valves. These smart devices are constantly maintaining heartbeat connections with the server, with continuous network requests and continuous database interactions. If the result feedback from the database cannot be obtained within the required time, it will lead to a decline in system performance, an increase in resource occupancy, an increase in system load, and may even cause the system to crash or respond slowly. Therefore, for those invalid network requests, they must be discarded as soon as possible before reaching the database.
[0120] Since the function of the cuckoo filter is to mark the existence or non-existence of each data in the database with limited storage space, there will inevitably be multiple different inputs mapped to the same output value. According to the pigeonhole principle, hash conflicts will inevitably occur.
[0121] The data with hash conflicts is placed in a separate second hash table, while the first hash table stores all the remaining data. When the user queries data, the first hash table will be queried first, which is beneficial to improving the efficiency of the user's data query. In the second hash table storing hash conflicts, the storage space for fingerprint data is increased, which is beneficial to improving the accuracy of querying data. Using a separate hash table, that is, the second hash table, to store the data with hash conflicts enables the cuckoo filter to store more useful and comparable data. Through the combined query judgment of the two hash tables, for the data defined as hash conflicts in the first hash table, further screening is carried out by expanding the data length value range and redefining the fingerprint data, which is beneficial to narrowing the range of data that actually does not exist but is misjudged as existing, and reducing the false positives of the cuckoo filter in querying data.
[0122] In the technical solution of this embodiment, by quickly querying the second fingerprint data in the second hash table, it can be quickly determined whether the target data exists, improving the accuracy of the query and reducing the number of direct accesses to the database. If fingerprint data exists in the hash table, the database cache layer and the database are further queried. This hierarchical query mechanism can make full use of the advantages of the cache, reduce the direct access to the database, and thus improve the overall query efficiency. In a high-concurrency scenario, the cache layer can effectively reduce the direct requests to the database and reduce the load pressure on the database.
[0123] Based on the first or second embodiment of this application, in the third embodiment of this application, the same or similar content as the above embodiments can be referred to the above introduction and will not be repeated hereinafter. On this basis, please refer to Figure 6 , step S30 includes:
[0124] Step S34: Insert the second fingerprint data into the second hash table.
[0125] In this embodiment, the data operation request includes a data insertion request, and the data insertion request is set to add the fingerprint data corresponding to the target data.
[0126] The hash function has two functions. One is to calculate the fingerprint data from the inserted data, and the other is to calculate the position of the bucket where the inserted data is to be stored. Each data to be inserted will correspondingly calculate the positions of two or more candidate buckets through two or more hash functions. In this embodiment, the simplest two hash functions are taken as an example for illustration, but it is not limited to the case of two hash functions.
[0127] In an optional embodiment, before step S34, it further includes: determining a first storage location according to the first hash function and the target data; determining a second storage location according to the second hash function, the second fingerprint data, and the first storage location; step S34 includes: inserting the second fingerprint data into the first storage location or the second storage location in the second hash table.
[0128] Optionally, if there is an empty space in the first storage location, store the second fingerprint data in the first storage location; if there is no empty space in the first storage location and there is an empty space in the second storage location, store the second fingerprint data in the second storage location.
[0129] Optionally, if there is no empty space in the first storage location and the second storage location, randomly select a reference storage location from the first storage location and the second storage location, and kick out the existing fingerprint data in the reference storage location; insert the first fingerprint data into the reference storage location; determine the replacement storage location of the existing fingerprint data, and re-insert the existing fingerprint data into the replacement storage location; if the replacement storage location is already full, repeat the step of determining the replacement storage location of the existing fingerprint data until successful insertion or the maximum re-insertion times are reached.
[0130] After the first fingerprint data has been stored in the third storage location i1 or the fourth storage location i2 in the first hash table, determine the second fingerprint data. Exemplarily, as shown in the following formula:
[0131] f# = fingerprint(x);
[0132] Wherein, f# represents the second fingerprint data, x represents the second fingerprint data, and fingerprint() is a function for generating fingerprint data, such as a hash function, which converts the input data into a binary sequence with a fixed length, having the characteristics of uniqueness and fixed length.
[0133] Determine the first storage location and the second storage location of the second fingerprint data. Exemplarily, as shown in the following formula:
[0134] i1# = h1(x);
[0135] i2# = h2(f) = i1# ⊕ h(f#);
[0136] Wherein, i1# represents the first storage location, i2# represents the second storage location, h1() represents the first hash function, h2() represents the second hash function, and h(f#) is the value obtained by performing a hash operation on the second fingerprint data.
[0137] In the technical solution of this embodiment, in the second hash table storing hash conflicts, the storage space for fingerprint data increases, which is beneficial to improving the accuracy of querying data. Using a separate hash table, namely the second hash table, to store the data that has generated hash conflicts enables the cuckoo filter to store more useful and comparable data. Through the combined query judgment of the two hash tables, for the data defined as hash conflicts in the first hash table, further screening is performed by expanding the value range of the data length and redefining the fingerprint data, which is beneficial to narrowing the range of data that does not actually exist but is misjudged as existing, and reducing the false positives of querying data by the cuckoo filter.
[0138] Based on any one of the first to third embodiments of the present application, in the fourth embodiment of the present application, the content that is the same as or similar to the above embodiments can be referred to the above introduction and will not be repeated hereinafter. On this basis, please refer to Figure 7 , after step S10, it further includes:
[0139] Step S40, in the case where the first fingerprint data is not found in the first hash table, insert the first fingerprint data into the first hash table.
[0140] In this embodiment, the data operation request includes a data insertion request, and the data insertion request is set to add the fingerprint data corresponding to the target data.
[0141] This embodiment is described by taking the simplest two hash functions as an example, but is not limited to the case of two hash functions.
[0142] In an optional embodiment, before step S40, it further includes: determining a third storage location according to a third hash function and the target data; determining a fourth storage location according to a fourth hash function, the first fingerprint data, and the third storage location; step S40 includes: inserting the first fingerprint data into the third storage location or the fourth storage location in the second hash table.
[0143] Optionally, if there is an empty space in the third storage location, store the first fingerprint data in the third storage location; if there is no empty space in the third storage location and there is an empty space in the fourth storage location, store the first fingerprint data in the fourth storage location.
[0144] Optionally, if there is no empty space in the third storage location and the fourth storage location, randomly select a reference storage location from the third storage location and the fourth storage location, and kick out the existing fingerprint data in the reference storage location; insert the first fingerprint data into the reference storage location; determine the replacement storage location of the existing fingerprint data, and re-insert the existing fingerprint data into the replacement storage location; if the replacement storage location is already full, repeat the step of determining the replacement storage location of the existing fingerprint data until successful insertion or the maximum number of re-insertions is reached.
[0145] Exemplarily, assume that there are four entries in each bucket, that is, there are four positions where fingerprint data can be stored. First, try to insert the first fingerprint data f into the bucket corresponding to the third storage location i1. If there is an empty space in the bucket, that is, at least one of the four positions is empty, insert directly. If the bucket of the third storage location i1 is full, that is, all four positions have been filled with fingerprint data, then try to insert the first fingerprint data f into the bucket of the fourth storage location i2. If there is an empty space in the bucket of the fourth storage location i2, insert directly.
[0146] If the buckets of both storage locations are full, it is necessary to kick out the existing fingerprints in one of the buckets and re-insert the kicked-out fingerprints. The specific steps are as follows: Randomly select a bucket i1# from the third storage location i1 or the fourth storage location i2, and kick out one of the original fingerprints f# in the bucket. Insert the first fingerprint data f into the position of the kicked-out original fingerprint f#. For the kicked-out original fingerprint f#, calculate its replacement storage location i2#, that is: i2# = i1# ⊕ h(f#). It should be noted that after knowing a position i1#, the other position i2# can be calculated because the calculation of i2# uses the exclusive OR operation, indicating the duality of i1# and i2#. Re-insert the kicked-out original fingerprint f# into the bucket of i2#. If the bucket of i2# is also full, repeat the process of kicking out and re-inserting until successful insertion or the maximum number of re-insertions is reached.
[0147] Insert the first fingerprint data into the first hash table. Exemplarily, as shown in the following formula:
[0148] f = fingerprint(x);
[0149] where x represents the target data, f represents the first fingerprint data, and fingerprint() represents the hash function.
[0150] The third storage location and the fourth storage location of the first fingerprint data in the first hash table are calculated, exemplarily as shown in the following formula:
[0151] i1=h3(x);
[0152]
[0153] Among them, i1 is the third storage position, i2 is the fourth storage position, h3() is the third hash function, h4() is the fourth hash function, and f represents the first fingerprint data.
[0154] If the first fingerprint data is not found in the third storage location i1 or the fourth storage location i2 in the first hash table, the first fingerprint data is inserted into the third storage location i1 or the fourth storage location i2 in the first hash table.
[0155] Reference Figure 8 When the data x is ready to be written into the cuckoo filter, the first fingerprint data f and the third storage location i1 and the fourth storage location i2 are calculated. The specific generation process and principle can refer to the algorithm description of inserting data into the second hash table.
[0156] It is queried whether the fingerprint data f already exists in the four entries of the storage locations i1 and i2.
[0157] If no fingerprint data f is found, press Figure 9 The steps shown are used to insert data. First, the four entries in the third storage position i1 are queried. If any of the four entries are free, the first fingerprint data f is stored therein. If there is no free space, an XOR operation is performed based on the first fingerprint data f and the third storage position i1 to calculate the fourth storage position i2. If there is a free space under the second coordinate, the fingerprint data of the element is stored therein. If there is no free space, the element will randomly squeeze out the fingerprint data in one of the entries in i2 and then store it itself. The squeezed fingerprint data will calculate its own second coordinate, and then it is determined whether there is a free space. The above operation is repeated until a threshold is reached and the cuckoo filter returns false or performs expansion processing.
[0158] If it is found that data identical to the first fingerprint data f already exists, the second hash table is needed to reduce false positives. Because the second hash table only stores fingerprint data that have hash conflicts in the first hash table, the amount of data is not large, so the size of each storage space in the second hash table can be increased, and the fingerprint data f# and candidate storage locations i1# and i2# of the data x in the second hash table can be recalculated, and then the second hash table can be used to store the fingerprint data. Figure 9Insert data according to the steps shown. First, query the four entries in the first storage location i1#. If there is an empty entry among the four, store the fingerprint data f# in it; if there is no empty space, perform an exclusive OR operation on the fingerprint f# and the first storage location i1# to calculate the second storage location i2#. If there is an empty space at the second coordinate, store the fingerprint data of the element in it; if there is still no empty space, then the element will randomly squeeze out the second fingerprint data in one of the entries in i2# and then store itself. The squeezed-out second fingerprint data will calculate its own second coordinate and then determine whether there is an empty space. Repeat the above operations until a threshold is reached, and the cuckoo filter returns false or performs an expansion process.
[0159] In the technical solution of this embodiment, insert the first fingerprint data into the first hash table, and then query the first fingerprint data through the first hash table, which can quickly determine whether the target data exists, thereby reducing unnecessary full-table scans.
[0160] Based on any one of the first to fourth embodiments of the present application, in the fifth embodiment of the present application, the same or similar content as the above embodiments can be referred to the above introduction and will not be repeated hereinafter. On this basis, please refer to Figure 10 , step S30 includes:
[0161] Step S35, delete the second fingerprint data corresponding to the target data in the second hash table.
[0162] In this embodiment, the data operation request includes a data deletion request sent by the application, and the data deletion request is set to delete the fingerprint data corresponding to the target data.
[0163] As an optional embodiment, before step S40, it further includes: determining the first storage location according to the first hash function and the target data; determining the second storage location according to the second hash function, the second fingerprint data, and the first storage location; step S40 includes: deleting the second fingerprint data corresponding to the target data at the first storage location or the second storage location in the second hash table.
[0164] Optionally, after step S10, it further includes: deleting the first fingerprint data corresponding to the target data in the first hash table. Determine the first fingerprint data f of the target data x and two storage locations i1 and i2, and query whether there is the first fingerprint data f in i1 or i2. If so, delete the first fingerprint data f from the bucket of i1 or i2.
[0165] In the technical solution of this embodiment, by calculating the storage location of the target data through a hash function, the fingerprint data to be deleted can be quickly located, avoiding full-table scanning and greatly improving the efficiency of the deletion operation. In the deletion operation, through the clear calculation of the hash function and confirmation of the storage location, it is ensured that only the fingerprint data corresponding to the target data is deleted, avoiding the risk of accidentally deleting other irrelevant data.
[0166] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the data processing method of this application. Based on this technical concept, more forms of simple transformation are within the protection scope of this application.
[0167] This application provides a data processing device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores a request executable by the at least one processor, and the request is executed by the at least one processor so that the at least one processor can execute the data processing method in the first embodiment above.
[0168] Next, refer to Figure 11 , which shows a schematic structural diagram of a data processing device suitable for implementing the embodiments of this application. The data processing device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs, Personal Digital Assistants), tablet computers (PADs, Portable Application Descriptions), portable multimedia players (PMPs, Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 11 The data processing device shown is only an example and should not bring any limitation to the functions and usage scope of the embodiments of this application.
[0169] As Figure 11As shown, the data processing device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. In the RAM 1004, various programs and data required for the operation of the data processing device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the data processing device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a data processing device having various systems, it should be understood that it is not required to implement or have all the systems shown. Instead, more or fewer systems may be implemented or had.
[0170] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in the present application are performed.
[0171] The data processing device provided by the present application adopts the data processing method in the above-mentioned embodiment, and can solve the technical problem of poor accuracy in the cuckoo filter performing data processing operations related to the database. Compared with the prior art, the beneficial effects of the data processing device provided by the present application are the same as those of the data processing method provided by the above-mentioned embodiment, and other technical features in the data processing device are the same as those disclosed in the method of the previous embodiment, and will not be elaborated here.
[0172] It should be understood that each part disclosed in this application can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0173] As described above, the above are only specific embodiments of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application, and all of them should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
[0174] This application provides a computer-readable storage medium with a computer-readable program request (i.e., a computer program) stored thereon, and the computer-readable program request is used to execute the data processing method in the above embodiments.
[0175] The computer-readable storage medium provided by this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with a requesting execution system, device, or apparatus. The program code contained on the computer-readable storage medium can be transmitted by any suitable medium, including but not limited to: wires, optical cables, radio frequency (RF), etc., or any suitable combination of the above.
[0176] The above computer-readable storage medium can be included in a data processing device; or it can exist separately without being assembled into the data processing device.
[0177] The above computer-readable storage medium carries one or more programs that, when executed by a data processing device, cause the data processing device to: query first fingerprint data through a first hash table, which can quickly determine whether target data exists, thereby reducing unnecessary full-table scans. Since the storage length of the second fingerprint data is greater than that of the first fingerprint data, this means that the second fingerprint data has higher uniqueness, which can further reduce the possibility of hash collisions, thereby improving the accuracy of data operations.
[0178] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0179] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and this module, program segment, or part of the code contains one or more executable requests for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer requests.
[0180] The modules described in the embodiments of this application can be implemented in software or in hardware. In some cases, the name of the module does not constitute a limitation on the unit itself.
[0181] The readable storage medium provided by this application is a computer-readable storage medium. The computer-readable storage medium stores a computer-readable program request (i.e., a computer program) for executing the above data processing method, and can solve the technical problem that the cuckoo filter has poor accuracy in performing data processing operations related to the database. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by this application are the same as those of the data processing method provided by the above embodiments, and will not be elaborated here.
[0182] This application also provides a computer program product, including a computer program, and the steps of the data processing method as described above are implemented when the computer program is executed by a processor.
[0183] The computer program product provided by this application can solve the technical problem that the cuckoo filter has poor accuracy in performing data processing operations related to the database. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as those of the data processing method provided by the above embodiments, and will not be elaborated here.
[0184] The above are only partial embodiments of this application, and do not limit the patent scope of this application. Any equivalent structural transformation made by using the content of the specification and drawings of this application under the technical concept of this application, or direct / indirect application in other related technical fields, is included in the patent protection scope of this application.
Claims
1. A data processing method, characterized in that: The method comprises: In response to a data operation request corresponding to target data in a database, determining first fingerprint data corresponding to the target data; When the first fingerprint data is found in the first hash table, second fingerprint data corresponding to the target data is determined, and the storage length of the second fingerprint data is greater than the storage length of the first fingerprint data; Performing a target data operation corresponding to the data operation request on the second fingerprint data based on a second hash table; The storage length of the fingerprint data in the second hash table is greater than the storage length of the fingerprint data in the first hash table, and the fingerprint data in the first hash table and the second hash table both represent the data in the database.
2. The method according to claim 1, characterized in that The data operation request includes a data query request sent by an application, the data query request is configured to query whether the target data exists in the database and / or the data cache layer of the database, and the step of performing the target data operation corresponding to the data operation request on the second fingerprint data based on the second hash table includes: Query the second fingerprint data in the second hash table; When the second fingerprint data is found in the second hash table, query the data cache layer corresponding to the database and / or the database whether the target data exists; If the second fingerprint data is not found in the second hash table, it is determined that the target data exists in the database and / or the data cache layer of the database.
3. The method according to claim 2, characterized in that Before the step of searching the second fingerprint data in the second hash table, the method further includes: Determining a first storage location according to the first Hash function and the target data; determining a second storage location according to a second Hash function, the second fingerprint data, and the first storage location; The step of querying the second fingerprint data in the second hash table includes: The second fingerprint data is searched in the first storage location and the second storage location of the second hash table.
4. The method according to claim 2, characterized in that The step of querying the data cache layer corresponding to the database and / or the database whether the target data exists includes: In the data cache layer, query the target data; If the target data is not found in the data cache layer, query whether the target data exists in the database; If the target data is found in the data cache layer, it is determined that the target data exists in the data cache layer.
5. The method according to claim 1, characterized in that The data operation request includes a data query request, and after the step of determining the first fingerprint data corresponding to the target data, the step further includes: When the first fingerprint data is not stored in the first hash table, it is determined that the target data does not exist in the database.
6. The method according to any one of claims 1 to 5, characterized in that The data operation request includes a data insertion request, the data insertion request is configured to add fingerprint data corresponding to the target data, and the step of performing the target data operation corresponding to the data operation request on the second fingerprint data based on the second hash table includes: Insert the second fingerprint data into the second hash table.
7. The method according to claim 6, characterized in that Before the step of inserting the second fingerprint data into the second hash table, the method further includes: Determining a first storage location according to the first Hash function and the target data; determining a second storage location according to a second Hash function, the second fingerprint data, and the first storage location; The step of inserting the second fingerprint data into the second hash table comprises: Insert the second fingerprint data into the first storage location or the second storage location in the second hash table.
8. The method according to any one of claims 1 to 5, characterized in that The data operation request includes a data insertion request, and the data insertion request is configured to add fingerprint data corresponding to the target data. After the step of determining the first fingerprint data corresponding to the target data, the step further includes: If the first fingerprint data is not found in the first hash table, the first fingerprint data is inserted into the first hash table.
9. The method according to any one of claims 1 to 5, characterized in that The data operation request includes a data deletion request sent by an application, the data deletion request is set to delete fingerprint data corresponding to the target data, and the step of performing the target data operation corresponding to the data operation request on the second fingerprint data based on the second hash table includes: The second fingerprint data corresponding to the target data is deleted from the second hash table.
10. A data processing device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data processing method according to any one of claims 1 to 9.
11. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data processing method according to any one of claims 1 to 9 are implemented.
12. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the data processing method according to any one of claims 1 to 9 are implemented.