A data page compression method, device, equipment and storage medium

By merging data pages and processing differential data in the database system, the problem of low compression efficiency in the prior art is solved, and more efficient data storage is achieved.

CN119917475BActive Publication Date: 2025-06-20HANGZHOU HAOLINK INTELLIGENT TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510398535.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-01
Publication Date
2025-06-20
Estimated Expiration
2045-04-01

AI Technical Summary

Technical Problem

The prior art is less efficient when compressing data pages in database systems because the compression algorithm is directly used to compress each data page, and the data characteristics in the data pages are not fully utilized.

Method used

By identifying the data compression instructions of the target database, the data page to be compressed is determined, and the data page is merged according to the data characteristics of the data page to obtain the candidate data page, and then the data page difference data set is determined, the candidate data page and the difference data set are merged to obtain the target data page.

Benefits of technology

Through data page merging and differential data storage, the efficiency of data page compression is improved and storage space requirements are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119917475B_ABST
    Figure CN119917475B_ABST
Patent Text Reader

Abstract

The present application discloses a data page compression method, apparatus, device and storage medium, relating to the technical field of data compression. The method includes: when a data compression instruction of a target database is recognized, determining at least one data page to be compressed according to the data compression instruction; performing data page merging on the at least one data page to be compressed according to the data characteristics of the at least one data page to be compressed, so as to obtain candidate data pages; the data characteristics include at least one attribute name and the data value corresponding to the attribute name; determining a data page difference data set according to the at least one data page to be compressed and the candidate data pages; and merging the candidate data pages and the data page difference data set to obtain target data pages. The above technical solution can complete data compression only through data page merging and differential data storage, which helps to improve the efficiency of data page compression.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of computer technology, particularly to the field of data compression technology, and specifically to a data page compression method, apparatus, device, and storage medium. Background Art

[0002] Currently, in a database system, storing data on a storage medium after compression can not only save the cost of the storage medium but also improve the performance of the database.

[0003] In existing methods, various compression algorithms (such as Huffman coding) are generally directly used to compress each data page in the database. Although the storage space of the database is saved, due to the different data characteristics in the data pages, directly using the compression algorithm to compress each data page is likely to result in low efficiency of data page compression. Summary of the Invention

[0004] The present application provides a data page compression method, apparatus, device, and storage medium to improve the efficiency of data page compression.

[0005] According to one aspect of the present application, a data page compression method is provided. The method includes:

[0006] When a data compression instruction of a target database is recognized, determining at least one data page to be compressed according to the data compression instruction;

[0007] Performing data page merging on the at least one data page to be compressed according to the data characteristics of the at least one data page to be compressed to obtain candidate data pages; the data characteristics include at least one attribute name and the data value corresponding to the attribute name;

[0008] Determining a data page difference data set according to the at least one data page to be compressed and the candidate data pages;

[0009] Merging the candidate data pages and the data page difference data set to obtain target data pages.

[0010] According to another aspect of the present application, a data page compression apparatus is provided. The apparatus includes:

[0011] A data page determination module, configured to determine at least one data page to be compressed according to the data compression instruction when a data compression instruction of a target database is recognized;

[0012] A data page merging module, configured to perform data page merging on the at least one data page to be compressed according to the data characteristics of the at least one data page to be compressed to obtain candidate data pages; the data characteristics include at least one attribute name and the data value corresponding to the attribute name;

[0013] A differential data determination module, configured to determine a data page differential data set according to the at least one data page to be compressed and the candidate data page;

[0014] A data merging module, configured to merge the candidate data page and the data page differential data set to obtain a target data page.

[0015] According to another aspect of the present application, an electronic device is provided, and the electronic device includes:

[0016] One or more processors;

[0017] A memory, configured to store one or more programs;

