Data compression method, device and computer equipment

By acquiring the spatiotemporal information of node energy and environmental data, determining the spatiotemporal correlation coefficient and dynamic energy parameters, and dynamically adjusting the compression strategy, the problem of low energy utilization and low data compression efficiency of low-power nodes during data compression and caching is solved, achieving more efficient energy utilization and data compression.

CN120455553BActive Publication Date: 2026-01-09GUANGDONG UNIV OF TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510574539.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2026-01-09
Estimated Expiration
2045-05-06

AI Technical Summary

Technical Problem

Existing low-power nodes have low energy utilization and low data compression efficiency when compressing and caching data.

Method used

By acquiring the spatiotemporal information of node energy and environmental data, the spatiotemporal correlation coefficient and dynamic energy parameters are determined, and the compression strategy is dynamically adjusted to retain effective information with appropriate energy consumption and reduce the node processing burden.

Benefits of technology

This improves the energy utilization and data compression efficiency of nodes, and extends the lifespan of nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455553B_ABST
    Figure CN120455553B_ABST
Patent Text Reader

Abstract

The application relates to a data compression method, device and computer equipment. The method comprises the following steps: acquiring energy data of a node, environment data collected by the node and space-time information of the environment data; determining a space-time correlation coefficient of the environment data according to the space-time information; the space-time correlation coefficient is used for evaluating the redundancy degree of the environment data; determining a dynamic energy parameter of the node according to the energy data; the dynamic energy parameter is used for representing the residual energy of the node; and performing compression processing on the environment data according to the dynamic energy parameter and the space-time correlation coefficient. The data compression method comprehensively considers the energy state of the node and the space-time correlation of each data in the environment data, dynamically adjusts the compression strategy of the node, guarantees the effectiveness of the compressed data, improves the energy utilization rate of the node and reduces the energy loss of the node.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to a data compression method, device and computer equipment. BACKGROUND

[0002] With the rapid development of Internet of Things and wireless sensor networks, low-power nodes are widely used in various data collection, environmental monitoring, smart home and other fields. However, the current low-power nodes have low energy utilization and low data compression efficiency when compressing and buffering data. SUMMARY

[0003] Therefore, it is necessary to provide a data compression method, device and computer equipment capable of improving node energy utilization and compression efficiency to solve the above technical problems.

[0004] In a first aspect, the present application provides a data compression method, comprising:

[0005] obtaining energy data of a node, environmental data collected by the node, and space-time information of the environmental data;

[0006] determining a space-time correlation coefficient of the environmental data according to the space-time information; the space-time correlation coefficient is used to evaluate the redundancy degree of the environmental data;

[0007] determining a dynamic energy parameter of the node according to the energy data; the dynamic energy parameter is used to represent the residual energy of the node;

[0008] performing compression processing on the environmental data according to the dynamic energy parameter and the space-time correlation coefficient.

[0009] In one embodiment, the node includes a plurality of data collection points, and the environmental data includes a plurality of groups of data. Each data collection point is used to collect a group of data.

[0010] The determining of the space-time correlation coefficient of the environmental data according to the space-time information comprises:

[0011] determining two groups of data in the environmental data that meet a preset correlation condition as a target data pair according to the space-time information;

[0012] determining a correlation coefficient of the target data pair according to the covariance and standard deviation of the target data pair;

[0013] determining a space-time weighting factor of the target data pair according to the correlation coefficient and the space-time information;

[0014] determine a spatio-temporal correlation coefficient of the target data pair according to the correlation coefficient and the spatio-temporal information;

[0015] determine a spatio-temporal correlation coefficient of the target data pair according to the correlation coefficient and the spatio-temporal information;

[0016] In one of the embodiments, the spatio-temporal information comprises spatial position information and timestamp information;

[0017] The determining the spatio-temporal weighting factor of the target data pair according to the correlation coefficient and the spatio-temporal information comprises:

[0018] obtaining a spatial distance of the target data pair according to the spatial position information of the target data pair;

[0019] obtaining a collection time difference of the target data pair according to the timestamp information of the target data pair;

[0020] determining the spatio-temporal weighting factor of the target data pair according to the correlation coefficient, the spatial distance, the collection time difference, and preset hyperparameters and preset similarity decay parameters.

[0021] In one of the embodiments, the determining the dynamic energy parameter of the node according to the energy data comprises:

