Data storage management system for smart pension platform
By filtering and dividing data intervals in the smart elderly care platform and using specific encodings for data compression, the problem of excessive load on the data storage system is solved, and efficient data compression and storage management are achieved.
Patent Information
- Application Number
- CN202510583828.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-08-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, when facing a large amount of user data, the data storage system of the smart elderly care platform fails to accurately obtain the number of data during the compression process, resulting in poor compression effect and increasing the load of the storage system.
By obtaining the timing data of user traffic of elderly care platform, filtering valid data segments and dividing numerical intervals, judging the reference numerical intervals based on the number of data and distribution, Holman coding and run coding are used to compress data within the interval to ensure the optimal number of compressed and data representativeness.
Improve data compression efficiency, optimize storage system load, reduce storage and transmission costs, and ensure data accuracy and completeness.
Smart Images

Figure CN120455554A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data compression management, and in particular to a data storage management system for a smart elderly care platform. Background Art
[0002] With the acceleration of my country's population growth and changes in its age structure, the aging trend is becoming increasingly apparent. Traditional elderly care service models are unable to meet current elderly care needs. A data platform formed by the integration of smart homes, smart mobile devices, and IoT technologies can improve the quality of elderly care services, meet the diverse needs of the elderly, and provide them with a better elderly care experience.
[0003] Elderly users are more concerned about their health. Health feedback is closely related to changes in various types of data. Data type and data storage methods are crucial components of smart elderly care platforms. To ensure stable platform operation, when there are many users, direct storage can overload the storage system due to the large amount of data to be stored. Therefore, data storage methods need to be optimized.
[0004] In the existing technology, considering that the numerical values of some data in the time series data to be stored are equal, Huffman coding is used to compress the compressed data, which can have a better compression effect on letters containing many identical numbers; at the same time, due to the complex user situation in the elderly care platform, the numerical values of some types of data are relatively close but not equal, resulting in poor compression effect on the compressed data, increasing the load on the storage system. Summary of the Invention
[0005] In order to solve the technical problem that the accurate number of data in the compression process is not obtained, resulting in poor compression effect and heavy storage system load, the purpose of the present invention is to provide a data storage management system for a smart elderly care platform. The technical solutions adopted are as follows:
[0006] The present invention proposes a data storage and management system for a smart elderly care platform, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:
[0007] Obtaining data information from the elderly care platform, wherein the data information from the elderly care platform includes time series data on user traffic on the elderly care user platform;
[0008] A plurality of valid platform user traffic data segments are screened out from the user traffic time series data of the elderly care user platform; a plurality of value intervals are included within the value range of the valid platform user traffic data segment, and the traffic data content corresponding to each value interval is obtained according to the number of data in each valid platform user traffic data segment in each value interval; a reference value interval is determined according to the traffic data content corresponding to each value interval; and a plurality of intervals to be compressed are obtained by dividing the valid platform user traffic data segment within the value range according to the reference value interval;
[0009] The number of data in each valid platform user traffic data segment within each interval to be compressed is used as the number of data to be compressed, and the compression priority of the number of data to be compressed is obtained based on the difference between the number of corresponding data in each valid platform user traffic data segment within each interval to be compressed and the number of data to be compressed, as well as the data distribution within each interval to be compressed; the optimal compression number of each valid platform user traffic data segment within each interval to be compressed is obtained based on the compression priority of each number of data to be compressed;
[0010] Compressing the data in each interval to be compressed sequentially based on the flow data content of each interval to be compressed, obtaining a spare data interval for each interval to be compressed; adding the data in the spare data interval to the interval to be compressed based on the optimal compression number of each interval to be compressed, compressing the user flow time series data of the elderly care user platform, and obtaining compressed flow data;
[0011] The compressed flow data is stored.
[0012] Furthermore, the method for obtaining the flow data content includes:
[0013] Calculate the average number of data in all valid platform user traffic data segments in each numerical interval to obtain the traffic data content corresponding to each numerical interval.
[0014] Furthermore, the method for obtaining the reference value interval includes:
[0015] The reference value interval is obtained by selecting the value interval with the highest content of the flow data among all the value intervals.
[0016] Furthermore, the method for obtaining the interval to be compressed includes:
[0017] According to the width of the reference numerical interval, the numerical range of the effective platform user traffic data segment is evenly divided with the reference numerical interval as the center to obtain multiple intervals to be compressed; there is no intersection between adjacent intervals to be compressed.
[0018] Furthermore, the method for obtaining the compression priority includes:
[0019] The number of data in the corresponding data number that is greater than the number of the to-be-selected compressed data is used as the number of uncompressed data; the number of data in the corresponding data number that is less than the number of the to-be-selected compressed data is used as the number of borrowed data;
[0020] The compression priority is obtained according to the compression priority acquisition formula. The compression priority acquisition formula is:
[0021] Among them, E D Indicates the compression priority of selecting D pieces of data to be compressed from each valid platform user traffic data segment within each interval to be compressed; S D H represents the number of uncompressed data when D number of compressed data are selected for each valid platform user traffic data segment in each compression interval; D represents the number of borrowed data when D pieces of to-be-selected compressed data are selected for compression in each valid platform user traffic data segment within each interval to be compressed; r represents the numerical category when D pieces of to-be-selected compressed data are selected for compression in each valid platform user traffic data segment within each interval to be compressed; Y D,t Indicates the frequency ranking of the t-th value when D candidate compression data are selected for compression in each valid platform user traffic data segment; L D,t It represents the number of t-th values when D pieces of data to be compressed are selected for compression in each valid platform user traffic data segment within each interval to be compressed; sigmod() represents the logistic function; exp() represents the exponential function with a natural constant as the base.
[0022] Furthermore, the method for obtaining the optimal compression number includes:
[0023] The data with the highest compression priority among all the numbers of data to be compressed is selected to obtain the optimal compression number for each interval to be compressed.
[0024] Furthermore, the sequentially compressing the data in the to-be-compressed interval includes:
[0025] The flow data content of each interval to be compressed is compressed in descending order.
[0026] Furthermore, the method for obtaining the spare data interval includes:
[0027] The interval to be compressed with the lowest flow data content is selected as the spare data interval.
[0028] Furthermore, the method for obtaining compressed flow data includes:
[0029] The compressed flow data includes compressed valid flow data, directly stored data and compressed invalid flow data;
[0030] If the number of data in each valid platform user traffic data segment in each interval to be compressed is less than the optimal compression number, the data in the spare data interval is added to the interval to be compressed to obtain the compressed data in each interval to be compressed that meets the optimal compression number, and Holman coding is used to compress the data to obtain compressed valid traffic data;
[0031] Obtaining a data set in which each valid platform user traffic data segment in each interval to be compressed is greater than the optimal compression number, obtaining uncompressed data in each interval to be compressed, marking the interval, and storing the data directly;
[0032] Obtain invalid platform user traffic data segments in the elderly care user platform user traffic time series data, compress them using run-length encoding, and obtain compressed invalid traffic data.
[0033] Furthermore, the method for obtaining the numerical interval of the effective platform user traffic data segment includes:
[0034] The numerical interval is (R-1, R+1], where R is any integer in the numerical range of the valid platform user traffic data segment; all integers in the numerical range of the valid platform user traffic data segment are traversed to obtain all numerical intervals.
[0035] The present invention has the following beneficial effects:
[0036] In order to reduce the interference of other irrelevant data and improve the accuracy of subsequent analysis, the present invention includes multiple numerical intervals within the numerical range of the effective platform user flow data segment, and obtains the flow data content corresponding to each numerical interval according to the number of data in each effective platform user flow data segment in each numerical interval. By evaluating different interval ranges, it is possible to understand which flow rate ranges are more critical or frequent, providing a reference for subsequent compression; according to the flow data content corresponding to the center point of each preset data set, a reference numerical interval is judged to obtain the best interval for data compression; according to the reference numerical interval, the numerical range of the effective platform user flow data segment is divided to obtain multiple intervals to be compressed; the distribution of data in each key flow rate range is understood, and the number of data of each effective platform user flow data segment in each interval to be compressed is used as the number of data to be compressed; according to the number of corresponding data in each effective platform user flow data segment in each interval to be compressed, the reference numerical interval is judged to obtain the best interval for data compression; according to the reference numerical interval, the numerical range of the effective platform user flow data segment is divided to obtain multiple intervals to be compressed; according to the distribution of data in each key flow rate range, the number of data of each effective platform user flow data segment in each interval to be compressed is used as the number of data to be compressed; The difference between the number of data to be compressed and the number of data to be compressed, as well as the data distribution in each interval to be compressed, is used to obtain the compression priority of the data to be compressed, and the compression degree of each data to be compressed for the interval to be compressed is judged; the optimal compression number of each valid platform user traffic data segment in each interval to be compressed is obtained according to the compression priority of each data to be compressed, ensuring that the selected compression number can both reduce the amount of data and maintain the representativeness of the data; in order to retain more valid information, the data in the interval to be compressed is compressed in turn according to the traffic data content of each interval to be compressed, and the spare data interval of each interval to be compressed is obtained to ensure that there is enough data when the interval to be compressed is compressed, thereby enhancing the compression effect; the data in the spare data interval is added to the interval to be compressed according to the optimal compression number of each interval to be compressed, and the user traffic time series data of the elderly care user platform is compressed to obtain compressed traffic data, thereby reducing storage and transmission costs; and storage is performed. The present invention improves the efficiency of data compression and optimizes the storage system load by obtaining the accurate number of data in the compression process. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0038] Figure 1 This is a flow chart of an implementation method of a data storage management system for a smart elderly care platform provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0039] To further illustrate the technical means and effects of the present invention to achieve the intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail the specific implementation, structure, features, and effects of a data storage and management system for a smart elderly care platform proposed by the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable form.
[0040] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0041] The following describes in detail a specific solution of a data storage and management system for a smart elderly care platform provided by the present invention with reference to the accompanying drawings.
[0042] See also Figure 1 , which shows a flow chart of an implementation method of a data storage management system for a smart elderly care platform provided by one embodiment of the present invention. The method specifically includes:
[0043] Step S1: Obtain pension platform data information.
[0044] In an embodiment of the present invention, in order to ensure the normal operation of the elderly care platform, the user access status of the smart elderly care platform at different times is monitored, that is, the user traffic time series data of the elderly care user platform is obtained.
[0045] It should be noted that, in one embodiment of the present invention, the number of users accessing the smart elderly care platform is measured and captured every 15 seconds; in other embodiments of the present invention, the size of the interval can be set according to the specific situation, which is not limited or elaborated here.
[0046] Step S2: Filter out multiple valid platform user traffic data segments from the elderly care user platform user traffic time series data; include multiple numerical intervals within the numerical range of the valid platform user traffic data segments, and obtain the traffic data content corresponding to each numerical interval according to the number of data in each valid platform user traffic data segment in each numerical interval; determine a reference numerical interval according to the traffic data content corresponding to each numerical interval; divide the valid platform user traffic data segments within the numerical range according to the reference numerical interval to obtain multiple intervals to be compressed.
[0047] Due to network transmission delays and network fluctuations, some invalid data appear continuously and alternately in the user traffic time series data of the elderly care user platform. Moreover, for valid data segments that are practical and representative, we can understand the stability and consistency of the user traffic of the elderly care user platform and deal with abnormal situations in operation in a timely manner.
[0048] Because there are relatively few data with equal values but relatively many similar data between the effective platform user traffic data segments, most of the data are in the same numerical range. In order to avoid affecting the compression effect, the data content within the point range of different data sets is analyzed to analyze certain characteristics or patterns of the elderly care user platform user traffic; the range containing similar data is analyzed, and the numerical range of the effective platform user traffic data segment contains multiple numerical intervals. According to the number of data in each effective platform user traffic data segment in each numerical interval, the traffic data content corresponding to each numerical interval is obtained.
[0049] Preferably, in one embodiment of the present invention, the method for obtaining the numerical interval of the effective platform user traffic data segment includes:
[0050] The numerical interval is (R-1, R+1], where R is any integer in the numerical range of the valid platform user traffic data segment; all integers in the numerical range of the valid platform user traffic data segment are traversed to obtain all numerical intervals.
[0051] It should be noted that, in one embodiment of the present invention, when the numerical range of the effective platform user traffic data segment is (0, U], the integer range within the numerical range of the effective platform user traffic data segment is 1≤R≤u, and u is the maximum integer value in (0, U]; as an example, when u=8, multiple numerical intervals are obtained, namely (0, 2], (1, 3], (2, 4], (3, 5], (4, 6], (5, 7], (6, 8], and (7, 9]).
[0052] Preferably, in one embodiment of the present invention, the method for obtaining traffic data content includes:
[0053] Calculate the average number of data in all valid platform user traffic data segments in each numerical interval to obtain the traffic data content corresponding to each numerical interval. In one embodiment of the present invention, the formula for traffic data content is expressed as:
[0054]
[0055] Among them, G R represents the traffic data content corresponding to the numerical interval (R-1, R+1]; E represents the number of valid platform user traffic data segments in the elderly care user platform user traffic time series data; Y k,R Represents the k-th valid platform user traffic data segment Y k The number of data in the numerical interval (R-1, R+1].
[0056] In the importance formula, the more data the effective platform user traffic data segment contains in the numerical interval (R-1, R+1], The bigger the G R The larger the value of is, the greater the flow data content is, indicating that the data contained in the numerical interval (R-1, R+1] is of greater importance; on the contrary, G R The value of is small, and the flow data content is small, indicating that the importance of the data contained in the numerical interval (R-1, R+1] is poor.
[0057] By identifying numerical intervals with high traffic data content, we can more accurately compress data and remove redundant information while retaining key information for analyzing user traffic on the elderly care platform. A reference numerical interval is determined based on the traffic data content corresponding to each numerical interval.
[0058] Preferably, in one embodiment of the present invention, the method for obtaining the reference value interval includes:
[0059] The reference value interval is obtained by selecting the value interval with the highest corresponding flow data content among all the value intervals.
[0060] The reference numerical value interval is a given standard or reference value that can be used to identify and define the basic range of data; by comparing the numerical value of the effective platform user traffic data segment with the reference numerical value interval, it can be determined how the data is divided; through reasonable division, the data storage risk can be reduced; according to the reference numerical value interval, the effective platform user traffic data segment is divided within the numerical range to obtain multiple intervals to be compressed.
[0061] Preferably, in one embodiment of the present invention, the method for obtaining the interval to be compressed includes:
[0062] According to the width of the reference numerical interval, the numerical range of the effective platform user traffic data segment is evenly divided with the reference numerical interval as the center to obtain multiple intervals to be compressed; there is no intersection between adjacent intervals to be compressed.
[0063] It should be noted that, in one embodiment of the present invention, the numerical range of the effective platform user traffic data segment is (0, 8], and multiple numerical intervals are obtained, namely (0, 2], (1, 3], (2, 4], (3, 5], (4, 6], (5, 7], (6, 8], and (7, 9]; if (4, 6] is the numerical interval with the highest traffic data content, the interval to be compressed obtained within the numerical range is (0, 2], (2, 4], (4, 6], and (6, 8]; if (5, 7] is the numerical interval with the highest traffic data content, (-1, 1], (1, 3], (3, 5], (5, 7], and (7, 9] are obtained by evenly dividing; however, the interval to be compressed obtained within the numerical range is (0, 1], (1, 3], (3, 5], (5, 7], and (7, 8]; in other embodiments of the present invention, the interval to be compressed can be set according to the specific situation, which is not limited or elaborated here.
[0064] It should be noted that in other embodiments of the present invention, positive and negative correlations and normalization methods may also be constructed through other basic mathematical operations. The specific means are technical means well known to those skilled in the art and will not be elaborated here.
[0065] Step S3: The number of data in each valid platform user traffic data segment in each interval to be compressed is used as the number of data to be compressed, and the compression priority of the number of data to be compressed is obtained according to the difference distribution between the corresponding number of data in each valid platform user traffic data segment in each interval to be compressed and the number of data to be compressed, as well as the data distribution in each interval to be compressed; the optimal compression number of each valid platform user traffic data segment in each interval to be compressed is obtained according to the compression priority of each number of data to be compressed.
[0066] The user traffic of the elderly care user platform has strong similarity within the same time period, so the number of compressed data for different valid platform user traffic data segments in the same integer interval is consistent; in order to obtain better compression effect and avoid retaining too much data, the number of data in the valid platform user traffic data segment is discussed, and the number of data in each valid platform user traffic data segment in each interval to be compressed is used as the number of data to be compressed, and the range of the data number is [Z, M]; by comparing the difference between the corresponding number of data in each valid platform user traffic data segment and the number of data to be compressed, the appropriate number of data is obtained, while retaining the necessary data information and avoiding unnecessary data transmission and storage; when the data in the interval is highly concentrated or repeated, it means that a specific compression algorithm is more suitable, which is conducive to data compression; according to the difference between the corresponding number of data in each valid platform user traffic data segment in each interval to be compressed and the number of data to be compressed, as well as the data distribution in each interval to be compressed, the compression priority of the number of data to be compressed is obtained.
[0067] Preferably, in one embodiment of the present invention, the method for obtaining the compression priority includes:
[0068] The number of data in the corresponding data that is greater than the number of data to be compressed is regarded as the number of uncompressed data. When there is a large amount of uncompressed data, it means that these data cannot be compressed by an effective compression algorithm, which increases the amount of computation and storage overhead of the compression process. The more uncompressed data there is, the less dense or regular the data distribution is, which further reduces the compression ratio and compression efficiency. The number of data in the corresponding data that is less than the number of data to be compressed is regarded as the number of borrowed data. When there is a large amount of borrowed data, additional storage and processing are required, which increases the amount of computation and storage overhead of the compression process. Frequent borrowing of data requires more data to be migrated to adjacent integer intervals, resulting in a lower compression ratio. The compression priority is obtained according to the compression priority acquisition formula. The compression priority acquisition formula is:
[0069]
[0070] Among them, E D Indicates the compression priority of selecting D pieces of data to be compressed from each valid platform user traffic data segment within each interval to be compressed, Z≤D≤M; S D H represents the number of uncompressed data when D number of compressed data are selected for each valid platform user traffic data segment in each compression interval; D represents the number of borrowed data when D pieces of data to be compressed are selected for compression for each valid platform user traffic data segment within each interval to be compressed; r represents the numerical category when D pieces of data to be compressed are selected for compression for each valid platform user traffic data segment within each interval to be compressed; Y D,t Indicates the frequency ranking of the t-th value when D candidate compression data are selected for compression in each valid platform user traffic data segment; L D,t It represents the number of t-th values when D pieces of data to be compressed are selected for compression in each valid platform user traffic data segment within each interval to be compressed; sigmod() represents the logistic function; exp() represents the exponential function with a natural constant as the base.
[0071] In the compression priority formula, when there are more identical values in each interval to be compressed, the smaller the frequency ranking, The smaller the value, the higher the compression efficiency when D number of selected compressed data is selected for compression in each valid platform user traffic data segment in each interval to be compressed; when more data is borrowed from other integer intervals, H D The value of H is large, and the sigmoid function is used to D Scaling, exp{sigmord(H D)} is larger, resulting in a lower compression priority; when there is more uncompressed data in each interval to be compressed, more useful data is ignored, the priority is reduced, and S D The value of log3(3+S D ) value, the larger the uncompressed data in each interval to be compressed is, the greater the impact of the overall data, and the lower the compression preference. The more identical data values in each interval to be compressed, the less data is borrowed from other intervals, the less uncompressed data is, and the higher the compression preference.
[0072] Different numbers of candidate compression data may produce different degrees of accuracy in representing valid platform user traffic data segments. The compression priority reflects the importance of data compression. The higher the compression priority, the more likely the corresponding number of candidate compressions will ensure that critical data is compressed, thereby optimizing overall compression efficiency. By selecting the optimal number of compressions, the relationship between data compression and accuracy can be better balanced, ensuring data accuracy and integrity, and improving data quality. Based on the compression priority of each candidate compression data number, the optimal number of compressions for each valid platform user traffic data segment within each compression interval is obtained.
[0073] Preferably, in one embodiment of the present invention, the method for obtaining the optimal compression number is:
[0074] The data with the highest compression priority among all the data to be compressed is selected to obtain the optimal compression number for each interval to be compressed.
[0075] Step S4: Compress the data in the intervals to be compressed in turn according to the flow data content of each interval to be compressed, and obtain the spare data interval of each interval to be compressed; add the data in the spare data interval to the interval to be compressed according to the optimal compression number of each interval to be compressed, compress the user flow time series data of the elderly care user platform, and obtain compressed flow data.
[0076] The traffic data content of each interval to be compressed represents the important range for compressing the user traffic time series data of the elderly care user platform. The more data content, the more important information of the data needs to be retained as much as possible. The data in each interval to be compressed is compressed in turn according to the traffic data content of each interval to be compressed.
[0077] Preferably, in one embodiment of the present invention, sequentially compressing data in the to-be-compressed interval includes:
[0078] The flow data content of each interval to be compressed is compressed in descending order.
[0079] If the importance of some intervals to be compressed is low, it means that this integer interval is not important to the user traffic time series data of the elderly care user platform. When borrowing data, data is borrowed from the unimportant integer intervals first to obtain the backup data interval for each interval to be compressed;
[0080] Preferably, in one embodiment of the present invention, the method for obtaining the spare data interval includes:
[0081] The least important interval to be compressed is selected as the backup data interval.
[0082] In order to fill certain gaps in the interval to be compressed and balance the distribution of data, the availability of compressed data is improved; according to the optimal compression number of each interval to be compressed, the data in the spare integer interval is added to the interval to be compressed, and the user traffic time series data of the elderly care user platform is compressed to obtain compressed traffic data.
[0083] Preferably, in one embodiment of the present invention, the method for obtaining compressed flow data includes:
[0084] Compressed traffic data includes compressed valid traffic data, directly stored data, and compressed invalid traffic data;
[0085] If the number of data in each valid platform user traffic data segment in each interval to be compressed is less than the optimal compression number, the data in the spare data interval is added to the interval to be compressed to obtain the data to be compressed that meets the optimal compression number in each interval to be compressed, and Holman coding is used for compression to obtain compressed valid traffic data.
[0086] It should be noted that, in one embodiment of the present invention, the traffic data content of each interval to be compressed is compressed in descending order; multiple valid platform user traffic data segments [0.4, 0.7, 0.9, 1.4, 2.7, 2.9, 3.4], [0.5, 0.8, 0.95, 1.43, 2.78, 2.91, 3.41], [0.3, 0.6, 0.91, 2.79, 2.92, 3.43]; because there are 3 valid platform user traffic data segments in ( 0,2], while the third valid platform user traffic data segment has only 2 data. If 3 optimally compressed data are selected for compression in each valid platform user traffic data segment in the (0,2] interval, then the third valid platform user traffic data segment needs to borrow one data from the spare data interval, that is, the interval with less data, to ensure that the third valid platform user traffic data segment contains 3 data in the (0,2] interval. After compression, the same analysis is performed on the next interval with a larger traffic data content.
[0087] Obtain a data set where each valid platform user traffic data segment within each interval to be compressed exceeds the optimal compression number. Obtain uncompressed data within each interval to be compressed, mark the interval, and store it directly. Obtain invalid platform user traffic data segments from the elderly care user platform user traffic time series data, compress them using run-length encoding, and obtain compressed invalid traffic data.
[0088] It should be noted that specific run-length coding and Huffman coding are technical means well known to those skilled in the art and will not be described in detail here.
[0089] Step S5: Store the compressed traffic data.
[0090] Compressed data can be stored and managed more efficiently. The reduced data volume makes retrieval, reading, and management operations faster and more convenient, improving work efficiency. The elderly care platform's intelligent data storage and management incorporates strict security and privacy protection measures to ensure the reliability and integrity of user traffic data on the elderly care platform. Storing compressed traffic data in the platform's intelligent data storage and management reduces the load on the storage system.
[0091] In summary, the present invention obtains the flow data content corresponding to each numerical interval; determines the reference numerical interval; divides the reference numerical interval within the numerical range of the valid platform user flow data segment to obtain multiple intervals to be compressed; uses the number of data in each valid platform user flow data segment in each interval to be compressed as the number of data to be compressed, and obtains the compression priority of the number of data to be compressed based on the difference between the corresponding number of data in each valid platform user flow data segment in each interval to be compressed and the number of data to be compressed, as well as the data distribution in each interval to be compressed; compresses the data in the interval to be compressed in turn according to the flow data content of each interval to be compressed, and obtains the spare data interval of each interval to be compressed; adds the data in the spare data interval to the interval to be compressed according to the optimal compression number of each interval to be compressed, and obtains the optimal compression number; compresses the user flow time series data of the elderly care user platform to obtain compressed flow data; and stores it. The present invention improves the efficiency of data compression and optimizes the storage system load by obtaining the accurate number of data in the compression process.
[0092] An embodiment of a data compression method for a pension platform:
[0093] In the prior art, considering that the values of some data in the time series data to be stored are equal, Huffman coding is used to compress the data to be compressed, which can achieve a good compression effect on letters containing many identical numbers. However, since the user traffic of the elderly care user platform is affected by various factors, the values of many data in the data to be compressed are relatively close but not equal, and the accurate number of data cannot be obtained during the compression process, resulting in a poor compression effect on the compressed data. To solve this technical problem, this embodiment provides a data compression method for the elderly care platform, including:
[0094] Step S1: Obtain pension platform data information.
[0095] Step S2: Filter out multiple valid platform user traffic data segments from the elderly care user platform user traffic time series data; include multiple numerical intervals within the numerical range of the valid platform user traffic data segments, and obtain the traffic data content corresponding to each numerical interval according to the number of data in each valid platform user traffic data segment in each numerical interval; determine a reference numerical interval according to the traffic data content corresponding to each numerical interval; divide the valid platform user traffic data segments within the numerical range according to the reference numerical interval to obtain multiple intervals to be compressed.
[0096] Step S3: The number of data in each valid platform user traffic data segment in each interval to be compressed is used as the number of data to be compressed, and the compression priority of the number of data to be compressed is obtained according to the difference distribution between the corresponding number of data in each valid platform user traffic data segment in each interval to be compressed and the number of data to be compressed, as well as the data distribution in each interval to be compressed; the optimal compression number of each valid platform user traffic data segment in each interval to be compressed is obtained according to the compression priority of each number of data to be compressed.
[0097] Step S4: Compress the data in the intervals to be compressed in turn according to the flow data content of each interval to be compressed, and obtain the spare data interval of each interval to be compressed; add the data in the spare data interval to the interval to be compressed according to the optimal compression number of each interval to be compressed, compress the user flow time series data of the elderly care user platform, and obtain compressed flow data.
[0098] Since the specific implementation process of steps S1-S4 has been given in detail in the above-mentioned data storage and management system for the smart elderly care platform, it will not be repeated here.
[0099] The technical effects of this embodiment are:
[0100] The method obtains the flow data content corresponding to each numerical interval; determines the reference numerical interval; divides the reference numerical interval within the numerical range of the valid platform user flow data segment to obtain multiple intervals to be compressed; uses the number of data in each valid platform user flow data segment in each interval to be compressed as the number of data to be compressed, and obtains the compression priority of the number of data to be compressed based on the difference between the number of corresponding data in each valid platform user flow data segment in each interval to be compressed and the number of data to be compressed, as well as the data distribution in each interval to be compressed; compresses the data in the interval to be compressed in turn according to the flow data content of each interval to be compressed, and obtains the spare data interval of each interval to be compressed; adds the data in the spare data interval to the interval to be compressed according to the optimal compression number of each interval to be compressed, and obtains the optimal compression number; compresses the user flow time series data of the elderly care user platform to obtain compressed flow data. The present invention improves the efficiency of data compression by obtaining the accurate number of data in the compression process.
[0101] It should be noted that the order in which the embodiments of the present invention are described above is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0102] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
Claims
1. A data storage and management system for a smart elderly care platform, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the following steps are implemented: Obtaining data information from the elderly care platform, wherein the data information from the elderly care platform includes time series data on user traffic on the elderly care user platform; Filtering out a plurality of valid platform user traffic data segments from the user traffic time series data of the elderly care user platform; The value range of the valid platform user traffic data segment includes multiple value intervals, and according to the number of data in each valid platform user traffic data segment in each value interval, the traffic data content corresponding to each value interval is obtained; and according to the traffic data content corresponding to each value interval, a reference value interval is determined; Dividing the effective platform user traffic data segment into multiple intervals to be compressed according to the reference numerical interval; The number of data in each valid platform user traffic data segment within each interval to be compressed is used as the number of data to be compressed, and the compression priority of the number of data to be compressed is obtained based on the difference between the number of corresponding data in each valid platform user traffic data segment within each interval to be compressed and the number of data to be compressed, as well as the data distribution within each interval to be compressed; the optimal compression number of each valid platform user traffic data segment within each interval to be compressed is obtained based on the compression priority of each number of data to be compressed; Compressing the data in each interval to be compressed sequentially based on the flow data content of each interval to be compressed, obtaining a spare data interval for each interval to be compressed; adding the data in the spare data interval to the interval to be compressed based on the optimal compression number of each interval to be compressed, compressing the user flow time series data of the elderly care user platform, and obtaining compressed flow data; The compressed flow data is stored.
2. A data storage and management system for a smart elderly care platform according to claim 1, characterized in that: The method for obtaining the flow data content includes: Calculate the average number of data in all valid platform user traffic data segments in each numerical interval to obtain the traffic data content corresponding to each numerical interval.
3. A data storage and management system for a smart elderly care platform according to claim 1, characterized in that: The method for obtaining the reference value interval includes: The reference value interval is obtained by selecting the value interval with the highest content of the flow data among all the value intervals.
4. A data storage and management system for a smart elderly care platform according to claim 1, characterized in that: The method for obtaining the interval to be compressed includes: According to the width of the reference numerical interval, the numerical range of the effective platform user traffic data segment is evenly divided with the reference numerical interval as the center to obtain multiple intervals to be compressed; there is no intersection between adjacent intervals to be compressed.
5. The data storage and management system for a smart elderly care platform according to claim 1 is characterized in that: The method for obtaining the compression priority includes: The number of data in the corresponding data number that is greater than the number of the to-be-selected compressed data is used as the number of uncompressed data; the number of data in the corresponding data number that is less than the number of the to-be-selected compressed data is used as the number of borrowed data; The compression priority is obtained according to the compression priority acquisition formula. The compression priority acquisition formula is: Among them, E D Indicates the compression priority of selecting D pieces of data to be compressed from each valid platform user traffic data segment within each interval to be compressed; S D H represents the number of uncompressed data when D number of compressed data are selected for each valid platform user traffic data segment in each compression interval; D represents the number of borrowed data when D pieces of to-be-selected compressed data are selected for compression in each valid platform user traffic data segment within each interval to be compressed; r represents the numerical category when D pieces of to-be-selected compressed data are selected for compression in each valid platform user traffic data segment within each interval to be compressed; Y D,t Indicates the frequency ranking of the t-th value when D candidate compression data are selected for compression in each valid platform user traffic data segment; L D,t It represents the number of t-th values when D pieces of data to be compressed are selected for compression in each valid platform user traffic data segment within each interval to be compressed; sigmod() represents the logistic function; exp() represents the exponential function with a natural constant as the base.
6. A data storage and management system for a smart elderly care platform according to claim 1, characterized in that: The method for obtaining the optimal compression number includes: The data with the highest compression priority among all the numbers of data to be compressed is selected to obtain the optimal compression number for each interval to be compressed.
7. The data storage and management system for a smart elderly care platform according to claim 1, characterized in that: The sequentially compressing the data in the to-be-compressed intervals includes: The flow data content of each interval to be compressed is compressed in descending order.
8. The data storage and management system for a smart elderly care platform according to claim 1, characterized in that: The method for obtaining the spare data interval includes: The interval to be compressed with the lowest flow data content is selected as the spare data interval.
9. The data storage and management system for a smart elderly care platform according to claim 1, characterized in that: The method for obtaining compressed flow data includes: The compressed flow data includes compressed valid flow data, directly stored data and compressed invalid flow data; If the number of data in each valid platform user traffic data segment in each interval to be compressed is less than the optimal compression number, the data in the spare data interval is added to the interval to be compressed to obtain the compressed data in each interval to be compressed that meets the optimal compression number, and Holman coding is used to compress the data to obtain compressed valid traffic data; Obtaining a data set in which each valid platform user traffic data segment in each interval to be compressed is greater than the optimal compression number, obtaining uncompressed data in each interval to be compressed, marking the interval, and storing the data directly; Obtain invalid platform user traffic data segments in the elderly care user platform user traffic time series data, compress them using run-length encoding, and obtain compressed invalid traffic data.
10. The data storage and management system for a smart elderly care platform according to claim 1, characterized in that: The method for obtaining the numerical interval of the effective platform user traffic data segment includes: The numerical interval is (R-1, R+1], where R is any integer in the numerical range of the valid platform user traffic data segment; all integers in the numerical range of the valid platform user traffic data segment are traversed to obtain all numerical intervals.