[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement any one of the data page compression methods provided by the embodiments of the present application.

[0019] According to another aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, any one of the data page compression methods provided by the embodiments of the present application is implemented.

[0020] According to another aspect of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, any one of the data page compression methods provided by the embodiments of the present application is implemented.

[0021] In the present application, when a data compression instruction of a target database is recognized, at least one data page to be compressed is determined according to the data compression instruction; according to the data characteristics of the at least one data page to be compressed, data page merging is performed on the at least one data page to be compressed to obtain a candidate data page; the data characteristics include at least one attribute name and the data value corresponding to the attribute name; a data page differential data set is determined according to the at least one data page to be compressed and the candidate data page; the candidate data page and the data page differential data set are merged to obtain a target data page. The above technical solution can complete data compression only through data page merging and differential data storage, which helps to improve the efficiency of data page compression. Description of the Drawings

[0022] Figure 1 is a flowchart of a data page compression method provided by Embodiment 1 of the present application;

[0023] Figure 2 is a flowchart of a data page compression method provided by Embodiment 2 of the present application;

[0024] Figure 3 is a schematic structural diagram of a data page compression device provided by Embodiment 3 of the present application;

[0025] Figure 4 It is a schematic structural diagram of an electronic device for implementing the data page compression method of the embodiment of the present application. Detailed implementation manners

[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described here can be implemented in an order different from those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0028] In addition, it should also be noted that in the technical solution of the present application, the collection, storage, use, processing, transmission, provision, and disclosure of relevant data such as data compression instructions and data pages to be compressed comply with the provisions of relevant laws and regulations and do not violate public order and good customs.

[0029] Embodiment 1

[0030] Figure 1 It is a flowchart of a data page compression method provided according to Embodiment 1 of the present application. This embodiment is applicable to the situation of compressing data pages of a database and can be executed by a data page compression device. The data page compression device can be implemented in the form of hardware and / or software and can be configured in a computer device, such as a server. As Figure 1 shown, the method includes:

[0031] S110. When a data compression instruction of a target database is recognized, determine at least one data page to be compressed according to the data compression instruction.

[0032] In this embodiment, the target database refers to a database system or example that stores data. When performing data compression, data in the target database is usually processed. A data compression instruction refers to an instruction for compressing data in the target database; these instructions may include the scope of compression, the method of compression, the granularity of compression, etc. A data page to be compressed refers to a data page that needs to be compressed. Each data page may include multiple records, and each record has multiple attributes.

[0033] Exemplarily, in the case where a data compression instruction of the target database is recognized, and before compressing the data page to be compressed using the target compression algorithm, at least one data item to be compressed is determined according to the data compression instruction, so as to perform pre-compression processing on at least one data item to be compressed, thereby improving the compression efficiency of the subsequent use of the compression algorithm.

[0034] S120. Merge at least one data page to be compressed according to the data characteristics of at least one data page to be compressed, to obtain a candidate data page; the data characteristics include at least one attribute name and the data value corresponding to the attribute name.

[0035] In this embodiment, data characteristics refer to some attributes or features used to describe data content; here, data characteristics include at least one attribute name and the data value corresponding to the attribute name; the combination of the attribute name and the data value is used to characterize the data content stored in each data page; these characteristics are used to determine how to perform data compression and optimize the data page merging process. Data page merging refers to the process of merging multiple data pages to be compressed into one candidate data page during the compression process; this is usually to improve storage efficiency or reduce space waste during data compression. A candidate data page refers to a candidate data page generated after the data page merging operation; it is a new data page that contains the data content of multiple data pages that have been merged; during the compression process, this candidate data page will be used for further processing. An attribute name refers to a field or column name in a data page used to identify the type of data. A data value refers to the data value under this attribute name, which is the specific data content.

[0036] Exemplarily, according to the data characteristics of at least one data page to be compressed, the same records in at least one data page to be compressed are merged, or the same data structures in multiple pages are reorganized, so as to merge at least one data page to be compressed into a candidate data page.

[0037] In an alternative embodiment, after obtaining the candidate data page, the parameter lengths of at least one data page to be compressed may also be summed to obtain a candidate parameter length; determine the current parameter length of the candidate data page, and compare the current parameter length with the candidate parameter length to obtain a parameter length comparison result; in the case where the parameter length comparison result does not meet the parameter length condition, stop data page compression and feedback an exception warning.

[0038] In this embodiment, the parameter length of the data page to be compressed refers to the total length of all parameters in the data page; during the data page compression process, each data page to be compressed contains multiple parameters (such as records, fields, etc.); the parameter length refers to the length of each parameter (or data field), usually in bytes. The candidate parameter length is the result of summing up the parameter lengths of all parameters in each data page to be compressed; this is to calculate whether the total parameter size of the data page meets the expectation during the compression process. The current parameter length of the candidate data page refers to the current total length of the parameters contained in the candidate data page after the data merging and compression operations; this is an immediate calculation result that reflects the size of the data in the current candidate data page. The parameter length comparison result is the result obtained by comparing the current parameter length of the candidate data page with the candidate parameter length; the purpose of this comparison is to check whether the merged data page meets the expected size or length requirements. The parameter length condition refers to the standard or requirement that needs to be met when performing the parameter length comparison; this condition can be that the current parameter length is less than the candidate parameter length. The abnormal alarm refers to the alarm issued by the system when the parameter length comparison result during the data page compression process does not meet the expected condition; this alarm notifies the user or the system administrator that there is a problem during the data compression process and appropriate measures need to be taken to handle it.

[0039] Exemplarily, if the current parameter length is less than the candidate parameter length, the parameter length comparison result meets the parameter length condition, and the data page compression continues; if the current parameter length is greater than or equal to the candidate parameter length, the parameter length comparison result does not meet the parameter length condition, the data page compression stops, and an abnormal alarm is fed back.

[0040] S130. Determine a data page difference data set according to at least one data page to be compressed and a candidate data page.

[0041] In this embodiment, the data page difference data set refers to the different part between the data page to be compressed and the candidate data page; the difference data set records the different contents between the two, which may be caused by different data or updates during the merging process; this part of the data is used for the construction of the final target data page.

[0042] Exemplarily, after the data page merging, the data can be compared for differences, that is, calculate the differences between at least one data page to be compressed and the candidate data page to determine the data page difference data set.

[0043] S140. Merge the candidate data page and the data page difference data set to obtain a target data page.

[0044] In this embodiment, the target data page refers to the final data page after compression processing, which contains the data content after data page merging and differential dataset processing; finally, the target data page is the result of the compression process and is used to store the refined or optimized data.

[0045] In an alternative embodiment, after obtaining the target data page, the data characteristics of the target data page can be determined, and according to the data characteristics of the target data page, the target compression algorithm can be determined from the candidate compression algorithms; the target compression algorithm is used to perform compression processing on the target data page.

[0046] In this embodiment, the data characteristics of the target data page refer to some attributes or features used to describe the data content. The candidate compression algorithms are pre-configured relevant algorithms that can be used for database data compression; the algorithms can be Huffman coding, JPEG (Joint Photographic Experts Group) compression algorithm, etc. The target compression algorithm refers to the algorithm that can be used to perform compression processing on the target data page.

[0047] Exemplarily, if the target data page is text data, Huffman coding can be used for data compression; if the target data page is image data, the JPEG compression algorithm can be used for data compression.

[0048] It can be understood that in the case of recognizing the data compression instruction of the target database, the conventional data compression operation generally directly selects the corresponding compression algorithm to compress the data page to be compressed, while in this application, the data page is merged and the differences are processed to perform an initial compression on the data page first, so as to improve the efficiency of the compression algorithm when secondary compression is required later.

[0049] In the embodiment of the present application, when recognizing the data compression instruction of the target database, at least one data page to be compressed is determined according to the data compression instruction; according to the data characteristics of the at least one data page to be compressed, the data pages to be compressed are merged to obtain candidate data pages; the data characteristics include at least one attribute name and the data value corresponding to the attribute name; according to the at least one data page to be compressed and the candidate data pages, a data page differential dataset is determined; the candidate data pages and the data page differential dataset are merged to obtain the target data page. The above technical solution can complete data compression only through data page merging and differential data storage, which helps to improve the efficiency of data page compression.

[0050] Embodiment Two

[0051] Figure 2It is a flowchart of a data page compression method provided in Embodiment 2 of the present application. On the basis of the technical solutions of the above embodiments, this embodiment refines "merging at least one data page to be compressed according to the data characteristics of at least one data page to be compressed to obtain candidate data pages" into "performing attribute name similarity analysis on at least one data page to be compressed to determine candidate duplicate attribute names of at least one data page to be compressed; merging at least one data page to be compressed according to the candidate duplicate attribute names to obtain candidate data pages". It should be noted that for the parts not detailed in the embodiments of the present application, reference can be made to the relevant descriptions of other embodiments. As Figure 2 shown, the method includes:

[0052] S210. When a data compression instruction of a target database is recognized, determine at least one data page to be compressed according to the data compression instruction.

[0053] S220. Perform attribute name similarity analysis on at least one data page to be compressed to determine candidate duplicate attribute names of at least one data page to be compressed.

[0054] In this embodiment, attribute name similarity analysis refers to analyzing the attribute names between each data page to be compressed to determine which attribute names may be similar in semantics or form; similarity analysis is usually performed by comparing the text content of the attribute names. Candidate duplicate attribute names refer to the attribute names identified in the attribute name similarity analysis that may represent the same or similar data; these candidate attribute names may be merged or replaced during the data compression process to reduce redundancy and improve compression efficiency.

[0055] Exemplarily, by comparing the attribute names between at least one data page to be compressed, the duplicate attribute names are screened out as the candidate duplicate attribute names of at least one data page to be compressed.

[0056] It should be noted that the candidate duplicate attribute names refer to the attribute names that are commonly repeated in each data page to be compressed.

[0057] S230. Merge at least one data page to be compressed according to the candidate duplicate attribute names to obtain candidate data pages.

[0058] Optionally, perform data value similarity analysis on the data values corresponding to the candidate duplicate attribute names in at least one data page to be compressed to obtain target duplicate attribute names and the data values corresponding to the target duplicate attribute names; merge at least one data page to be compressed in order to obtain an intermediate data page; delete the redundant data in the intermediate data page based on the target duplicate attribute names and the data values corresponding to the target duplicate attribute names to obtain candidate data pages.

[0059] In this embodiment, the data value similarity analysis refers to comparing the attribute values corresponding to the candidate duplicate attribute names to check whether these attribute values are similar or identical between different data pages; the purpose is to further determine which data values are redundant or mergeable by identifying the similarity of the attribute values. The target duplicate attribute names refer to those duplicate attribute names obtained through the data value similarity analysis; that is, the data values corresponding to these attribute names are similar or identical between multiple data pages, and thus can be used as the basis for compression and merging. The data values corresponding to the target duplicate attribute names refer to the data values associated with the target duplicate attribute names; these data values are repeated or similar in different data pages, and thus can be merged or optimized to reduce the data storage space. The intermediate data page refers to the temporary data page after the merging step, which contains the data after the merging of each data page to be compressed, but may still contain redundant data that needs further processing. The redundant data deletion refers to removing those repeated, redundant or unnecessary data in the intermediate data page; in this step, the data value similarity analysis provides the basis to identify which data values are redundant and thus delete them.

[0060] S240. Determine a data page difference data set according to at least one data page to be compressed and a candidate data page.

[0061] Optionally, for each data page to be compressed, perform a similarity analysis on the data page to be compressed and the candidate data page to obtain the data page difference data between the data page to be compressed and the candidate data page; after the similarity analysis of at least one data page to be compressed is completed, summarize the data page difference data of at least one data page to be compressed to obtain a data page difference data set.

[0062] In this embodiment, the similarity analysis here refers to comparing the content between the data page to be compressed and the candidate data page to find the similar parts between them; the goal of this analysis is to identify the difference data between the two data pages, so as to provide a basis for subsequent data compression, merging and optimization. The data page difference data refers to the different parts between the data page to be compressed and the candidate data page during the similarity analysis process; these difference data reflect the different content between the two data pages, and they may be different attribute values, records, or completely different data structures; by analyzing these difference data, it can be determined which content is unique.

[0063] Exemplarily, compare the data content of each data page to be compressed with the candidate data page to filter out the data page difference data that is different between each data page to be compressed and the candidate data page, integrate the data page difference data in the order of the data pages to be compressed, and mark the corresponding identifiers of the data page difference data and the data pages to be compressed to obtain a data page difference data set.

[0064] S250. Merge the candidate data page and the data page difference data set to obtain the target data page.

[0065] In an alternative set of embodiments, after obtaining the target data page, if it is necessary to restore the data of a data page to be compressed, determine the data page difference data of the data page to be compressed from the data page difference data set in the target data page; remove the data page difference data corresponding to the data page to be compressed from the merged data of each data page to be compressed stored in the target data page to obtain the restored data of the data page to be compressed.

[0066] It should be noted that the merged data refers to the data corresponding to the candidate data page.

[0067] In the embodiments of the present application, when a data compression instruction of the target database is recognized, at least one data page to be compressed is determined according to the data compression instruction; the attribute name similarity analysis is performed on at least one data page to be compressed to determine at least one candidate duplicate attribute name of the data page to be compressed; according to the candidate duplicate attribute name, at least one data page to be compressed is merged to obtain a candidate data page; according to at least one data page to be compressed and the candidate data page, a data page difference data set is determined; the candidate data page and the data page difference data set are merged to obtain the target data page. Through the above technical solutions, by screening out the target duplicate attribute names and the data values corresponding to the target duplicate attribute names between the data pages to be compressed, and based on this, the data pages are merged, which can effectively improve the reliability of data page merging while ensuring the compression efficiency.

[0068] Embodiment Three

[0069] Figure 3 FIG. is a schematic structural diagram of a data page compression device provided according to Embodiment Three of the present application, which is applicable to the case of compressing the data pages of a database. The data page compression device can be implemented in the form of hardware and / or software, and the data page compression device can be configured in a computer device, such as a server. As Figure 3 shown, the device includes:

[0070] A data page determination module 310, configured to determine at least one data page to be compressed according to the data compression instruction when a data compression instruction of the target database is recognized;

[0071] A data page merging module 320, configured to merge at least one data page to be compressed according to the data characteristics of at least one data page to be compressed to obtain a candidate data page; the data characteristics include at least one attribute name and the data value corresponding to the attribute name;

[0072] A difference data determination module 330, configured to determine a data page difference data set according to at least one data page to be compressed and the candidate data page;

[0073] A data merging module 340, configured to merge a candidate data page and a data page difference data set to obtain a target data page.

[0074] In the embodiment of the present application, when a data compression instruction of a target database is recognized, at least one data page to be compressed is determined according to the data compression instruction; according to the data characteristics of the at least one data page to be compressed, data page merging is performed on the at least one data page to be compressed to obtain a candidate data page; the data characteristics include at least one attribute name and a data value corresponding to the attribute name; a data page difference data set is determined according to the at least one data page to be compressed and the candidate data page; the candidate data page and the data page difference data set are merged to obtain a target data page. In the above technical solution, data compression can be completed only through data page merging and differential data storage, which helps to improve the efficiency of data page compression.

[0075] Optionally, the data page merging module 320 includes:

[0076] An attribute name analysis unit, configured to perform attribute name similarity analysis on at least one data page to be compressed to determine candidate duplicate attribute names of the at least one data page to be compressed;

[0077] A data page merging unit, configured to perform data page merging on at least one data page to be compressed according to the candidate duplicate attribute names to obtain a candidate data page.

[0078] Optionally, the data page merging unit is specifically configured to:

[0079] Perform data value similarity analysis on data values corresponding to the candidate duplicate attribute names in at least one data page to be compressed to obtain a target duplicate attribute name and a data value corresponding to the target duplicate attribute name;

[0080] Perform data page merging on at least one data page to be compressed in sequence to obtain an intermediate data page;

[0081] Delete redundant data in the intermediate data page based on the target duplicate attribute name and the data value corresponding to the target duplicate attribute name to obtain a candidate data page.

[0082] Optionally, the data page merging module 320 further includes a parameter length verification unit; the parameter length verification unit is configured to:

[0083] After obtaining the candidate data page, sum the parameter lengths of at least one data page to be compressed to obtain a candidate parameter length;

[0084] Determine the current parameter length of the candidate data page, and compare the current parameter length with the candidate parameter length to obtain a parameter length comparison result;

[0085] When the parameter length comparison result does not meet the parameter length condition, stop compressing the data page and give an abnormal alarm.

[0086] Optionally, the difference data determination module 330 is specifically configured to:

[0087] For each data page to be compressed, perform similarity analysis on the data page to be compressed and the candidate data page to obtain the data page difference data between the data page to be compressed and the candidate data page;

[0088] After recognizing that the similarity analysis of at least one data page to be compressed is completed, summarize the data page difference data of at least one data page to be compressed to obtain a data page difference data set.

[0089] Optionally, the device further includes a data page compression module; the data page compression module is used to:

[0090] Determine the data characteristics of the target data page, and determine the target compression algorithm from the candidate compression algorithms according to the data characteristics of the target data page;

[0091] Use the target compression algorithm to perform compression processing on the target data page.

[0092] The data page compression device provided by the embodiments of the present application can execute the data page compression method provided by any embodiment of the present application, and has the corresponding function modules and beneficial effects for executing each data page compression method.

[0093] According to the embodiments of the present application, the present application also provides an electronic device, a readable storage medium, and a computer program product.

[0094] Embodiment 4

[0095] Figure 4 It is a schematic structural diagram of an electronic device 410 that implements the data page compression method of the embodiments of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present application described and / or claimed herein.

[0096] As Figure 4As shown, the electronic device 410 includes at least one processor 411 and a memory communicatively connected to the at least one processor 411, such as a read-only memory (ROM) 412, a random access memory (RAM) 413, etc. The memory stores a computer program executable by the at least one processor. The processor 411 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 412 or the computer program loaded from the storage unit 418 into the random access memory (RAM) 413. In the RAM 413, various programs and data required for the operation of the electronic device 410 can also be stored. The processor 411, the ROM 412, and the RAM 413 are connected to each other via a bus 414. An input / output (I / O) interface 415 is also connected to the bus 414.

[0097] Multiple components in the electronic device 410 are connected to the I / O interface 415, including: an input unit 416, such as a keyboard, a mouse, etc.; an output unit 417, such as various types of displays, speakers, etc.; a storage unit 418, such as a magnetic disk, an optical disc, etc.; and a communication unit 419, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 419 allows the electronic device 410 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0098] The processor 411 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 411 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 411 executes the various methods and processes described above, such as the data page compression method.