[0022] obtaining an initial energy of the node at an initial time;

[0023] obtaining a consumed energy of the node from the initial time to a current time;

[0024] obtaining a residual energy of the node at the current time according to the initial energy and the consumed energy.

[0025] In one of the embodiments, the compressing the environmental data according to the dynamic energy parameter and the spatio-temporal correlation coefficient comprises:

[0026] determining a comprehensive weight according to the dynamic energy parameter, the spatio-temporal correlation coefficient, and a preset weight coefficient;

[0027] adjusting a compression strategy according to the comprehensive weight to compress the environmental data.

[0028] In one of the embodiments, the adjusting the compression strategy according to the comprehensive weight to compress the environmental data comprises:

[0029] determining a target mapping function according to the spatio-temporal information and the dynamic energy parameter;

[0030] determine a compression parameter according to the comprehensive weight and the target mapping function, the compression parameter being used to represent a compression strength of a compression strategy;

[0031] adjust the compression strategy based on the compression parameter, so as to compress the environmental data.

[0032] In one of the embodiments, the determining of the target mapping function according to the spatio-temporal information comprises:

[0033] obtaining an amount of redundant information of the environmental data according to the spatio-temporal information;

[0034] determining a compression ratio according to the amount of redundant information and a total amount of data of the environmental data;

[0035] determining the target mapping function from a plurality of preset mapping functions according to the compression ratio and the dynamic energy parameter.

[0036] In one of the embodiments, the determining of the compression parameter according to the comprehensive weight and the target mapping function comprises:

[0037] in a case where the comprehensive weight is less than a first preset weight, the compression parameter is a first preset value;

[0038] in a case where the comprehensive weight is greater than or equal to the first preset weight and less than a second preset weight, the compression parameter is positively correlated with the comprehensive weight, and the compression parameter is greater than or equal to the first preset value;

[0039] in a case where the comprehensive weight is greater than or equal to the second preset weight, the compression parameter is a second preset value, and the second preset value is greater than the first preset value.

[0040] In a second aspect, the present application further provides a data compression device, comprising:

[0041] a data acquisition module, configured to obtain energy data of a node, environmental data collected by the node, and spatio-temporal information of the environmental data;

[0042] a spatio-temporal correlation analysis module, configured to determine a spatio-temporal correlation coefficient of the environmental data according to the spatio-temporal information; the spatio-temporal correlation coefficient is used to evaluate a redundancy degree of the environmental data;

[0043] an energy-aware module, configured to determine a dynamic energy parameter of the node according to the energy data; the dynamic energy parameter is used to represent a residual energy of the node;

[0044] a compression processing module, configured to compress the environmental data according to the dynamic energy parameter and the spatio-temporal correlation coefficient.

[0045] In a third aspect, the present application also provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the data compression method provided by any of the above embodiments.

[0046] The data compression method, device and computer device described above, by obtaining the energy data of the node, the environment data collected by the node and the space-time information of the environment data, determining the space-time correlation coefficient of the environment data according to the space-time information, determining the dynamic energy parameter of the node according to the energy data, wherein the space-time correlation coefficient reflects the redundancy degree of the environment data, and the dynamic energy parameter represents the residual energy of the node, and further, compressing the environment data according to the dynamic energy parameter and the space-time correlation coefficient. It can be understood that the residual energy of the node and the space-time correlation coefficient between each data in the environment data collected by the node are both used as reference, and the compression strategy of the node is dynamically adjusted. In the case of high data redundancy, the effective information can be preserved with appropriate energy consumption, and the energy utilization rate of the node is improved. In the case of low residual energy of the node or low data redundancy, the processing burden of the node is reduced, the data compression efficiency of the node is ensured, the energy consumption of the node is reduced, and the service life of the node is prolonged. BRIEF DESCRIPTION OF DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can also be obtained without creative labor.

[0048] Figure 1 A flowchart of the data compression method in one embodiment is shown in the figure;

[0049] Figure 2 A flowchart of determining the space-time correlation coefficient of the environment data according to the space-time information in one embodiment is shown in the figure;

[0050] Figure 3 A flowchart of determining the dynamic energy parameter of the node according to the energy data in one embodiment is shown in the figure;

