CN115118788B - Time sequence data compression method and device, wearable intelligent equipment and storage medium - Google Patents

Time sequence data compression method and device, wearable intelligent equipment and storage medium Download PDF

Info

Publication number
CN115118788B
CN115118788B CN202210752281.0A CN202210752281A CN115118788B CN 115118788 B CN115118788 B CN 115118788B CN 202210752281 A CN202210752281 A CN 202210752281A CN 115118788 B CN115118788 B CN 115118788B
Authority
CN
China
Prior art keywords
value
capacity
sequence
differential
difference
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210752281.0A
Other languages
Chinese (zh)
Other versions
CN115118788A (en
Inventor
房晨
赵国朕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zhongke Xinyan Technology Co ltd
Original Assignee
Beijing Zhongke Xinyan Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zhongke Xinyan Technology Co ltd filed Critical Beijing Zhongke Xinyan Technology Co ltd
Priority to CN202210752281.0A priority Critical patent/CN115118788B/en
Publication of CN115118788A publication Critical patent/CN115118788A/en
Application granted granted Critical
Publication of CN115118788B publication Critical patent/CN115118788B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/01Measuring temperature of body parts ; Diagnostic temperature sensing, e.g. for malignant or inflamed tissue
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/02Detecting, measuring or recording pulse, heart rate, blood pressure or blood flow; Combined pulse/heart-rate/blood pressure determination; Evaluating a cardiovascular condition not otherwise provided for, e.g. using combinations of techniques provided for in this group with electrocardiography or electroauscultation; Heart catheters for measuring blood pressure
    • A61B5/0205Simultaneously evaluating both cardiovascular conditions and different types of body conditions, e.g. heart and respiratory condition
    • A61B5/02055Simultaneously evaluating both cardiovascular condition and temperature
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/02Detecting, measuring or recording pulse, heart rate, blood pressure or blood flow; Combined pulse/heart-rate/blood pressure determination; Evaluating a cardiovascular condition not otherwise provided for, e.g. using combinations of techniques provided for in this group with electrocardiography or electroauscultation; Heart catheters for measuring blood pressure
    • A61B5/026Measuring blood flow
    • A61B5/0261Measuring blood flow using optical means, e.g. infrared light
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/68Arrangements of detecting, measuring or recording means, e.g. sensors, in relation to patient
    • A61B5/6801Arrangements of detecting, measuring or recording means, e.g. sensors, in relation to patient specially adapted to be attached to or worn on the body surface
    • A61B5/6802Sensor mounted on worn items
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/38Services specially adapted for particular environments, situations or purposes for collecting sensor information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Abstract

The invention relates to a time sequence data compression method, a time sequence data compression device, wearable intelligent equipment and a storage medium, wherein the method comprises the following steps: receiving target data, wherein the target data comprises an original sequence formed by a plurality of values, and the original storage capacity of the values in the original sequence is a first capacity; compressing the target data so as to perform subsequent processing by using the compressed target data; wherein the compressing the target data comprises: selecting a reference value according to the original sequence, and making a difference between each value in the original sequence and the reference value to obtain a difference sequence; storing the reference value at a first capacity; and storing each differential value in the differential sequence. By utilizing the time sequence data compression method, the data transmission performance of wearable intelligent equipment such as the intelligent bracelet and the like can be improved.

Description

Time sequence data compression method and device, wearable intelligent equipment and storage medium
Technical Field
The invention relates to the technical field of wearable intelligent equipment, in particular to a time sequence data compression method and device, wearable intelligent equipment and a storage medium.
Background
The statements herein merely provide background information related to the present disclosure and may not necessarily constitute prior art.
Wearable smart machines such as intelligent bracelet have integrated sensor more, characteristics such as sampling rate height. In the usage scenario of the wearable smart device, there are often group usage scenarios, for example, in daily life, more than 20 bracelets may be simultaneously present in an operating state in a small range. Moreover, the wearable intelligent device often adopts a Bluetooth communication mode with a smaller bandwidth, so that a more serious interference phenomenon can occur when multiple devices work simultaneously. Therefore, how to improve the data transmission performance of wearable intelligent devices such as smart bands is an urgent problem to be solved.
Disclosure of Invention
The invention aims to provide a novel time sequence data compression method, a novel time sequence data compression device and a novel time sequence data compression storage medium, and mainly solves the problem of how to improve the data transmission performance of wearable intelligent equipment such as an intelligent bracelet and the like.
The purpose of the invention is realized by adopting the following technical scheme. The invention provides a time sequence data compression method for wearable intelligent equipment, which comprises the following steps: receiving target data, wherein the target data comprises an original sequence formed by a plurality of values, and the original storage capacity of the values in the original sequence is a first capacity; and compressing the target data; wherein the compressing the target data comprises: selecting a reference value according to the original sequence, and making a difference between each value in the original sequence and the reference value to obtain a difference sequence; storing the reference value at a first capacity; and storing each differential value in the differential sequence.
The object of the present application can be further achieved by the following technical measures.
In some embodiments, the target storage capacity for values in the original sequence is a second capacity m, the second capacity being less than the first capacity; the storing each differential value in the differential sequence includes: judging whether the maximum value and the minimum value in the differential sequence are in the expression range of a second capacity m, if so, storing each differential value in the differential sequence by the second capacity m, and if not: for each differential value in the differential sequence, judging whether the differential value is in an expression range of capacity m-1, if so, storing the differential value by using a second capacity m, and if not, storing the differential value by using a third capacity k, wherein the third capacity k is at least required by a value with the maximum absolute value in the differential sequence; when the difference value is stored, a first storage bit in the capacity is used for identifying whether the difference value is stored in a second capacity m or a third capacity k, and other storage bits in the capacity are used for storing data of the difference value.
In some embodiments, the storing each differential value in the differential sequence further comprises: negative numbers are stored in complementary form.
In some embodiments, said selecting a reference value according to the original sequence comprises: selecting a reference value according to one or more values of a value in the original sequence, which is located in a preset sequence number, or a maximum value in the original sequence, a minimum value in the original sequence, or a median in the original sequence.
In some embodiments, the selecting a reference value according to the original sequence and subtracting each value in the original sequence from the reference value to obtain a difference sequence includes: selecting a value of a first item in the original sequence as a first alternative reference value, subtracting the first alternative reference value from the value in the original sequence to obtain a first alternative difference sequence, and determining the reference value and the difference sequence as the first alternative reference value and the first alternative difference sequence; or, selecting a second candidate reference value as a minimum value, or a maximum value, or an average value of the maximum value and the minimum value in the original sequence, subtracting the second candidate reference value from the value in the original sequence to obtain a second candidate difference sequence, and determining the reference value and the difference sequence as the second candidate reference value and the second candidate difference sequence; or, selecting a median in the original sequence as a third candidate reference value, subtracting the third candidate reference value from the value in the original sequence to obtain a third candidate difference sequence, and determining the reference value and the difference sequence as the third candidate reference value and the third candidate difference sequence.
In some embodiments, the wearable smart device is a physiological data acquisition device, the wearable smart device is configured with a sensor for acquiring physiological data, and the target data is physiological data.
In some embodiments, the target data is photoplethysmography data.
In some embodiments, the plurality of values of the original sequence are all integer values; the storing the reference value at the first capacity includes: storing the reference value in a type of signed integer or unsigned integer and in a first capacity; the determining, for each difference value in the difference sequence, whether the difference value is in an expression range of a capacity m-1, if so, storing the difference value with a second capacity m, and if not, storing the difference value with a third capacity k, including: for each differential value in the differential sequence, judging whether the differential value is in a range of signed integer or unsigned integer expressible in a capacity m-1 space, if so, storing the differential value in a second capacity m, wherein a first storage bit of the second capacity m is used for identifying that the differential value is stored in the second capacity m, and second to mth storage bits of the second capacity m are used for storing data of the differential value in a signed integer or unsigned integer type; and if not, storing the differential value by using a third capacity k, wherein the first storage bit of the third capacity k is used for identifying that the differential value is stored by using the third capacity k, and the second to k storage bits of the third capacity k are used for storing the data of the differential value by using a signed integer type or an unsigned integer type.
The purpose of the invention is realized by adopting the following technical scheme. According to this time series data compression device who puts forward of this disclosure for wearable smart machine includes: the receiving module is used for receiving target data; the target data comprises an original sequence formed by a plurality of values, and the original storage capacity of the values in the original sequence is a first capacity; the compression module is used for compressing the target data; the compression module specifically comprises a first compression unit and a second compression unit; the first compression unit is to: selecting a reference value according to the original sequence, and subtracting each value in the original sequence from the reference value to obtain a difference sequence; the second compression unit is to: storing the reference value at a first capacity; and storing each differential value in the differential sequence.
The object of the present application can be further achieved by the following technical measures.
In some embodiments, the target storage capacity of values in the original sequence is a second capacity m, the second capacity being less than the first capacity; the second compression unit is specifically configured to: judging whether the maximum value and the minimum value in the differential sequence are in an expression range of a second capacity m, if so, storing each differential value in the differential sequence by the second capacity m, and if not: for each differential value in the differential sequence, judging whether the differential value is in an expression range of capacity m-1, if so, storing the differential value by using a second capacity m, and if not, storing the differential value by using a third capacity k, wherein the third capacity k is at least required by a value with the maximum absolute value in the differential sequence; when the difference value is stored, a first storage bit in the capacity is used for identifying whether the difference value is stored in a second capacity m or a third capacity k, and other storage bits in the capacity are used for storing data of the difference value.
In some embodiments, the second compression unit is further to: the negative numbers are stored in complementary form.
In some embodiments, the first compression unit is specifically configured to: selecting a reference value according to one or more values of a value located in a preset sequence number in the original sequence, or a maximum value in the original sequence, a minimum value in the original sequence, or a median in the original sequence.
In some embodiments, the first compression unit is specifically configured to: selecting a value of a first item in the original sequence as a first alternative reference value, subtracting the first alternative reference value from the value in the original sequence to obtain a first alternative difference sequence, and determining the reference value and the difference sequence as the first alternative reference value and the first alternative difference sequence; or, selecting a second candidate reference value as a minimum value, or a maximum value, or an average value of the maximum value and the minimum value in the original sequence, subtracting the second candidate reference value from the value in the original sequence to obtain a second candidate difference sequence, and determining the reference value and the difference sequence as the second candidate reference value and the second candidate difference sequence; or, selecting a median in the original sequence as a third candidate reference value, subtracting the third candidate reference value from the value in the original sequence to obtain a third candidate difference sequence, and determining the reference value and the difference sequence as the third candidate reference value and the third candidate difference sequence.
In some embodiments, the wearable smart device is a physiological data acquisition device configured with a sensor for acquiring physiological data, and the target data is physiological data.
In some embodiments, the target data is photoplethysmography data.
In some embodiments, the plurality of values of the original sequence are all integer values; the storing the reference value at a first capacity includes: storing the reference value in a type of signed integer or unsigned integer and in a first capacity; the determining, for each difference value in the difference sequence, whether the difference value is in an expression range of a capacity m-1, if so, storing the difference value with a second capacity m, and if not, storing the difference value with a third capacity k, including: for each differential value in the differential sequence, judging whether the differential value is in a range of signed integer or unsigned integer expressible in a capacity m-1 space, if so, storing the differential value by a second capacity m, wherein a first storage bit of the second capacity m is used for identifying that the differential value is stored by the second capacity m, and second to mth storage bits of the second capacity m are used for storing data of the differential value by a signed integer or unsigned integer type; and if the difference value is not stored in the third capacity k, storing the difference value in the third capacity k by using a first storage bit of the third capacity k for identifying that the difference value is stored in the third capacity k, and storing data of the difference value in a signed integer type or an unsigned integer type by using second to kth storage bits of the third capacity k.
The purpose of the invention is realized by adopting the following technical scheme. According to this wearable smart machine that this disclosure proposes, include: a memory to store non-transitory readable instructions; and the processor is used for executing the readable instructions, so that the processor can realize any one of the time series data compression methods when executing the readable instructions.
The purpose of the invention is realized by adopting the following technical scheme. A computer-readable storage medium according to the present disclosure is provided for storing non-transitory computer-readable instructions which, when executed by a computer, cause the computer to perform any one of the aforementioned time series data compression methods.
Compared with the prior art, the invention has obvious advantages and beneficial effects. By means of the technical scheme, the time sequence data compression method, the time sequence data compression device, the wearable intelligent equipment and the storage medium can effectively compress data volume of data (such as physiological data including photoplethysmography data) in a transmission process, and performance can be effectively improved even in a transmission mode with low communication bandwidth such as Bluetooth; the problem of wearable smart machine such as bracelet when passing through the bluetooth transmission, because the bluetooth bandwidth is not enough that the sensor is many and the sampling rate height causes is solved.
The foregoing description is only an overview of the technical solutions of the present invention, and in order to make the technical solutions of the present invention more clearly understood, the present invention may be implemented in accordance with the content of the description, and in order to make the above and other objects, features, and advantages of the present invention more clearly understood, the following preferred embodiments are specifically described below with reference to the accompanying drawings.
Drawings
FIG. 1 is a flow chart of a method of compressing time series data according to an embodiment of the invention;
FIG. 2 is a flow chart illustrating a sequential data compression method according to another embodiment of the present invention;
FIG. 3 is a schematic diagram of a sequential data compression device according to an embodiment of the invention;
fig. 4 is a schematic diagram of a wearable smart device of one embodiment of the invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed descriptions are provided for the specific implementation, structure, features and effects of the time sequence data compression method, apparatus, wearable intelligent device and storage medium according to the present invention, with reference to the accompanying drawings and preferred embodiments.
It is noted that, in this document, relational terms such as "first," "second," and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. In addition, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The problem of how to improve wearable smart machine's such as intelligent bracelet data transmission performance is compressed to transmission data and is an effective means of optimizing transmission stability.
FIG. 1 is a schematic flow chart diagram illustrating one embodiment of a method for compressing time series data according to the present invention. In some embodiments of the present invention, referring to fig. 1, a time series data compression method according to an example of the present invention is applied to a wearable smart device, and the method mainly includes steps S11 to S12.
Step S11, receiving target data. Wherein the target data comprises an original sequence of values. The ordering of the values in the original sequence is generally time-dependent, and may be arranged chronologically, for example, and is therefore also referred to as time series data. For example, the target data comprises an original sequence X consisting of n values X1, X2 \8230n, xn being a positive integer greater than or equal to 2. Wherein the original storage capacity of the values in the original sequence X is the first capacity.
Optionally, the target data may be transmission data between modules of the wearable smart device, for example, after data is acquired from a sensor, the data is sent to a computing unit and a storage unit for further processing; or data to be stored; but also data to be transmitted from the wearable smart device to other devices, etc.
Optionally, the wearable smart device may be a physiological data acquisition device configured with a sensor for acquiring physiological data, and the target data may be physiological data, such as body temperature, heart rate, pulse, etc. Alternatively, the target data may be photoplethysmography (PPG) data. Among them, photoplethysmography (PPG) is a method that can be used to extract pulse wave signals, and is a non-invasive detection method that can detect changes in blood volume by means of photoelectricity, and can accurately trace the contraction and relaxation of microvessels. The principle is as follows: after the light beam with a certain wavelength irradiates the surface of the skin at the finger end, the light beam is transmitted to the photoelectric receiver, the detected light intensity is weakened under the absorption and attenuation effects of blood at the finger end and skin muscle, the absorption of the skin, the muscle, tissue and the like to the light is constant in the whole blood circulation, the blood and the volume in the skin are changed in a pulsating mode under the action of the heart, the light intensity received by the optical receiver is changed in a pulsating mode, the light intensity change signal is converted into an electric signal, then the change graph of the volume pulse blood flow can be obtained, and the wave trough and the wave crest of the electric signal respectively correspond to the relaxation and the contraction of the microvascular.
In one specific example, if the sampling rate of the PPG data is n HZ, a packet of PPG data may include n integer values, which may constitute the aforementioned original sequence X. Optionally, the first capacity of the PPG data is 32 bits.
And S12, compressing the target data so as to perform subsequent processing by using the compressed target data.
Wherein, the step S12 may include steps S121 to S123.
Step S121, selecting a reference value according to the original sequence X, and subtracting each value in the original sequence X from the reference value to obtain a difference sequence (also referred to as a difference value sequence). This step may also be referred to as a value processing process, or a value compression process.
Step S122, storing the reference value with a first capacity;
in step S123, each difference value in the difference sequence is stored. In general, the respective differential values in the differential sequence may be stored sequentially.
It should be noted that the time series data compression method of the present invention is applicable to any wearable smart device, including but not limited to: smart watches, smart bracelets, wearable smart health devices such as smart sphygmomanometers, smart near-to-eye display devices such as augmented reality glasses (AR glasses for short) virtual reality glasses (VR glasses for short), and the like. The time series data compression method of the invention is especially suitable for at least one part of sampling data, equipment and sensors with the storage data capable of being expressed by a series.
By utilizing the time sequence data compression method provided by the invention, the size of each value in the original sequence can be compressed by carrying out the value processing process, thereby being beneficial to reducing the storage space occupied when the target data is stored and the bandwidth occupied when the target data is transmitted.
FIG. 2 is a schematic flow chart diagram illustrating another embodiment of a method for compressing time series data according to the present invention. In some embodiments of the present invention, referring to fig. 2, the time series data compression method of the present invention mainly includes the steps S11 to S12, and the step S12 may include the steps S121 to S123. And the step S123 may include a memory space processing procedure (which may also be referred to as a footprint compression procedure, or a memory compression procedure). Specifically, the step S123 may include a step S1231 to a step S1232. Wherein the target storage capacity of the values in the original sequence X is a second capacity m (e.g., m bits), wherein the second capacity is smaller than the first capacity.
Step S1231, determining whether the maximum value and the minimum value in the differential sequence are within an expression range of a second capacity m, and if yes, storing each differential value in the differential sequence with the second capacity m, where each storage bit in the capacity is used for storing data of the differential value; if the result of this determination is negative, the following step S1232 is executed.
Step S1232, for each difference value in the difference sequence, determining whether the difference value is in an expression range of a capacity m-1 (the second capacity minus one stored bit), if the determination result is yes, storing the difference value with the second capacity m, and if the determination result is no, storing the difference value with a third capacity k, where the third capacity k is a capacity at least required to be occupied by a value with the largest absolute value in the difference sequence, or the third capacity k may also be a capacity at least required by a value with the largest occupied space in the original sequence (generally, the largest value in the original sequence); when storing the differential value, the first storage bit (for example, bit 1) in the capacity is a differential overflow bit for identifying whether the differential value is stored in the second capacity m or the third capacity k, and the other storage bits in the capacity are differential value storage bits for storing data of the differential value. Specifically, if the difference value can be expressed by a capacity m-1, storing the difference value by a second capacity m, where a first storage bit (e.g., a 1 st bit) of the second capacity m is used to identify that the difference value is stored by the second capacity m, and for example, if the value of the first storage bit is 0, the storage bit is stored by the second capacity m, and other storage bits (e.g., 2 nd to mth bits) of the second capacity m are used to store data of the difference value; and if the differential value exceeds the expression range of the capacity m-1, storing the differential value with a third capacity k, wherein a first storage bit (for example, the 1 st bit) with the third capacity k is used for identifying that the differential value is stored with the third capacity k, for example, if the value of the first storage bit is 1, the storage bit is stored with the third capacity k, and other storage bits (for example, the 2 nd to the kth bits) with the third capacity k are used for storing data of the differential value.
It is noted that the stored characteristic is that the larger the stored value, the larger the required capacity, so the maximum value is the value in the array where the required capacity is the largest.
It should be noted that if there is a negative number in the differential sequence, a storage manner with a sign bit is adopted, and the value with the largest occupied capacity in the differential sequence is the largest positive number or the smallest negative number, i.e. the value with the largest absolute value in the differential sequence; if the difference sequences are all necessarily positive numbers, for example, the reference value is determined according to the minimum value in the original sequence, a storage manner without a sign bit may be adopted, and the value with the largest occupied capacity in the difference sequence is the largest positive number, that is, the value with the largest absolute value in the difference sequence.
Optionally, when storing each difference value in the difference sequence, step S123 further includes: the negative numbers are stored in complementary form.
It is noted that the reference value may be determined in various ways. In some embodiments of the present invention, the step S121 may include: the reference value is selected according to one or more of a value in the original sequence at a preset sequence number (also referred to as a position), or a maximum value in the original sequence, a minimum value in the original sequence, or a median in the original sequence. It should be noted that the aforementioned selecting the reference value according to one or more values may be selecting one of the values as the reference value, or may be combining two or more alternative values to obtain the reference value, including but not limited to: selecting the maximum value of some or all of the values as a reference value, or selecting the minimum value of some or all of the values as a reference value, or selecting the average value of some or all of the values as a reference value.
As a specific example of selecting the reference value, the step S121 may include:
step S1211, selecting a value in the original sequence at a preset sequence number as a first candidate reference value, for example, a first item x1 in the original sequence may be selected as the first candidate reference value, subtracting the first candidate reference value from the value in the original sequence to obtain a first candidate difference sequence Y1, and determining the first candidate reference value and the first candidate difference sequence as a reference value and a difference sequence; or
Step S1212, selecting the second candidate reference value as a minimum value min (X) in the original sequence, or a maximum value max (X) in the original sequence, or an average value (max (X) + min (X))/2 of the maximum value and the minimum value in the original sequence, subtracting the second candidate reference value from the value in the original sequence to obtain a second candidate difference sequence Y2, and determining the second candidate reference value and the second candidate difference sequence as a reference value and a difference sequence; or
Step S1213, selecting a median in the original sequence X as a third candidate reference value, subtracting the third candidate reference value from the value in the original sequence to obtain a third candidate difference sequence Y3, and determining the third candidate reference value and the third candidate difference sequence as a reference value and a difference sequence.
Note that in some examples, integer division (also referred to as integer division) employed by computers, mobile terminals, smart devices results in integers, which can be achieved by virtually directly truncating the remainder. Thus, in some examples, the n values X1, X2 \ 8230xn of the original sequence X are integer values, and the values in the differential sequence obtained in the above manner are also integer values, which is advantageous for data storage. For example, the second candidate reference value obtained by (max (X) + min (X))/2 and the corresponding second candidate difference sequence are integer values.
In some embodiments of the invention, n values X1, X2 \ 8230of the original sequence X, xn is an integer value. The aforementioned storing the reference value at the first capacity in step S122 may include: the reference value is stored in a first capacity in a type of signed integer or unsigned integer. In the foregoing step S1232, for each difference value in the difference sequence, determining whether the difference value is in the expression range of the capacity m-1, if so, storing the difference value with the second capacity m, and if not, storing the difference value with the third capacity k, including: for each differential value in the differential sequence, judging whether the differential value is in a range of signed integer or unsigned integer expressible in a capacity m-1 (for example, (m-1) bit) space, if so, storing the differential value by a second capacity m, wherein a first storage bit (for example, the 1 st bit) of the second capacity m is used for identifying that the differential value is stored by the second capacity m, and second to mth storage bits of the second capacity m are used for storing data of the differential value by signed integer or unsigned integer; if not, storing the differential value with a third capacity k, wherein a first storage bit (for example, the 1 st bit) of the third capacity k is used for identifying that the differential value is stored with the third capacity k, and second to k storage bits of the third capacity k are used for storing data of the differential value with a signed integer type or an unsigned integer type. It should be noted that the reference value and the difference value are stored in signed or unsigned integer, which is related to the selection of the reference value, when each difference value in the difference sequence must be of the same sign, for example, the reference value is selected as the minimum value in the original sequence, then unsigned integer may be used for storage, and signed integer may be used for storage when each difference value in the difference sequence may have positive or negative numbers.
In an embodiment of the present invention, the time series data compression method takes a packet of PPG data as an example: assuming that the sampling rate is n HZ, a packet of data has n integer values, which is assumed to be sequence X (X1, X2 \8230; xn). Suppose that 32bit integer requires compression to m bit storage. Assuming that the maximum value of the difference value requires at least k bits to be stored, k > = m. The time series data compression method for the PPG data provided by the invention can comprise the following value processing process and value storage mode.
And (3) value processing:
1. selecting x1 as a reference value, and subtracting the reference value from all the values in the sequence to obtain a new sequence Y1;
2. a reference value = (max (X) + min (X))/2, and a new sequence Y2 is obtained after the reference value is subtracted from all the values in the sequence;
3. the reference value = the median of the X sequence, and the new sequence Y3 is obtained by subtracting the reference values from all the values in the sequence.
Note that one of the three alternatives Y1, Y2, Y3 described above may be selected as the reference value according to circumstances. Among them, Y1 has the smallest amount of calculation, and Y2 has the highest compression ratio. It should be noted that the selection of the reference value affects the compression efficiency, and the reference value selected by the present example can achieve a better compression effect.
The value storage mode is as follows:
step one, storing a reference value in a 32bit space in a signed integer type;
and step two, storing the difference values of the data in sequence.
Wherein, the second step is specifically as follows.
a) When the maximum value and the minimum value of the differential value sequence are in the expression range of the m-bit space, the differential value is stored in the m-bit space, and if the maximum value and the minimum value of the differential value sequence exceed the expression range, the following steps are used for storing.
b) Whether the difference value is in a (m-1) bit space expressible signed integer range, if so, storing the difference value by using m bits, and if not, storing the difference value by using k bits.
c) When the differential value is stored, the 1 st bit is a differential overflow bit, if the differential overflow bit is 0, the differential overflow bit represents that the differential overflow bit uses m bit for storage, and if the differential overflow bit is 1, the differential overflow bit represents that the differential overflow bit uses k bit for storage.
d) The data other than the 1 st bit differential overflow bit is a differential value, which is a signed integer of one (m-1) bit or (k-1) bit.
e) The negative numbers are stored in complementary form.
In another alternative example, Y2 in the foregoing value processing procedure may be replaced with: the reference value = min (x) or max (x). Also, in this example, the storage of values may be replaced with unsigned integer storage.
FIG. 3 is a schematic block diagram of a sequential data compression apparatus according to one embodiment of the present invention. Referring to fig. 3, an embodiment of the invention further provides a time sequence data compression apparatus 100, which is used for a wearable smart device, and the apparatus mainly includes: a receive module 110 and a compression module 120. The receiving module 101 is configured to: target data is received. The target data comprises an original sequence composed of a plurality of values, for example, the target data comprises an original sequence X composed of n values X1 and X2 \8230, and xn is a positive integer. Wherein the original storage capacity of the values in the original sequence is a first capacity. The compression module 120 is configured to: and compressing the target data.
The compression module 120 specifically includes a first compression unit 121 and a second compression unit 122. The first compression unit 121 is configured to: and selecting a reference value according to the original sequence, and subtracting each value in the original sequence from the reference value to obtain a difference sequence. The second compression unit 122 is configured to: storing the reference value in a first capacity; and storing each differential value in the differential sequence.
In addition, the various time series data compression apparatuses 100 shown in the embodiments of the present invention include modules and units for executing the methods described in the foregoing embodiments, and for detailed description and technical effects, reference may be made to corresponding descriptions in the foregoing embodiments, which are not described herein again.
Fig. 4 is a schematic block diagram illustrating a wearable smart device according to one embodiment of the present invention. As shown in fig. 4, a wearable smart device 200 according to an embodiment of the present disclosure includes a memory 201 and a processor 202.
The memory 201 is used to store non-transitory computer readable instructions. In particular, memory 201 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, etc.
The processor 202 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the wearable smart device 200 to perform desired functions. In an embodiment of the present disclosure, the processor 202 is configured to execute the computer readable instructions stored in the memory 201, so that the wearable smart device 200 performs all or part of the aforementioned steps of the time-series data compression method according to the embodiments of the present disclosure.
The wearable smart device 200 of the disclosed embodiment includes, but is not limited to: smart watches, smart bracelets, wearable smart health devices such as smart sphygmomanometers, smart near-to-eye display devices such as augmented reality glasses (AR glasses for short) virtual reality glasses (VR glasses for short), and the like.
Those skilled in the art should understand that, in order to solve the technical problem of how to obtain a good user experience, the present embodiment may also include well-known structures such as a communication bus, an interface, and the like, and these well-known structures are also included in the protection scope of the present invention.
For the detailed description and the technical effects of the present embodiment, reference may be made to the corresponding descriptions in the foregoing embodiments, which are not repeated herein.
Embodiments of the present invention further provide a computer storage medium, where computer instructions are stored, and when the computer instructions are executed on a device, the device executes the above related method steps to implement the time series data compression method in the above embodiments.
Embodiments of the present invention further provide a computer program product, which when running on a computer, causes the computer to execute the above related steps to implement the time series data compression method in the above embodiments.
In addition, an embodiment of the present invention further provides an apparatus, which may be specifically a chip, a component or a module, and may include a processor and a memory connected to each other; the memory is used for storing computer execution instructions, and when the device runs, the processor can execute the computer execution instructions stored in the memory, so that the chip can execute the time sequence data compression method in the above-mentioned method embodiments.
The apparatus, the computer storage medium, the computer program product, or the chip provided by the present invention are all configured to execute the corresponding methods provided above, and therefore, the beneficial effects that can be achieved by the apparatus, the computer storage medium, the computer program product, or the chip can refer to the beneficial effects in the corresponding methods provided above, which are not described herein again.
Although the present invention has been described with reference to a preferred embodiment, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A time series data compression method for a wearable intelligent device is characterized by comprising the following steps:
receiving target data, wherein the target data comprises an original sequence formed by a plurality of values, and the original storage capacity of the values in the original sequence is a first capacity;
compressing the target data;
wherein the compressing the target data comprises: selecting a reference value according to the original sequence, and making a difference between each value in the original sequence and the reference value to obtain a difference sequence; storing the reference value at a first capacity; and storing each differential value in the differential sequence.
2. The method of claim 1,
a target storage capacity of values in the original sequence is a second capacity m, the second capacity being smaller than the first capacity;
the storing each differential value in the differential sequence includes:
judging whether the maximum value and the minimum value in the differential sequence are in an expression range of a second capacity m, if so, storing each differential value in the differential sequence by the second capacity m, and if not:
for each differential value in the differential sequence, judging whether the differential value is in an expression range of a capacity m-1, if so, storing the differential value with a second capacity m, and if not, storing the differential value with a third capacity k, wherein the third capacity k is at least required by a value with a maximum absolute value in the differential sequence; when the difference value is stored, a first storage bit in the capacity is used for identifying whether the difference value is stored in a second capacity m or a third capacity k, and other storage bits in the capacity are used for storing data of the difference value.
3. The method of claim 2, wherein the storing each differential value in the differential sequence further comprises: the negative numbers are stored in complementary form.
4. The method according to claim 1 or 2, wherein the selecting the reference value according to the original sequence comprises:
selecting a reference value according to one or more values of a value in the original sequence, which is located in a preset sequence number, or a maximum value in the original sequence, a minimum value in the original sequence, or a median in the original sequence.
5. The method of claim 4, wherein selecting a reference value according to the original sequence and subtracting each value in the original sequence from the reference value to obtain a difference sequence comprises:
selecting a value of a first item in the original sequence as a first alternative reference value, subtracting the first alternative reference value from the value in the original sequence to obtain a first alternative difference sequence, and determining the reference value and the difference sequence as the first alternative reference value and the first alternative difference sequence; or
Selecting a second candidate reference value as a minimum value, or a maximum value, or an average value of the maximum value and the minimum value in the original sequence, subtracting the second candidate reference value from the value in the original sequence to obtain a second candidate difference sequence, and determining the reference value and the difference sequence as the second candidate reference value and the second candidate difference sequence; or
Selecting a median in the original sequence as a third candidate reference value, subtracting the third candidate reference value from the value in the original sequence to obtain a third candidate difference sequence, and determining the reference value and the difference sequence as the third candidate reference value and the third candidate difference sequence.
6. The method of claim 1, wherein the wearable smart device is a physiological data acquisition device configured with sensors for acquiring physiological data, and wherein the target data is photoplethysmography data.
7. The method of claim 2, wherein the plurality of values of the original sequence are integer values;
the storing the reference value at the first capacity includes: storing the reference value in a type of signed integer or unsigned integer and in a first capacity;
the determining, for each differential value in the differential sequence, whether the differential value is in an expression range of a capacity m-1, if yes, storing the differential value with a second capacity m, and if not, storing the differential value with a third capacity k, including: for each differential value in the differential sequence, judging whether the differential value is in a range of signed integer or unsigned integer expressible in a capacity m-1 space, if so, storing the differential value by a second capacity m, wherein a first storage bit of the second capacity m is used for identifying that the differential value is stored by the second capacity m, and second to mth storage bits of the second capacity m are used for storing data of the differential value by a signed integer or unsigned integer type; and if the difference value is not stored in the third capacity k, storing the difference value in the third capacity k by using a first storage bit of the third capacity k for identifying that the difference value is stored in the third capacity k, and storing data of the difference value in a signed integer type or an unsigned integer type by using second to kth storage bits of the third capacity k.
8. A time sequence data compression device for a wearable intelligent device, comprising:
a receiving module for receiving target data; the target data comprises an original sequence formed by a plurality of values, and the original storage capacity of the values in the original sequence is a first capacity;
the compression module is used for compressing the target data;
the compression module specifically comprises a first compression unit and a second compression unit;
the first compression unit is to: selecting a reference value according to the original sequence, and making a difference between each value in the original sequence and the reference value to obtain a difference sequence;
the second compression unit is to: storing the reference value at a first capacity; and storing each differential value in the differential sequence.
9. A wearable smart device, comprising:
a memory for storing non-transitory readable instructions; and
a processor for executing the readable instructions such that the readable instructions, when executed by the processor, implement the method of time series data compression of any of claims 1 to 7.
10. A computer storage medium comprising computer instructions which, when run on an apparatus, cause the apparatus to perform the method of time series data compression of any one of claims 1 to 7.
CN202210752281.0A 2022-06-29 2022-06-29 Time sequence data compression method and device, wearable intelligent equipment and storage medium Active CN115118788B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210752281.0A CN115118788B (en) 2022-06-29 2022-06-29 Time sequence data compression method and device, wearable intelligent equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210752281.0A CN115118788B (en) 2022-06-29 2022-06-29 Time sequence data compression method and device, wearable intelligent equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115118788A CN115118788A (en) 2022-09-27
CN115118788B true CN115118788B (en) 2023-01-31