[0099] In some embodiments, the data page compression method can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as the storage unit 418. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 410 via the ROM 412 and / or the communication unit 419. When the computer program is loaded into the RAM 413 and executed by the processor 411, one or more steps of the data page compression method described above can be executed. Alternatively, in other embodiments, the processor 411 can be configured for the data page compression method by any other appropriate means (e.g., by means of firmware).

[0100] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), systems on chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.

[0101] The computer programs for implementing the methods of this application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data page compression apparatus, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs can be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.

[0102] In the context of this application, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0103] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).

[0104] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.

[0105] A computing system can include a client and a server. The client and the server are generally far from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0106] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in this application can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of this application can be achieved, and this is not limited herein.

[0107] The above specific embodiments do not constitute a limitation on the protection scope of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application shall be included within the protection scope of this application.

Claims

1. A data page compression method, characterized in that: include: In case of identifying a data compression instruction of the target database, determining at least one data page to be compressed according to the data compression instruction; Merging data pages of the at least one data page to be compressed according to data characteristics of the at least one data page to be compressed to obtain a candidate data page; the data characteristics include at least one attribute name and a data value corresponding to the attribute name; Determine a data page difference data set according to the at least one data page to be compressed and the candidate data page; Merging the candidate data page and the data page difference data set to obtain a target data page; Determining data characteristics of the target data page, and determining a target compression algorithm from candidate compression algorithms according to the data characteristics of the target data page; The target data page is compressed using the target compression algorithm.