[0051] Figure 4 A flowchart of adjusting the compression strategy according to the comprehensive weight to compress the environment data in one embodiment is shown in the figure;

[0052] Figure 5 A flowchart of the data compression method in another embodiment is shown in the figure;

[0053] Figure 6A structural block diagram of a data compression device in an embodiment;

[0054] Figure 7 An internal structural diagram of a computer device in an embodiment. DETAILED DESCRIPTION

[0055] For the purpose, technical solutions and advantages of the present application to be clearer, the present application is further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not to limit the present application.

[0056] The data compression method provided by the embodiment of the present application can be applied to a sensor network. The sensor network is a network composed of sensor nodes, which can monitor, perceive and collect environmental information in the node deployment area in real time, and can process and send the information outward. The sensor node can include one or more data collection points, the data collection point is used to collect a group of data and send to the sensor node, and the sensor node can perform compression, storage and forwarding operations on the data collected by the data collection point.

[0057] In an embodiment, as shown in Figure 1 The data compression method of the present application includes steps 102-108.

[0058] Step 102, obtaining energy data of the node, environmental data collected by the node, and space-time information of the environmental data.

[0059] The energy data of the node includes data such as battery capacity, voltage and current of the node. The environmental data collected by the node is the environmental data collected by each data collection point included in the node. The space-time information of the environmental data refers to the spatial location information and timestamp information of the environmental data.

[0060] Step 104, determining the space-time correlation coefficient of the environmental data according to the space-time information.

[0061] The space-time correlation coefficient is used to evaluate the redundancy degree of the environmental data. In the sensor network, there may be correlation between data with close timestamps and adjacent spatial positions, and there may be redundant information. Therefore, the space-time correlation coefficient of the environmental data can be determined according to the space-time information, so as to realize the quantification of the redundancy degree of the environmental data.

[0062] Step 106, determining the dynamic energy parameter of the node according to the energy data.

[0063] The dynamic energy parameter is used to represent the remaining energy of the node.

[0064] Step 108, compressing the environmental data according to the dynamic energy parameter and the space-time correlation coefficient.

[0065] Taking into account both the dynamic energy parameters of nodes and the spatiotemporal correlation coefficient of environmental data, adaptive compression processing is applied to the environmental data. For example, when nodes have sufficient remaining energy and the spatiotemporal correlation coefficient of environmental data is high, a high compression ratio and high computational intensity compression algorithm can be used to compress the environmental data. When nodes have sufficient remaining energy but the spatiotemporal correlation coefficient of environmental data is low, the environmental data can be moderately compressed to avoid wasting node energy. When nodes have low remaining energy but the spatiotemporal correlation coefficient of environmental data is high, the environmental data can be appropriately compressed, balancing node energy consumption and data compression efficiency. When nodes have low remaining energy and the spatiotemporal correlation coefficient of environmental data is also low, a low computational intensity compression algorithm is used to compress the environmental data, prioritizing node endurance; the compression of environmental data can then be performed by higher-level nodes.

[0066] In this embodiment, by acquiring the node's energy data, the environmental data collected by the node, and the spatiotemporal information of the environmental data, the spatiotemporal correlation coefficient of the environmental data is determined based on the spatiotemporal information, and the dynamic energy parameters of the node are determined based on the energy data. Furthermore, the environmental data is compressed based on the dynamic energy parameters and the spatiotemporal correlation coefficient. It can be understood that the node's remaining energy and the spatiotemporal correlation coefficient between various data in the environmental data collected by the node are used as references to dynamically adjust the node's compression strategy. When the data redundancy is high, effective information can be retained with appropriate energy consumption. When the node's remaining energy is low or the data redundancy is low, the node's processing burden is reduced. While ensuring the node's data compression efficiency, the node's energy consumption is reduced, and the node's service life is extended.

[0067] In one embodiment, such as Figure 2 As shown, the spatiotemporal correlation coefficient of environmental data is determined based on spatiotemporal information, including steps 202-210.

[0068] Step 202: Based on the spatiotemporal information, determine the two sets of data in the environmental data that meet the preset association conditions as the target data pair.

[0069] The preset association condition refers to timestamps being close or spatial locations being adjacent. For example, the preset association condition can be at least one of timestamp difference being less than a threshold Δt and spatial distance being less than a threshold Δs.

[0070] Step 204: Determine the correlation coefficient of the target data pair based on its covariance and standard deviation.