Family

ID=83331048

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210752281.0A Active CN115118788B (en) 2022-06-29 2022-06-29 Time sequence data compression method and device, wearable intelligent equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115118788B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116996076B (en) * 2023-09-27 2023-12-19 湖北华中电力科技开发有限责任公司 Intelligent management method for electrical energy consumption data of campus equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110266316A (en) * 2019-05-08 2019-09-20 阿里巴巴集团控股有限公司 A kind of data compression, decompressing method, device and equipment
CN113746485A (en) * 2021-08-16 2021-12-03 深圳数联天下智能科技有限公司 Data compression method, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4687215B2 (en) * 2005-04-18 2011-05-25 ソニー株式会社 Image signal processing apparatus, camera system, and image signal processing method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110266316A (en) * 2019-05-08 2019-09-20 阿里巴巴集团控股有限公司 A kind of data compression, decompressing method, device and equipment
CN113746485A (en) * 2021-08-16 2021-12-03 深圳数联天下智能科技有限公司 Data compression method, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115118788A (en) 2022-09-27

Similar Documents

Publication Publication Date Title
WO2017174010A1 (en) A method for fingerprint unlocking and terminal
CN115118788B (en) Time sequence data compression method and device, wearable intelligent equipment and storage medium
CN106691423B (en) The wearable device and signal processing method of health of heart are assessed by heartbeat signal
CN112929695A (en) Video duplicate removal method and device, electronic equipment and storage medium
CN108992054B (en) Pulse signal peak point detection method and device
KR20140060737A (en) Device of transmitting a bio signal, device of receiving the bio signal, and method thereof
CN110755059A (en) Blood pressure waveform monitoring method and device
CN111820876B (en) Dynamic construction method of electroencephalogram spatial filter
CN108125678B (en) Electrocardiosignal direction detection method and device and electronic equipment
US11538846B2 (en) Display, electronic device having the display, and method of estimating bio-information using the electronic device
US20210085259A1 (en) Apparatus and method for estimating bio-information
CN115268831B (en) Floating point data compression method and device, wearable intelligent device and storage medium
WO2020155169A1 (en) Atrial fibrillation screening method and device
CN105796051B (en) Three-dimensional physiology-detecting system and its operating method
CN106686029A (en) Physiological signal compression transmission and reconstruction method and apparatus
CN110852307B (en) Brain-computer interface detection method, system, medium and device based on electroencephalogram signals
CN110693474B (en) Method and device for identifying characteristic points of radial artery pressure waveform dicrotic wave
KR102217928B1 (en) Method and Apparatus for Generating Random Prime
CN112438711B (en) Adaptive physiological information detection method and system
CN116841401B (en) Health monitoring method based on mouse, monitoring unit, mouse and storage medium
CN113827253A (en) Computing device and method for removing noise from electroencephalogram signals
CN114052677B (en) Pulse wave beat quality evaluation method, device, computer equipment and storage medium
US20240000395A1 (en) Heart rate estimation method, device, and computer-readable storage medium
CN110430340A (en) A kind of noise-reduction method and system of pulse array signals
WO2019014388A1 (en) Systems, methods, and media for efficient real-time embedded processing of physiological signals using s transforms

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant