Data caching method, device, electronic device and storage medium
By performing hash calculation and hash table storage on the bitmap files of the target business process, the problems of memory usage and low query efficiency caused by the increase in data volume are solved, and fast data writing and efficient query are achieved.
Patent Information
- Application Number
- CN202111604284.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-24
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2041-12-24
AI Technical Summary
In existing technologies, the magnitude of some statistical data increases proportionally with the dimension of the business indicator, resulting in slow business data writing speed, high memory usage, and low query efficiency.
By creating a bitmap file corresponding to the target business process, three hash calculations are performed on the key values of the target level indicators to generate the bit positions of the bitmap file and write the bits into the bitmap file. After the business data is generated, it is written into the hash table, the indicator data is obtained for hash calculation, and the bit value in the bitmap file is updated.
It reduces memory usage, improves data writing speed and query efficiency, and especially significantly improves query performance in hierarchical queries by preprocessing and combining query fields and using Bloom filter dimensionality reduction transformation.
Smart Images

Figure CN114490521B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of mobile communication technology, and in particular to a data caching method, device, electronic device and storage medium. Background Art
[0002] In existing business statistical data, it is usually necessary to perform hierarchical statistics on real-time data at the minute level, such as the total number of calls to the sub-interface at the minute level for billing services, the total number of calls to the sub-interface by province, the total number of calls to the sub-interface by province and by status, and the number of calls to the sub-interface by province, by status and by response time.
[0003] However, the magnitude of some statistical data will increase proportionally with the increase in the dimension of the business indicator. At this time, it is bound to cause slow business data writing speed, high memory usage, and low query efficiency. Summary of the Invention
[0004] The present application provides a data caching method, device, electronic device and storage medium to solve the problem that the magnitude of some statistical data will increase proportionally with the dimension of business indicators, which will inevitably result in slow business data writing speed, high memory usage and low query efficiency.
[0005] In order to solve the above problems, the embodiment of the present application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a data caching method, comprising:
[0007] Create a bitmap file with a set number of bits corresponding to the target business process;
[0008] Perform three hash calculations on the key values of the target level indicators under the target business process to generate bits of the bitmap file, and write the bits into the bitmap file;
[0009] After generating the business data under the target business process, writing the business data into a hash table;
[0010] Obtaining indicator data of the business data under a preset dimension, performing a hash calculation on the indicator data, and generating a hash value corresponding to the business data;
[0011] The bit value of the target bit matching the hash value in the bitmap file is changed.
[0012] Optionally, the step of creating a bitmap file of a set number of bits corresponding to the target business process includes:
[0013] Obtain the date and time of the day, and the business process identifier of the target business process;
[0014] A bitmap file of a set number of bits corresponding to the target business process is created according to the date and time and the business process identifier.
[0015] Optionally, performing three hash calculations on key values of target-level indicators under the target business process to generate bits of the bitmap file, and writing the bits into the bitmap file includes:
[0016] Perform three hash calculations on the key values of the target level indicators under the target business process to obtain three hash values corresponding to the target level indicators;
[0017] The three hash values are used as the bits and written into the bitmap file.
[0018] Optionally, writing the business data into a hash table includes:
[0019] Obtaining a combined indicator value corresponding to the business data;
[0020] The combined index value is written into the hash table.
[0021] Optionally, the combined indicator value of the business data includes: a target level indicator of the business data, a date field and a time field corresponding to the target level indicator, and a level indicator value of the target level indicator.
[0022] In a second aspect, an embodiment of the present application provides a data caching device, comprising:
[0023] A bitmap file creation module is used to create a bitmap file of a set number of bits corresponding to the target business process;
[0024] A bit generation module is used to perform three hash calculations on the key values of the target level indicators under the target business process, generate bits of the bitmap file, and write the bits into the bitmap file;
[0025] A business data writing module is used to write the business data under the target business process into a hash table after generating the business data;
[0026] A hash value generation module is used to obtain indicator data of the business data under a preset dimension, perform hash calculation on the indicator data, and generate a hash value corresponding to the business data;
[0027] A bit value changing module is used to change the bit value of a target bit position in the bitmap file that matches the hash value.
[0028] Optionally, the bitmap file creation module includes:
[0029] A business process identifier acquisition unit, configured to acquire the date and time of the day and the business process identifier of the target business process;
[0030] A bitmap file creation unit is configured to create a bitmap file of a set number of bits corresponding to the target business process according to the date and time and the business process identifier.
[0031] Optionally, the bit generation module includes:
[0032] A hash value acquisition unit, configured to perform three hash calculations on the key values of the target level indicators under the target business process to obtain three hash values corresponding to the target level indicators;
[0033] The bit writing unit is used to write the three hash values as the bits into the bitmap file.
[0034] Optionally, the business data writing module includes:
[0035] A combination index value acquisition unit, configured to acquire a combination index value corresponding to the business data;
[0036] The combination index value writing unit is used to write the combination index value into the hash table.
[0037] Optionally, the combined indicator value of the business data includes: a target level indicator of the business data, a date field and a time field corresponding to the target level indicator, and a level indicator value of the target level indicator.
[0038] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0039] A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the above-mentioned data caching methods when executing the program.
[0040] In a fourth aspect, an embodiment of the present application provides a readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute any of the data caching methods described above.
[0041] Compared with the prior art, the embodiments of the present application have the following advantages:
[0042] The embodiments of the present application provide a data caching method, device, electronic device and storage medium, which creates a bitmap file with a set number of bits corresponding to a target business process, performs three hash calculations on the key values of the target hierarchical indicators under the target business process, generates the bits of the bitmap file, and writes the bits into the bitmap file. After generating the business data under the target business process, the business data is written into a hash table, the indicator data of the business data under a preset dimension is obtained, the indicator data is hashed, a hash value corresponding to the business data is generated, and the bit value of the target bit matching the hash value in the bitmap file is changed. The embodiments of the present application reduce the memory occupancy rate by utilizing the Hash feature zipList in Redis. The data storage method is simple and the writing speed is fast. The hierarchical query is performed by the query party after pre-processing and combining the query fields and then reducing the dimension through the Bloom filter to convert it into a specified combination indicator query, which can greatly improve the data query efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A flowchart of a data caching method provided in an embodiment of the present application;
[0044] Figure 2 A schematic diagram of a data caching process provided in an embodiment of the present application;
[0045] Figure 3 A schematic diagram of the structure of a data cache device provided in an embodiment of the present application;
[0046] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0048] Example 1
[0049] Reference Figure 1 , shows a flow chart of the steps of a data caching method provided by an embodiment of the present application, such as Figure 1 As shown, the data caching method may include the following steps:
[0050] Step 101: Create a bitmap file of a set number of bits corresponding to a target business process.
[0051] The embodiments of the present application can be applied to a hierarchical indicator statistical data caching method based on real-time data, in a scenario where massive minute-level hierarchical statistical data are cached.
[0052] A bitmap file, also known as a bitmap, has a .bmp or .dib extension. A bitmap is a standard Windows graphics file format. It defines an image as consisting of dots (pixels), each of which can be represented by a variety of colors, including 2-, 4-, 8-, 16-, 24-, and 32-bit colors. For example, a 32-bit true-color image with a resolution of 1024×768 would occupy 3072KB of storage space: 1024×768×32 / (8*1024) = 3072KB.
[0053] The target business process refers to a business process that needs to create a bitmap file.
[0054] In this example, the number of target business processes may be one or more. Specifically, the number of target business processes may be determined according to business requirements, and this embodiment does not impose any limitation thereto.
[0055] In this embodiment, a bitmap file with a set number of bits corresponding to a target business process can be created. The process of creating the bitmap file can be described in detail in conjunction with the following specific implementation methods.
[0056] In a specific implementation of the present application, the above step 101 may include:
[0057] Sub-step A1: Obtain the date and time of the day, and the business process identifier of the target business process.
[0058] In this embodiment, the date and time refers to the date when the bitmap file is created, such as December 22, 2021.
[0059] The business process identifier refers to the identifier corresponding to the target business process. In this example, each business process corresponds to a unique identifier. The business process identifier can be a digital identifier, a character identifier, or other forms of identifiers. Specifically, the form of expression of the business process identifier can be determined according to business needs, and this embodiment does not limit this.
[0060] When a bitmap file corresponding to a target business process needs to be created, the date and time of the day and the business process identifier of the target business process may be obtained.
[0061] After obtaining the time of day and the business process identifier of the target business process, sub-step A2 is executed.
[0062] Sub-step A2: creating a bitmap file of a set number of bits corresponding to the target business process according to the date and time and the business process identifier.
[0063] After obtaining the time of day and the business process ID of the target business process, a bitmap file with a set number of bits corresponding to the target business process can be created based on the date and time of day and the business process ID. In this example, a bitmap with a set number of bits can be created for each business process every day.
[0064] After creating a bitmap file of a set number of bits corresponding to the target business process, step 102 is executed.
[0065] Step 102: Perform three hash calculations on the key values of the target hierarchical indicators under the target business process to generate bits of the bitmap file, and write the bits into the bitmap file.
[0066] After creating a bitmap file with a set number of bits corresponding to the target business process, three hash calculations can be performed on the key values of the target hierarchical indicators under the target business process to generate bits of the bitmap file, and the generated bits are written to the bitmap file. For example, the key of the hierarchical indicator can be spliced according to province, interface, and status, and then three hash values can be calculated according to the three hash calculation methods. These three hash values can then be used as bits and written into the bitmap file.
[0067] The above process can be described in detail in conjunction with the following specific implementation methods.
[0068] In a specific implementation of the present application, step 102 may include:
[0069] Sub-step B1: performing three hash calculations on the key values of the target level indicators under the target business process to obtain three hash values corresponding to the target level indicators.
[0070] In this embodiment, after creating the bitmap file corresponding to the target business process, three hash calculations may be performed on the key of the target level indicator under the target business process to obtain three hash values corresponding to the target level indicator.
[0071] After performing three hash calculations on the key values of the target-level indicators under the target business process to obtain three hash values corresponding to the target-level indicators, sub-step B2 is executed.
[0072] Sub-step B2: Write the three hash values as the bits into the bitmap file.
[0073] After performing three hash calculations on the key values of the target level indicators under the target business process to obtain three hash values corresponding to the target level indicators, the obtained three hash values can be written as bits into the bitmap file corresponding to the target business process.
[0074] After performing three hash calculations on the key values of the target hierarchical indicators under the target business process to generate bits of a bitmap file and writing the bits into the bitmap file, step 103 is executed.
[0075] Step 103: After generating the business data under the target business process, write the business data into a hash table.
[0076] Three hash calculations are performed on the key values of the target level indicators under the target business process to generate bits of a bitmap file, and the bits are written into the bitmap file. After the business data under the target business process is generated, the generated business data can be written into a hash table (i.e., hashtable). In this embodiment, the elements that actually appear in the individual indicators in the target business process can be cached. The specific process is as follows:
[0077] 1. Split the combined indicators of the target business process and create separate hashtables to store the specific values of the classification indicators that occur in the actual business. For example, if a process is counted as three indicators: "interface-province-status code", then create three hashtables to store which interfaces, provinces, and statuses are generated.
[0078] 2. The saved content is stored by day, regardless of the minute it occurs. This can be used to reduce the number of hashtable elements and increase query speed.
[0079] The above process can be described in detail in conjunction with the following specific implementation methods.
[0080] In a specific implementation of the present application, step 103 may include:
[0081] Sub-step C1: Obtain the combined indicator value corresponding to the business data.
[0082] In this embodiment, when the business data generated under the target business process is written into the hash table, the combination index value corresponding to the business data can be obtained.
[0083] In this embodiment, the combined indicator value may include: a target level indicator of the business data, a date field and a time field corresponding to the target level indicator, and a level indicator value of the target level indicator.
[0084] In this example, the hierarchical indicators are stored in a hashtable. The hierarchical indicator key contains date and time fields. The hierarchical indicator time field uses the current minute of occurrence (0-1439). The hierarchical indicator value is of int64 type and is saved by using the incr command.
[0085] After obtaining the combined indicator value corresponding to the business data, execute sub-step C2.
[0086] Sub-step C2: writing the combination index value into the hash table.
[0087] After obtaining the combined index value corresponding to the business data, the combined index value can be written into the hash table.
[0088] In this example, the structure of the combined indicator buffer data is as follows:
[0089] Date#Indicator1[#IndicatorN]#Minutes=Statistical Value
[0090] 07#jifei001#1349=100
[0091] 07#jifei001#Beijing#1349=90
[0092] 07#jifei001#Beijing#200#1349=20
[0093] It can be understood that the above examples are merely examples listed for a better understanding of the technical solutions of the embodiments of the present application, and are not intended to be the sole limitation on the embodiments.
[0094] After the business data under the target business process is generated and written into the hash table, step 104 is executed.
[0095] Step 104: Obtain indicator data of the business data under a preset dimension, perform hash calculation on the indicator data, and generate a hash value corresponding to the business data.
[0096] After writing the business data generated under the target business process into the hash table, you can obtain the indicator data of the business data under the preset dimensions, and perform hash calculation on the indicator data to generate a hash value corresponding to the business data. For example, the preset dimensions are: province, interface, and status. After obtaining the business data, you can obtain the indicator data of the business data under these three dimensions, and then splice these three indicator data and calculate the corresponding hash value.
[0097] After generating the hash value corresponding to the business data, execute step 105.
[0098] Step 105: Change the bit value of the target bit in the bitmap file that matches the hash value.
[0099] After generating the hash value corresponding to the business data, you can change the bit value of the target biti that matches the hash value in the bitmap file. For example, when the calculated hash value is 10, the target bit is 10, so the bit value of the target bit is changed from 0 to 1.
[0100] In this embodiment, after the business data is written, the business data may be queried. The query method may include:
[0101] 1. Direct query method: query statistical results from the cache by date + indicator name + minutes;
[0102] 2. Hierarchical query method: First determine how many levels of data to query, retrieve the corresponding indicator's actual content fields, combine them sequentially in memory, use the current day's Bloom filter to remove key combinations that are definitely not present, and then query the cache in batches.
[0103] The embodiment of the present application reduces memory usage through the Hash feature zipList in Redis, fixes the number of sub-keys to 1440, avoids converting zipList into hashTable, and reduces memory usage by 5-10 times without affecting query performance.
[0104] Moreover, hierarchical query is a query in which the query party pre-processes and combines the query fields and then uses Bloom filter to reduce the dimension and convert them into a query of specified combination indicators.
[0105] The above solutions provided in the embodiments of this application can be combined with Figure 2 This is described in detail below.
[0106] Reference Figure 2 , which shows a schematic diagram of a data caching process provided in an embodiment of the present application.
[0107] like Figure 2 As shown, the cache in this embodiment includes three parts: a Bloom filter, actual elements of individual indicators, and combined indicator values.
[0108] Bloom filter can use three hash algorithms: HashBKDR, HashSDBM and HashDJB. Using these three hash algorithms, a bitmap file with a digit of 102400 can be created for each business process every day, that is, Figure 2 Shown: BloomFilter-bitmap (size: 102400).
[0109] Actual occurrence fields: For business data fields generated within the business process, you can follow Figure 2 The field category names shown are stored in a hashtable.
[0110] Field value cache: The combined field name is used to store the value in the hashtable, i.e. date#category field 1[#category field N], and statistics are performed by minute, such as Figure 2 As shown: 0-minute statistical value, 1-minute statistical value, 2-minute statistical value, 3-minute statistical value, ..., 1439-minute statistical value, etc.
[0111] The data caching method provided in the embodiment of the present application creates a bitmap file of a set number of bits corresponding to the target business process, performs three hash calculations on the key values of the target hierarchical indicators under the target business process, generates the bits of the bitmap file, and writes the bits into the bitmap file. After generating the business data under the target business process, the business data is written into a hash table, the indicator data of the business data under the preset dimension is obtained, the indicator data is hashed to generate a hash value corresponding to the business data, and the bit value of the target bit matching the hash value in the bitmap file is changed. The embodiment of the present application reduces the memory occupancy rate by utilizing the Hash feature zipList in Redis. The data storage method is simple and the writing speed is fast. The hierarchical query is performed by the query party after pre-processing and combining the query fields and then reducing the dimension through the Bloom filter to convert it into a specified combination indicator query, which can greatly improve the data query efficiency.
[0112] For the sake of simplicity, the aforementioned method embodiments are described as a series of action combinations. However, those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0113] Example 2
[0114] Reference Figure 3 , shows a schematic structural diagram of a data cache device provided by an embodiment of the present application, such as Figure 3 As shown, the data cache device 300 may include the following modules:
[0115] A bitmap file creation module 310 is used to create a bitmap file of a set number of bits corresponding to a target business process;
[0116] A bit generation module 320 is configured to perform three hash calculations on the key values of the target level indicators under the target business process to generate bits of the bitmap file and write the bits into the bitmap file;
[0117] A business data writing module 330 is configured to write the business data under the target business process into a hash table after generating the business data;
[0118] A hash value generation module 340 is configured to obtain indicator data of the business data under a preset dimension, perform a hash calculation on the indicator data, and generate a hash value corresponding to the business data;
[0119] The bit value changing module 350 is configured to change the bit value of a target bit in the bitmap file that matches the hash value.
[0120] Optionally, the bitmap file creation module 310 includes:
[0121] A business process identifier acquisition unit, configured to acquire the date and time of the day and the business process identifier of the target business process;
[0122] A bitmap file creation unit is configured to create a bitmap file of a set number of bits corresponding to the target business process according to the date and time and the business process identifier.
[0123] Optionally, the bit generation module 320 includes:
[0124] A hash value acquisition unit, configured to perform three hash calculations on the key values of the target level indicators under the target business process to obtain three hash values corresponding to the target level indicators;
[0125] The bit writing unit is used to write the three hash values as the bits into the bitmap file.
[0126] Optionally, the business data writing module 330 includes:
[0127] A combination index value acquisition unit, configured to acquire a combination index value corresponding to the business data;
[0128] The combination index value writing unit is used to write the combination index value into the hash table.
[0129] Optionally, the combined indicator value of the business data includes: a target level indicator of the business data, a date field and a time field corresponding to the target level indicator, and a level indicator value of the target level indicator.
[0130] The data caching device provided in the embodiment of the present application creates a bitmap file of a set number of bits corresponding to the target business process, performs three hash calculations on the key values of the target hierarchical indicators under the target business process, generates the bits of the bitmap file, and writes the bits into the bitmap file. After generating the business data under the target business process, the business data is written into the hash table, the indicator data of the business data under the preset dimension is obtained, the indicator data is hashed, the hash value corresponding to the business data is generated, and the bit value of the target bit matching the hash value in the bitmap file is changed. The embodiment of the present application reduces the memory occupancy rate by utilizing the Hash feature zipList in Redis. The data storage method is simple and the writing speed is fast. The hierarchical query is performed by the query party after pre-processing and combining the query fields and then reducing the dimension through the Bloom filter to convert it into a specified combination indicator query, which can greatly improve the data query efficiency.
[0131] Example 3
[0132] An embodiment of the present application provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-described data caching methods when executing the program.
[0133] Reference Figure 4 , shows a schematic structural diagram of an electronic device provided by an embodiment of the present application, such as Figure 4 As shown, electronic device 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 402 or computer program instructions loaded from a storage unit 408 into a random access memory (RAM) 403. Various programs and data required for the operation of electronic device 400 can also be stored in RAM 403. CPU 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to bus 404.
[0134] Multiple components in the electronic device 400 are connected to the I / O interface 405, including an input unit 406, such as a keyboard, a mouse, a microphone, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a magnetic disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the electronic device 400 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0135] The various processes and processing described above may be performed by the processing unit 401. For example, the method of any of the above embodiments may be implemented as a computer software program, which is tangibly contained in a computer-readable medium, such as the storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 400 via the ROM 402 and / or the communication unit 409. When the computer program is loaded into the RAM 403 and executed by the CPU 401, one or more actions in the method described above may be performed.
[0136] Example 4
[0137] An embodiment of the present application provides a readable storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute any of the above-mentioned data caching methods.
[0138] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0139] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity, or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, commodity, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, commodity, or device that includes the element.
[0140] The above is a detailed introduction to a data caching method, a data caching device, an electronic device and a storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A data caching method, characterized in that: include: Create a bitmap file with a set number of bits corresponding to the target business process; Perform three hash calculations on the key values of the target level indicators under the target business process to obtain three hash values corresponding to the target level indicators, use the three hash values as bits of the bitmap file, and write the bits into the bitmap file; After generating the business data under the target business process, writing the business data into a hash table; Obtaining indicator data of the business data under a preset dimension, performing a hash calculation on the indicator data, and generating a hash value corresponding to the business data; The bit value of the target bit matching the hash value in the bitmap file is changed.
2. The method according to claim 1, characterized in that The step of creating a bitmap file of a set number of bits corresponding to the target business process includes: Obtain the date and time of the day, and the business process identifier of the target business process; A bitmap file of a set number of bits corresponding to the target business process is created according to the date and time and the business process identifier.
3. The method according to claim 1, characterized in that Writing the business data into a hash table includes: Obtaining a combined indicator value corresponding to the business data; The combined index value is written into the hash table.
4. The method according to claim 1, wherein The combined indicator value of the business data includes: a target level indicator of the business data, a date field and a time field corresponding to the target level indicator, and a level indicator value of the target level indicator.
5. A data cache device, characterized in that: include: A bitmap file creation module is used to create a bitmap file of a set number of bits corresponding to the target business process; A bit generation module is configured to perform three hash calculations on the key values of the target level indicators under the target business process to obtain three hash values corresponding to the target level indicators; use the three hash values as the bits of the bitmap file, and write the bits into the bitmap file; A business data writing module is used to write the business data under the target business process into a hash table after generating the business data; A hash value generation module is used to obtain indicator data of the business data under a preset dimension, perform hash calculation on the indicator data, and generate a hash value corresponding to the business data; A bit value changing module is used to change the bit value of a target bit position in the bitmap file that matches the hash value.
6. The device according to claim 5, characterized in that The bitmap file creation module includes: A business process identifier acquisition unit, configured to acquire the date and time of the day and the business process identifier of the target business process; A bitmap file creation unit is configured to create a bitmap file of a set number of bits corresponding to the target business process according to the date and time and the business process identifier. The bit writing unit is configured to write the three hash values as the bits into the bitmap file.
7. The device according to claim 5, characterized in that The business data writing module includes: A combination index value acquisition unit, configured to acquire a combination index value corresponding to the business data; The combination index value writing unit is used to write the combination index value into the hash table.
8. The device according to claim 7, characterized in that The combined indicator value of the business data includes: a target level indicator of the business data, a date field and a time field corresponding to the target level indicator, and a level indicator value of the target level indicator.
9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the data caching method according to any one of claims 1 to 4 when executing the program.
10. A readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the data caching method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Base number statistics method, device, system and equipment and computer readable storage medium
CN111563109A