[0071] Assuming the environmental data is Two sets of data that satisfy the preset association conditions are denoted as the target data pair. . Data Covariance of , and respectively and standard deviation of target data pair correlation coefficient of target data pair is:

[0072]

[0073] Step 206, according to the correlation coefficient and the spatio-temporal information, determining the spatio-temporal weighting factor of the target data pair.

[0074] The spatio-temporal weighting factor can be used to comprehensively measure the redundancy strength between data and , and the spatio-temporal weighting factor is related to the acquisition time difference, spatial distance and correlation coefficient of the target data pair.

[0075] Specifically, according to the spatial position information of the target data pair , the spatial distance of the target data pair is obtained. According to the timestamp information of the target data pair , the acquisition time difference of the target data pair is obtained. According to the correlation coefficient , the spatial distance , the acquisition time difference , and the preset hyperparameter and the preset similarity decay parameter, the spatio-temporal weighting factor of the target data pair is determined.

[0076] The preset hyperparameter includes . , The specific value of can be set according to requirements. The preset similarity decay parameter includes spatial similarity decay parameter and time similarity decay parameter . for controlling the influence of spatial distance on similarity decay speed. for controlling the influence of acquisition time difference on similarity decay speed.

[0077] Specifically, the spatio-temporal weighting factor of the target data pair can be calculated by formula (2):

[0078]

[0079] Step 208, according to the spatio-temporal weighting factor and the correlation coefficient, determining the spatio-temporal correlation coefficient of the target data pair.

[0080] spatiotemporal correlation coefficient of the target data pair spatiotemporal correlation coefficient of the target data pair The spatiotemporal correlation coefficient of the target data pair can be obtained by formula (3):

[0081]

[0082] Step 210, determining the spatiotemporal correlation coefficient of the environmental data according to the spatiotemporal correlation coefficient of the target data pair.

[0083] In the case where there are multiple target data pairs in the environmental data, the mean of the spatiotemporal correlation coefficients of the multiple target data pairs can be taken as the spatiotemporal correlation coefficient of the environmental data.

[0084] In this embodiment, the spatiotemporal correlation analysis is performed on the environmental data based on the spatiotemporal information, and the spatiotemporal correlation of the environmental data is quantified to obtain the spatiotemporal correlation coefficient, so that the redundant information in the environmental data can be accurately extracted, and a reference basis for the dynamic adjustment of the subsequent compression strategy is provided.

[0085] In one embodiment, as shown in FIG. 3, the dynamic energy parameter of the node is determined according to the energy data, including steps 302-306. Figure 3

[0086] Step 302, obtaining the initial energy of the node at the initial time.

[0087] The initial time refers to the system time recorded when the node is started.

[0088] Step 304, obtaining the consumed energy of the node from the initial time to the current time.

[0089] The consumed energy of the node can be obtained by integrating the energy data of the node from the initial time to the current time.

[0090] Step 306, obtaining the residual energy of the node at the current time according to the initial energy and the consumed energy.

[0091] The residual energy of the node at the current time can be calculated according to formula (4)

[0092]

[0093] wherein, represents the initial energy of the node, represents the consumed energy of the node, is the power consumption function of the node.

[0094] Since the collected node energy data is discretized in the actual processing process, the above formula (4) can be discretized to obtain the residual energy of the node at the current time.​​

[0095] In the embodiment, the energy data of the node is collected in real time, and the energy data is integrated and differentially processed to obtain the residual energy of the node, so that the real-time detection of the node energy is realized, and the node energy reference basis is provided for the subsequent adjustment of the compression strategy.

[0096] In one embodiment, the environmental data is compressed according to the dynamic energy parameter and the space-time correlation coefficient, including determining a comprehensive weight according to the dynamic energy parameter, the space-time correlation coefficient and a preset weight coefficient, and adjusting the compression strategy according to the comprehensive weight to compress the environmental data.

[0097] The comprehensive weight is used to combine the dynamic energy parameter and the space-time correlation coefficient to balance the residual energy of the node and the redundancy of the environmental data in the node data compression processing.

[0098] The preset weight coefficient includes an energy weight coefficient and a correlation weight coefficient , . The values of may be reasonably set according to actual needs, which are not limited in the embodiment.

[0099] Further, the comprehensive weight W can be determined according to formula (5):

