Design data management method for a new type of server
By performing segmented processing of the design data sequence and setting an independent index table for each segment, the decoding process of the Hoffman encoding algorithm is optimized, and the problem of large matching workload in the traditional Hoffman encoding algorithm is solved, and the decoding efficiency and data processing speed are improved.
Patent Information
- Application Number
- CN202510559346.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-04-30
AI Technical Summary
The traditional Hoffman encoding algorithm has a large matching workload during the decoding process, resulting in low decoding efficiency, and the existing technology has failed to effectively improve the decoding efficiency.
By segmenting the design data sequence and setting an independent index table for each segment, the number of encodings in each index table is reduced, the segment control function is used to perform segmentation control of the design data, and multiple local index tables and overall index tables are set up to optimize the decoding process.
Improve decoding efficiency, reduce the number of matches and the amount of duplicate data storage, reduce unnecessary storage waste, and improve data processing speed.
Smart Images

Figure CN120074540B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing. More specifically, the present invention relates to a design data management method for a new type of server. Background Art
[0002] The design data of the new type of server contains a large number of configuration files, log files, virtual machine images, container data, etc. These data have a large volume and a high redundancy, and the storage cost required for directly storing these data is relatively large. Therefore, in order to reduce the storage cost, it is necessary to compress the design data of the new type of server.
[0003] As a commonly used coding compression algorithm, the Huffman coding compression algorithm has a good compression effect. The decoding process of this algorithm includes: first, obtaining the matching code by matching the code in the coding sequence with the code in the index table, and then performing decoding processing according to the index relationship between the matching code and the data in the index table. The traditional Huffman coding algorithm places all data and the corresponding codes in one index table. Therefore, there will be a large number of codes in one index table, and a large amount of matching work is required to locate the corresponding matching code among a large number of codes, which will greatly reduce the decoding speed. How to reduce the matching workload and thus improve the decoding efficiency has become the research focus of this solution.
[0004] The patent document with the authorization announcement number CN117811588B discloses a log compression access method, system, device, and readable storage medium based on Huffman coding and LZ77. The method in this patent document only compresses the template code using the Huffman coding algorithm and does not involve the content of how to improve the decoding efficiency of the Huffman coding algorithm. Therefore, the method in this patent document cannot solve the technical problems in this solution. Summary of the Invention
[0005] To solve the problem of how to reduce the matching workload and thus improve the decoding efficiency, the present invention proposes a design data management method for a new type of server, which includes the following steps:
[0006] Obtain the sequence composed of all design data of the new type of server and denote it as the design data sequence;
[0007] Use the Huffman coding algorithm to encode the data in the design data sequence to obtain a coding sequence;
[0008] Set a segmentation control function , divide the design data sequence into several feasible data segments, place the index relationship between the design data and the code in a feasible data segment in an independent index table to obtain a feasible local index table, and place the index relationship between all design data and the code in the design data sequence in an index table to obtain an overall index table. denotes the data set composed of the data in the \(i\)-th feasible data segment, , respectively denote the data sets composed of the data in the left adjacent feasible data segment and the right adjacent feasible data segment of the \(i\)-th feasible data segment, denotes the intersection symbol, denotes the number of feasible data segments, denotes the number of matches required to locate the index relationship between all design data and the encoding using the feasible local index table, denotes the number of matches required to locate the index relationship between all design data and the encoding using the overall index table;
[0009] The design data sequence is segmented and controlled by using a segmented control function to obtain a number of target data segments; the target local index table is set by using the target data segments to implement the decoding process.
[0010] In the present invention, by setting multiple index tables, the number of encodings in each index table is small, thereby reducing the number of matches when locating and matching the encoding, and improving the decoding efficiency; further, by setting an independent index table for each segment of the design sequence, when decoding the encoding corresponding to each segment, only search and match in the index table corresponding to that segment, effectively improving the decoding efficiency; further, when performing segmented control, the intersection data volume between segments and adjacent segments is considered, so that the intersection data between segments is small, effectively reducing the storage volume of duplicate data in the index table and reducing unnecessary storage waste; further, when performing segmented control, the number of data matches in the decoding process is considered, so that the number of data matches is small, effectively improving the decoding efficiency.
[0011] Preferably, the splitting of the design data sequence into a number of feasible data segments includes:
[0012] Obtain the number of segments;
[0013] Randomly select \(M - 1\) segment positions in the design data sequence, and split the design data sequence at the segment positions to obtain a number of data segments, denoted as feasible data segments, where \(M\) represents the number of segments.
[0014] In the present invention, the design sequence is segmented by randomly selecting segment positions, so as to obtain segments more comprehensively, providing a basis for accurately obtaining the target segments subsequently.
[0015] Preferably, the obtaining of the number of segments includes:
[0016] Analyze the data in the design data sequence by using the elbow method to obtain the number of segments.
[0017] The present invention obtains the number of segments through the elbow method, so as to more accurately grasp the types of data in the design data sequence, providing a basis for subsequent implementation of segment differentiation.
[0018] Preferably, the feasible local index table further includes an index table positioning flag value, and the index table positioning flag value is the starting position of the encoding of the first design data in the corresponding feasible data segment of the feasible local index table in the encoding sequence.
[0019] By setting the index table positioning flag value, the present invention can more quickly locate the encoding area corresponding to each index table, providing a basis for fast decoding.
[0020] Preferably, the number of matching times required to locate the index relationship between all design data and encoding by using the feasible local index table includes:
[0021] Locate the starting encoding position corresponding to the feasible local index table in the encoding sequence according to the index table positioning flag value in the feasible local index table; take the encoding between the starting decoding position of the feasible local index table and the starting encoding position of the next feasible local index table as the analysis encoding of the feasible local index table; perform matching processing on the analysis encoding and the encoding in the feasible local index table in turn until the matching encoding of the analysis encoding is located, obtain the number of matching times required to locate the matching encoding, and take the cumulative sum of the matching times of all analysis encodings as the local matching times of the feasible local index table; take the cumulative sum of the local matching times of all feasible local index tables as the number of matching times required to locate the index relationship between all design data and encoding by using the feasible local index table.
[0022] Preferably, the number of matching times required to locate the index relationship between all design data and encoding by using the overall index table includes:
[0023] Record the encoding in the encoding sequence as the research encoding, perform matching processing on the research encoding and the encoding in the overall index table in turn until the matching encoding of the research encoding is located, obtain the number of matching times required to locate the matching encoding, and take the cumulative sum of the matching times of all research encodings as the number of matching times required to locate the index relationship between all design data and encoding by using the overall index table.
[0024] Preferably, the process of using the segment control function to perform segment control on the design data sequence to obtain a number of target data segments includes:
[0025] Take the feasible data segment obtained when the segment control function reaches the maximum value as the target data segment.
[0026] Preferably, the process of using the target data segment to set the target local index table includes:
[0027] Use the feasible local index table obtained from the target data segment as the target local index table.
[0028] The target local index table obtained by the present invention in this way can not only improve the decoding efficiency, but also reduce the storage amount of duplicate data.
[0029] Preferably, the implementation of decoding processing includes:
[0030] Based on the index relationship between the encoding and the design data in the target local index table, obtain the design data corresponding to each encoding in the encoding sequence and perform decoding processing.
[0031] Preferably, the encoding of the data in the design data sequence using the Huffman coding algorithm to obtain the encoding sequence includes:
[0032] Statistically analyze the data in the design data sequence to obtain the occurrence frequency of the design data with each value, and use the Huffman coding algorithm to encode the data in the design data sequence according to the occurrence frequency to obtain the encoding sequence and the index relationship between the design data and the encoding.
[0033] The present invention has the following beneficial effects:
[0034] By setting multiple index tables in the present invention, the number of encodings in each index table is reduced, thereby reducing the number of matching times when locating and matching encodings and improving the decoding efficiency;
[0035] Furthermore, by setting an independent index table for each segment of the design sequence, when decoding the encoding corresponding to each segment, only search and match in the index table corresponding to that segment, effectively improving the decoding efficiency;
[0036] Furthermore, when performing segment control, the amount of intersection data between segments and adjacent segments is considered, so that the intersection data between segments is less, effectively reducing the storage amount of duplicate data in the index table and reducing unnecessary storage waste;
[0037] Furthermore, when performing segment control, the number of data matching times in the decoding process is considered, so that the number of data matching times is less, effectively improving the decoding efficiency. Description of the Drawings
[0038] Figure 1 is the step flow chart of a design data management method for a new type of server according to an embodiment of the present invention. Detailed Embodiments
[0039] Next, in combination with the accompanying drawings in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present invention.
[0040] The following will describe in detail the specific implementation manners of the present invention in combination with the accompanying drawings.
[0041] Please refer to Figure 1 , which shows a flowchart of the steps of a design data management method for a new type of server provided by an embodiment of the present invention. The method includes the following steps:
[0042] S1: Obtain a sequence composed of all the design data of the new type of server, denoted as the design data sequence.
[0043] Specifically, obtain all the design data of the new type of server, and convert the text or symbols in the design data into numbers through ASCALL conversion. The sequence composed of the converted design data is denoted as the design data sequence.
[0044] S2: Use the Huffman coding algorithm to perform coding processing on the data in the design data sequence to obtain a coding sequence.
[0045] Preferably, as an example, using the Huffman coding algorithm to perform coding processing on the data in the design data sequence to obtain a coding sequence includes:
[0046] Statistical analysis is performed on the data in the design data sequence to obtain the occurrence frequency of each value of the design data. According to the occurrence frequency, the Huffman coding algorithm is used to perform coding processing on the data in the design data sequence to obtain a coding sequence and the index relationship between the design data and the coding.
[0047] S3: Set a segmentation control function.
[0048] It should be noted that there are many codes in the index table, resulting in a large matching workload. Therefore, the matching workload can be reduced by splitting one index table into multiple index tables to reduce the number of codes in each index table. If the index table is simply split into multiple index tables, the above problem cannot be solved because simple splitting cannot determine which index tables the codes in the coding sequence correspond to, so it is impossible to perform matching searches in a single index table, and thus the matching workload cannot be reduced. Therefore, to reduce the matching workload, the codes in the coding sequence need to be able to locate the corresponding index tables.
[0049] It should be further noted that in order for the encoding to locate the corresponding index table, the design data sequence can be segmented so that one segment corresponds to one index table. When decoding the design data within a segment, only a matching search needs to be performed in its corresponding index table. In order to prevent the index tables corresponding to other segments from being used during the decoding of each segment, the index table needs to contain the correspondence between all the design data and the encoding within that segment. Since there may be the same design data between segments, this will result in duplicate design data and corresponding encodings in the index tables of different segments, which will increase the storage capacity. At the same time, the data in the design sequence has local similarity. For example, in the log data of the design sequence, the user activity volume is recorded. The user activity volume is relatively small during working hours and relatively large during off-duty hours. Therefore, the data values within a local area of the design sequence are similar, and the value differences between different local areas are relatively large. Thus, the design data sequence can achieve differentiation between segments.
[0050] Preferably, as an example, a segmentation control function is set, including:
[0051]
[0052] Among them, the design data sequence is segmented into several feasible data segments. The index relationship between the design data and the encoding in a feasible data segment is placed in an independent index table to obtain a feasible local index table. The index relationship between all the design data and the encoding in the design data sequence is placed in an index table to obtain an overall index table. represents the data set composed of the data in the i-th feasible data segment. represents the data set composed of the data in the left adjacent feasible data segment of the i-th feasible data segment. represents the data set composed of the data in the right adjacent feasible data segment of the i-th feasible data segment. represents the intersection symbol. represents the number of feasible data segments. represents the number of matching times required to locate all the index relationships between the design data and the encoding using the feasible local index table. represents the number of matching times required to locate all the index relationships between the design data and the encoding using the overall index table. represents the segmentation control function.
[0053] It can be understood that reflects the data intersection between the design data in each feasible data segment and the data in the adjacent feasible data segments on both sides. The smaller this value is, the smaller the number of duplicate data between the feasible data segment and the adjacent feasible data segments on both sides, and the less duplicate storage data exists in the index tables corresponding to different segments. Therefore, the feasible data segments obtained by this segmentation method can be used to set the index table. It reflects the decrease in the matching quantity. The larger this value is, the greater the decrease in the matching quantity caused by the feasible data segments obtained through this segmentation method. Therefore, the index table can be set with the feasible data segments obtained through this segmentation method.
[0054] It should be added that the feasible local index table also contains an index table positioning flag value, and the index table positioning flag value is the starting position of the encoding of the first design data in the feasible data segment corresponding to the feasible local index table in the encoding sequence.
[0055] The above embodiments involve feasible data segments, the number of matching times required to locate the index relationship between all design data and encodings using the feasible local index table, and the number of matching times required to locate the index relationship between all design data and encodings using the overall index table. Next, the determination methods for feasible data segments, the number of matching times required to locate the index relationship between all design data and encodings using the feasible local index table, and the number of matching times required to locate the index relationship between all design data and encodings using the overall index table will be described.
[0056] First, the method for obtaining feasible data segments will be introduced.
[0057] Preferably, as an example, the method for obtaining feasible data segments includes:
[0058] Analyze the data in the design data sequence using the elbow method to obtain the number of segments.
[0059] Randomly select M - 1 segmentation positions in the design data sequence, and split the design data sequence at the segmentation positions to obtain several data segments, denoted as feasible data segments, where M represents the number of segments.
[0060] Then, the number of matching times required to locate the index relationship between all design data and encodings using the feasible local index table will be introduced.
[0061] Preferably, as an example, the number of matching times required to locate the index relationship between all design data and encodings using the feasible local index table includes:
[0062] Locate the starting coding position corresponding to the feasible local index table in the coding sequence according to the index table positioning flag value in the feasible local index table; take the coding between the starting decoding position of the feasible local index table and the starting coding position of the next feasible local index table as the analysis coding of the feasible local index table; match the analysis coding with the coding in the feasible local index table in turn until the matching coding of the analysis coding is located, obtain the number of matches required to locate the matching coding, and take the cumulative sum of the number of matches of all analysis codings as the local matching number of the feasible local index table; take the cumulative sum of the local matching numbers of all feasible local index tables as the number of matches required to locate the index relationship between all design data and coding using the feasible local index table.
[0063] Finally, introduce the number of matches required to locate the index relationship between all design data and coding using the overall index table.
[0064] Preferably, as an example, the number of matches required to locate the index relationship between all design data and coding using the overall index table includes:
[0065] Record the coding in the coding sequence as the research coding, match the research coding with the coding in the overall index table in turn until the matching coding of the research coding is located, obtain the number of matches required to locate the matching coding, and take the cumulative sum of the number of matches of all research codings as the number of matches required to locate the index relationship between all design data and coding using the overall index table.
[0066] S4: Use the segmented control function to segment the design data sequence to obtain several target data segments; use the target data segments to set up a target local index table to implement the decoding process.
[0067] S40: Use the segmented control function to segment the design data sequence to obtain several target data segments.
[0068] Preferably, as an example, using the segmented control function to segment the design data sequence to obtain several target data segments includes:
[0069] Take the feasible data segment obtained when the segmented control function takes the maximum value as the target data segment.
[0070] S41: Use the target data segments to set up a target local index table.
[0071] Preferably, as an example, using the target data segments to set up a target local index table includes:
[0072] Take the feasible local index table obtained from the target data segments as the target local index table.
[0073] S42: To implement the decoding process.
[0074] Preferably, as an example, to implement the decoding process, it includes:
[0075] Locate the starting coding position corresponding to the target local index table in the coding sequence according to the index table positioning flag value in the target local index table; Take the coding between the starting decoding position of the target local index table and the starting coding position of the next target local index table as the analysis coding of the target local index table.
[0076] Perform a matching process on the analysis coding and the codings in the target local index table in sequence until the matching coding with the analysis coding is located, and obtain the design data corresponding to the matching coding according to the index relationship between the matching coding in the target local index table and the design data, thus completing the decoding process.
[0077] So far, this embodiment is completed.
[0078] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A design data management method for a new type of server, characterized in that, Including: Obtain the sequence composed of all design data of the new server, denoted as the design data sequence; Use the Huffman coding algorithm to encode the data in the design data sequence to obtain an encoded sequence; Set the segmentation control function , split the design data sequence into several feasible data segments, place the index relationship between the design data and the code in a feasible data segment in an independent index table to obtain a feasible local index table, and place the index relationship between all the design data and the code in the design data sequence in an index table to obtain an overall index table. Denote the data set composed of the data in the i-th feasible data segment. 、 Denote the data sets composed of the data in the left adjacent feasible data segment and the right adjacent feasible data segment of the i-th feasible data segment respectively. Denote the intersection symbol. Denote the number of feasible data segments. Denote the number of matching times required to locate all the index relationships between the design data and the code using the feasible local index table. Denote the number of matching times required to locate all the index relationships between the design data and the code using the overall index table; Use a piecewise control function to perform piecewise control on the design data sequence to obtain several target data segments; Use the target data segments to set up a target local index table to achieve decoding processing.
2. The design data management method of a new type of server according to claim 1, characterized in that, The splitting of the design data sequence into several feasible data segments includes: Obtain the number of segments; Randomly select M - 1 segment positions in the design data sequence, and split the design data sequence at the segment positions to obtain several data segments, denoted as feasible data segments, where M represents the number of segments.
3. The design data management method of a new type of server according to claim 2, characterized in that, The obtaining of the number of segments includes: Use the elbow method to analyze the data in the design data sequence to obtain the number of segments.
4. A design data management method for a new type of server according to claim 1, characterized in that, The feasible local index table also contains an index table positioning flag value, and the index table positioning flag value is the starting position of the encoding of the first design data in the feasible data segment corresponding to the feasible local index table in the encoded sequence.
5. The design data management method of a new type of server according to claim 4, characterized in that, The obtaining of the number of matching times required to locate the index relationship between all design data and the encoding using the feasible local index table includes: Locate the starting encoding position corresponding to the feasible local index table in the encoded sequence according to the index table positioning flag value in the feasible local index table; take the encoding between the starting decoding position of the feasible local index table and the starting encoding position of the next feasible local index table as the analysis encoding of the feasible local index table; perform matching processing on the analysis encoding and the encoding in the feasible local index table in turn until the matching encoding with the analysis encoding is located, obtain the number of matching times required to locate the matching encoding, take the cumulative sum of the number of matching times of all analysis encodings as the local matching times of the feasible local index table; take the cumulative sum of the local matching times of all feasible local index tables as the number of matching times required to locate the index relationship between all design data and the encoding using the feasible local index table.
6. The design data management method of a new type of server according to claim 1, characterized in that, The obtaining of the number of matching times required to locate the index relationship between all design data and the encoding using the overall index table includes: Denote the encoding in the encoded sequence as the research encoding, and perform matching processing on the research encoding and the encoding in the overall index table in turn until the matching encoding with the research encoding is located, obtain the number of matching times required to locate the matching encoding, take the cumulative sum of the number of matching times of all research encodings as the number of matching times required to locate the index relationship between all design data and the encoding using the overall index table.
7. A design data management method for a new type of server according to claim 1, characterized in that The using of the piecewise control function to perform piecewise control on the design data sequence to obtain several target data segments includes: Take the feasible data segment obtained when the piecewise control function reaches the maximum value as the target data segment.
8. The design data management method of a new type of server according to claim 1, characterized in that, The using of the target data segments to set up a target local index table includes: Take the feasible local index table obtained from the target data segments as the target local index table.
9. The design data management method of a new type of server according to claim 1, characterized in that, The achieving of decoding processing includes: Based on the index relationship between the encoding and the design data in the target local index table, obtain the design data corresponding to each encoding in the encoded sequence and perform decoding processing.
10. The design data management method of a new type of server according to claim 1, characterized in that, The using of the Huffman coding algorithm to encode the data in the design data sequence to obtain an encoded sequence includes: Statistical analysis is performed on the data in the design data sequence to obtain the occurrence frequency of the design data for each value. Based on the occurrence frequency, the Huffman coding algorithm is used to encode the data in the design data sequence to obtain the encoded sequence and the index relationship between the design data and the encoding.
Citation Information
Patent Citations
A log compression access method, system, device and readable storage medium based on Huffman coding and LZ77
CN117811588B
Immediate data compressed encoding method and system
CN107463355A
Data query method and device
CN113448957A