2. The method according to claim 1, characterized in that The step of merging data pages of the at least one data page to be compressed according to the data characteristics of the at least one data page to be compressed to obtain a candidate data page includes: Performing attribute name similarity analysis on the at least one data page to be compressed to determine candidate repeated attribute names of the at least one data page to be compressed; According to the candidate repeated attribute name, data pages are merged for the at least one data page to be compressed to obtain a candidate data page.

3. The method according to claim 2, characterized in that The step of merging the at least one data page to be compressed according to the candidate repeated attribute name to obtain a candidate data page includes: Performing data value similarity analysis on the data values ​​corresponding to the candidate repeated attribute name in the at least one data page to be compressed to obtain a target repeated attribute name and the data value corresponding to the target repeated attribute name; Merging the at least one data page to be compressed in order to obtain an intermediate data page; Based on the target repeated attribute name and the data value corresponding to the target repeated attribute name, redundant data in the intermediate data page is deleted to obtain a candidate data page.

4. The method according to claim 1, characterized in that After obtaining the candidate data page, the method further includes: summing the parameter lengths of the at least one data page to be compressed to obtain a candidate parameter length; Determine the current parameter length of the candidate data page, and compare the current parameter length with the candidate parameter length to obtain a parameter length comparison result; When the parameter length comparison result does not meet the parameter length condition, the data page compression is stopped and an abnormal alarm is fed back.