[0100]

[0101] wherein, is the space-time correlation coefficient of the environmental data.

[0102] In the embodiment, the comprehensive weight is determined according to the dynamic energy parameter, the space-time correlation coefficient and the preset weight coefficient, and the compression strategy is adjusted according to the comprehensive weight, so that the compression algorithm with high compression rate can be used to compress the environmental data when the node energy is sufficient, and the compression rate can be appropriately reduced when the node energy is insufficient, so that the balance between the node energy loss and the compression efficiency is realized.

[0103] In one embodiment, as shown in Figure 4 , the compression strategy is adjusted according to the comprehensive weight to compress the environmental data, including steps 402-406.

[0104] Step 402, determining a target mapping function according to the space-time information and the dynamic energy parameter.

[0105] The target mapping function is used to map the comprehensive weight to the compression parameter. The target mapping function can be a segmented function or a non-segmented function, which can be a linear function, an exponential function, a step function and the like in a continuous interval.

[0106] The target mapping function can be set in advance or dynamically adjusted according to the redundancy of the environmental data and the residual energy of the node. Illustratively, the amount of redundant information of the environmental data can be obtained according to the space-time information. For the environmental data , the amount of redundant information I thereof can be calculated by the following formula (6):

[0107]

[0108] According to the amount of redundant information I and the total amount of data D of the environmental data, the compression ratio R is determined as:

[0109]

[0110] Then, the target mapping function is determined from a plurality of preset mapping functions according to the compression ratio and the dynamic energy parameter. The compression ratio reflects the compressible potential of the environmental data and is an important reference index for measuring the rationality of the compression strategy. In this embodiment, the target mapping function is determined from the plurality of preset mapping functions by comprehensively considering the compression ratio and the residual energy of the node, so that the compression strategy can be more accurately adjusted to achieve optimal compression of the environmental data under different residual energy states of the node.

[0111] Step 404, determining the compression parameter according to the comprehensive weight and the target mapping function.

[0112] The compression parameter is used to represent the compression strength of the compression strategy. Illustratively, in a dictionary-based compression algorithm (such as LZ77, LZ78, LZW, etc.), the compression parameter can be at least one of the dictionary size or the prediction step length.

[0113] Suppose the target mapping function is , the compression parameter and the relationship between the comprehensive weight W is:

[0114]

[0115] wherein, is a preset maximum compression parameter.

[0116] Step 406, adjusting the compression strategy based on the compression parameter to compress the environmental data.

[0117] In this embodiment, the comprehensive weight is mapped to the compression parameter of the compression strategy by the target mapping function, so that the compression strategy can be accurately adjusted.

[0118] In one embodiment, the target mapping function is a piecewise function. The compressed parameter is determined according to the comprehensive weight and the target mapping function, including: in a case where the comprehensive weight is less than a first preset weight, the compressed parameter is a first preset value; in a case where the comprehensive weight is greater than or equal to the first preset weight and less than a second preset weight, the compressed parameter is positively correlated with the comprehensive weight, and the compressed parameter is greater than or equal to the first preset value; in a case where the comprehensive weight is greater than or equal to a third preset weight, the compressed parameter is a second preset value, and the second preset value is greater than the first preset value.

[0119] Exemplarily, the target mapping function can be:

[0120]

[0121] wherein the first preset weight is 0.2, and the second preset weight is 0.7.

[0122] In order to better understand the data compression method of the present application, a more specific embodiment is described.

[0123] As shown in Figure 5 , the data compression method of the present application includes steps 502-522.

[0124] In step 502, the energy data of the node, the environmental data collected by the node, and the spatio-temporal information of the environmental data are obtained.

[0125] In step 504, according to the spatio-temporal information, two groups of data in the environmental data that satisfy a preset association condition are determined as a target data pair.

[0126] In step 506, according to the covariance and the standard deviation of the target data pair, a correlation coefficient of the target data pair is determined.

[0127] In step 508, according to the correlation coefficient and the spatio-temporal information, a spatio-temporal weighting factor of the target data pair is determined.

[0128] In step 510, according to the spatio-temporal weighting factor and the correlation coefficient, a spatio-temporal correlation coefficient of the target data pair is determined.

[0129] In step 512, an average value of the spatio-temporal correlation coefficients of the plurality of target data pairs is determined as a spatio-temporal correlation coefficient of the environmental data.

[0130] In step 514, a dynamic energy parameter of the node is determined according to the energy data, the dynamic energy parameter being used to represent the residual energy of the node.

[0131] In step 516, a comprehensive weight is determined according to the dynamic energy parameter, the spatio-temporal correlation coefficient, and a preset weight coefficient.

[0132] At step 518, a compression parameter is determined according to the comprehensive weight and the target mapping function, and the compression parameter is used to represent the compression strength of the compression strategy.

[0133] At step 520, the compression strategy is adjusted based on the compression parameter, so as to compress the environmental data.

[0134] At step 522, the environmental data after compression is stored.

[0135] It can be understood that, when the data compression method of the present application compresses the environmental data of the node, the spatio-temporal correlation of the environmental data is analyzed according to the spatio-temporal information of the environmental data, and the spatio-temporal correlation of the environmental data is fully considered to accurately extract the redundant information of the environmental data; the energy of the node is coupled with the spatio-temporal correlation of the environmental data, so that the node can flexibly adjust the compression strategy according to the current residual energy; in the case of high data redundancy, the effective information can be preserved with appropriate energy consumption; in the case of low residual energy of the node or low data redundancy, the processing burden of the node is reduced, the compression efficiency of the node is ensured, the energy consumption of the node is reduced, and the service life of the node is prolonged.

[0136] It should be understood that, although each step in the flowchart involved in the above embodiments is displayed in sequence according to the illustration, these steps are not necessarily executed in sequence. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in the above embodiments can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least part of other steps or steps or stages in other steps.

[0137] Based on the same inventive concept, the present application also provides a data compression device for implementing the above-mentioned data compression method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more data compression device embodiments provided below can refer to the limitations of the data compression method in the above text, and will not be repeated here.

[0138] In one exemplary embodiment, as shown in Figure 6 a data compression device is provided, comprising a data acquisition module 602, a spatio-temporal correlation analysis module 604, an energy-aware module 606 and a compression processing module 608, wherein:

[0139] The data collection module 602 is configured to acquire energy data of the node, environment data collected by the node, and spatio-temporal information of the environment data.

[0140] The spatio-temporal correlation analysis module 604 is configured to determine a spatio-temporal correlation coefficient of the environment data according to the spatio-temporal information. The spatio-temporal correlation coefficient is used to evaluate a redundancy degree of the environment data.

[0141] The energy-aware module 606 is configured to determine a dynamic energy parameter of the node according to the energy data. The dynamic energy parameter is used to represent a residual energy of the node.

[0142] The compression processing module 608 is configured to perform compression processing on the environment data according to the dynamic energy parameter and the spatio-temporal correlation coefficient.

[0143] In an embodiment, the spatio-temporal correlation analysis module is further configured to determine, according to the spatio-temporal information, two groups of data in the environment data that satisfy a preset correlation condition as a target data pair; determine a correlation coefficient of the target data pair according to a covariance and a standard deviation of the target data pair; determine a spatio-temporal weighting factor of the target data pair according to the correlation coefficient and the spatio-temporal information; determine a spatio-temporal correlation coefficient of the target data pair according to the spatio-temporal weighting factor and the correlation coefficient; and determine the spatio-temporal correlation coefficient of the environment data according to the spatio-temporal correlation coefficient of the target data pair.

[0144] In an embodiment, the spatio-temporal correlation analysis module is further configured to acquire a spatial distance of the target data pair according to spatial position information of the target data pair; acquire a collection time difference of the target data pair according to timestamp information of the target data pair; and determine the spatio-temporal weighting factor of the target data pair according to the correlation coefficient, the spatial distance, the collection time difference, and a preset hyperparameter and a preset similarity decay parameter.

[0145] In an embodiment, the energy-aware module is further configured to acquire an initial energy of the node at an initial time; acquire consumed energy of the node from the initial time to a current time; and acquire a residual energy of the node at the current time according to the initial energy and the consumed energy.

[0146] In an embodiment, the compression processing module is further configured to determine a comprehensive weight according to the dynamic energy parameter, the spatio-temporal correlation coefficient, and a preset weight coefficient; and adjust the compression strategy according to the comprehensive weight to perform the compression processing on the environment data.