5. The method according to claim 1, characterized in that: The step of determining a data page difference data set according to the at least one data page to be compressed and the candidate data page comprises: For each data page to be compressed, performing similarity analysis between the data page to be compressed and the candidate data page to obtain data page difference data between the data page to be compressed and the candidate data page; After the similarity analysis of the at least one data page to be compressed is completed, the data page difference data of the at least one data page to be compressed is summarized to obtain a data page difference data set.

6. A data page compression device, characterized in that: include: A data page determination module, configured to determine at least one data page to be compressed according to the data compression instruction when a data compression instruction of a target database is identified; a data page merging module, configured to merge the at least one data page to be compressed according to data characteristics of the at least one data page to be compressed, so as to obtain a candidate data page; the data characteristics include at least one attribute name and a data value corresponding to the attribute name; a difference data determination module, configured to determine a data page difference data set according to the at least one data page to be compressed and the candidate data page; A data merging module, used for merging the candidate data page and the data page difference data set to obtain a target data page; A data page compression module, used to determine data characteristics of a target data page, and determine a target compression algorithm from candidate compression algorithms according to the data characteristics of the target data page; Use the target compression algorithm to compress the target data page.

7. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the data page compression method as described in any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the data page compression method as described in any one of claims 1 to 5 is implemented.

9. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the data page compression method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Data compression method and device, equipment and medium

    CN116204135A

  • Rapid data file merging method and system for time sequence database

    CN116561120A