[0147] In an embodiment, the compression processing module is further configured to determine a target mapping function according to the spatio-temporal information and the dynamic energy parameter; determine a compression parameter according to the comprehensive weight and the target mapping function, the compression parameter being used to represent a compression intensity of the compression strategy; and adjust the compression strategy based on the compression parameter to perform the compression processing on the environment data.

[0148] In an embodiment, the compression processing module is further configured to acquire an amount of redundant information of the environmental data according to the spatio-temporal information; determine a compression ratio according to the amount of redundant information and a total amount of data of the environmental data; and determine a target mapping function from the plurality of preset mapping functions according to the compression ratio and the dynamic energy parameter.

[0149] In an embodiment, the compression processing module is further configured to, in a case where the comprehensive weight is less than a first preset weight, set the compression parameter to a first preset value; in a case where the comprehensive weight is greater than or equal to the first preset weight and less than a second preset weight, set the compression parameter to be positively correlated with the comprehensive weight, and set the compression parameter to be greater than or equal to the first preset value; and in a case where the comprehensive weight is greater than or equal to the second preset weight, set the compression parameter to a second preset value, and set the second preset value to be greater than the first preset value.

[0150] The above-mentioned modules in the data compression device can be realized by software, hardware, or a combination thereof. The above-mentioned modules can be embedded in or independent of a processor in a computer device in a hardware form, or stored in a memory in a computer device in a software form, so as to be called and executed by a processor to perform operations corresponding to the above-mentioned modules.

[0151] In an exemplary embodiment, a computer device is provided, which can be a server, and an internal structure diagram of the computer device can be as shown in Figure 7 The computer device includes a processor, a memory, an input / output interface, and a communication interface. The processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The database of the computer device is configured to store compressed data. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with external terminals through a network connection. The computer program is executed by the processor to implement a data compression method.

[0152] Those skilled in the art can understand that Figure 7 The structure shown in the above-mentioned embodiments is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. Specifically, the computer device can include more or fewer components than those shown in the diagram, or combine certain components, or have a different arrangement of components.

[0153] In an exemplary embodiment, a computer device is provided, comprising a memory and a processor, the memory has stored therein a computer program, and the processor implements the data compression method provided by any of the above embodiments when executing the computer program.

[0154] In an exemplary embodiment, a computer device is provided, comprising a memory and a processor, the memory has stored therein a computer program, and the processor implements the data compression method provided by any of the above embodiments when executing the computer program.

[0155] In an exemplary embodiment, a computer device is provided, comprising a memory and a processor, the memory has stored therein a computer program, and the processor implements the data compression method provided by any of the above embodiments when executing the computer program.

[0156] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.

[0157] The technical features of the above embodiments can be combined in any manner. To make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combinations of the technical features do not exist contradictions, they should be considered as the scope of the present application.

[0158] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.

Claims

1. A data compression method, characterized in that, The method includes: The system acquires energy data from nodes, environmental data collected by the nodes, and spatiotemporal information of the environmental data. Each node includes multiple data acquisition points, and the environmental data includes multiple sets of data. Each data acquisition point is used to collect one set of data. Based on the spatiotemporal information, the spatiotemporal correlation coefficient of the environmental data is determined. Specifically, based on the spatiotemporal information, two sets of data in the environmental data that meet preset correlation conditions are identified as target data pairs. The correlation coefficient of the target data pairs is determined based on their covariance and standard deviation. The spatiotemporal weighting factor of the target data pairs is determined based on the correlation coefficient and the spatiotemporal information. The spatiotemporal correlation coefficient of the target data pairs is determined based on the spatiotemporal weighting factor and the correlation coefficient. The spatiotemporal correlation coefficient of the environmental data is then determined based on the spatiotemporal correlation coefficient of the target data pairs. The spatiotemporal correlation coefficient is used to assess the redundancy of the environmental data. The dynamic energy parameters of the node are determined based on the energy data; the dynamic energy parameters are used to represent the remaining energy of the node; specifically, the initial energy of the node at the initial moment is obtained; the energy consumed by the node from the initial moment to the current moment is obtained; and the remaining energy of the node at the current moment is obtained based on the initial energy and the consumed energy. The environmental data is compressed based on the dynamic energy parameters and the spatiotemporal correlation coefficient. Specifically, a comprehensive weight is determined based on the dynamic energy parameters, the spatiotemporal correlation coefficient, and a preset weight coefficient. Redundant information in the environmental data is obtained based on the spatiotemporal information. A compression ratio is determined based on the redundant information and the total amount of environmental data. A target mapping function is determined from multiple preset mapping functions based on the compression ratio and the dynamic energy parameters. Compression parameters are determined based on the comprehensive weight and the target mapping function, whereby the compression parameters characterize the compression intensity of the compression strategy. Based on the compression parameters, the compression strategy is adjusted to compress the environmental data.

2. The method according to claim 1, characterized in that, The spatiotemporal information includes spatial location information and timestamp information; The step of determining the spatiotemporal weighting factor of the target data pair based on the correlation coefficient and the spatiotemporal information includes: Based on the spatial location information of the target data pair, obtain the spatial distance of the target data pair; Based on the timestamp information of the target data pair, obtain the collection time difference of the target data pair; Based on the correlation coefficient, the spatial distance, the acquisition time difference, and preset hyperparameters and preset similarity decay parameters, the spatiotemporal weighting factor of the target data pair is determined.

3. The method according to claim 1, characterized in that, The step of determining the compression parameters based on the comprehensive weights and the target mapping function includes: If the overall weight is less than the first preset weight, the compression parameter is the first preset value; When the overall weight is greater than or equal to the first preset weight and less than the second preset weight, the compression parameter is positively correlated with the overall weight, and the compression parameter is greater than or equal to the first preset value. When the overall weight is greater than or equal to the second preset weight, the compression parameter is a second preset value, and the second preset value is greater than the first preset value.

4. The method according to claim 1, characterized in that, The preset weighting coefficients include energy weighting coefficients and correlation weighting coefficients.

5. The method according to claim 1, characterized in that, The spatiotemporal information of the environmental data includes the spatial location information and timestamp information of the environmental data; The preset association condition is at least one of the following: the difference between the timestamps of the two sets of data is less than a threshold Δt, and the spatial distance between the two sets of data is less than a threshold Δs.

6. A data compression device, characterized in that, The device includes: The data acquisition module is used to acquire the energy data of the node, the environmental data collected by the node, and the spatiotemporal information of the environmental data; the node includes multiple data acquisition points, the environmental data includes multiple sets of data, and each data acquisition point is used to collect one set of data. The spatiotemporal correlation analysis module is used to determine the spatiotemporal correlation coefficient of the environmental data based on the spatiotemporal information. Specifically, based on the spatiotemporal information, it identifies two sets of data in the environmental data that meet preset correlation conditions as target data pairs; it determines the correlation coefficient of the target data pairs based on their covariance and standard deviation; it determines the spatiotemporal weighting factor of the target data pairs based on the correlation coefficient and the spatiotemporal information; it determines the spatiotemporal correlation coefficient of the target data pairs based on the spatiotemporal weighting factor and the correlation coefficient; and it determines the spatiotemporal correlation coefficient of the environmental data based on the spatiotemporal correlation coefficient of the target data pairs. The spatiotemporal correlation coefficient is used to assess the redundancy of the environmental data. An energy sensing module is used to determine the dynamic energy parameters of the node based on the energy data; the dynamic energy parameters are used to represent the remaining energy of the node; specifically, it obtains the initial energy of the node at an initial moment; obtains the energy consumed by the node from the initial moment to the current moment; and obtains the remaining energy of the node at the current moment based on the initial energy and the consumed energy. The compression processing module is used to compress the environmental data based on the dynamic energy parameters and the spatiotemporal correlation coefficient. Specifically, it determines a comprehensive weight based on the dynamic energy parameters, the spatiotemporal correlation coefficient, and a preset weight coefficient; obtains the amount of redundant information in the environmental data based on the spatiotemporal information; determines a compression ratio based on the amount of redundant information and the total amount of data in the environmental data; determines a target mapping function from multiple preset mapping functions based on the compression ratio and the dynamic energy parameters; determines compression parameters based on the comprehensive weight and the target mapping function, the compression parameters being used to characterize the compression intensity of the compression strategy; and adjusts the compression strategy based on the compression parameters to compress the environmental data.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Mobile traffic prediction system and method based on regional spatial-temporal characteristics

    CN115913996A

  • Equipment state intelligent early warning method based on danger perception

    CN119669880A