A shared oxygen-enriched instrument data acquisition encryption method and system
By integrating historical usage patterns and real-time physical states into a shared oxygen-enriched instrument to generate a composite entropy source seed, the problem of insufficient key generation quality is solved, improving the security and unpredictability of data encryption, and making it suitable for multi-tenant environments of shared oxygen-enriched instruments.
Patent Information
- Application Number
- CN202511301264.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-12
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-09-12
AI Technical Summary
In shared oxygen enrichment devices, the quality of key generation depends on an unstable entropy source, resulting in insufficient security of the encryption and erasure mechanism, making it vulnerable to attack.
By combining the historical usage patterns of the device with its current physical state, a composite entropy source seed is generated to initialize the pseudo-random number generator and generate a high-quality session key.
It improves the randomness and unpredictability of session keys, enhances the security of the encryption erasure mechanism, prevents keys from being cracked, and is suitable for data security processing in multi-tenant environments.
Smart Images

Figure CN120825338B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology. More specifically, this invention relates to a method and system for encrypting data collected by a shared oxygen enrichment device. Background Technology
[0002] Oxygen enrichment devices are medical devices primarily used for patients with hypoxemia. Shared oxygen enrichment devices allow multiple users to reuse them at different times, offering convenience and increasing usage frequency. However, this also raises serious data privacy challenges. Users' health data, such as blood oxygen saturation, heart rate, and usage duration, are highly sensitive personal information and must be completely deleted after each session to prevent malicious theft by subsequent users or third parties.
[0003] Encryption erasure based on session keys uses a temporarily generated session key to encrypt data and achieves instantaneous and irreversible erasure of data by securely destroying the key. This method only requires deleting the key without moving or overwriting massive amounts of bytes, making it suitable for data security processing in multi-tenant environments, such as data encryption of shared oxygen enrichment devices.
[0004] However, the overall security of encrypted erasure technology relies entirely on the quality of the session key, namely its randomness and unpredictability. In cost-sensitive embedded systems like shared oxygen enrichment devices, dedicated hardware true random number generators are typically lacking. The system must rely on pseudo-random number generators built into the microcontroller unit to generate keys. The entropy sources of these pseudo-random number generators often originate from predictable or unstable physical states within the device, such as chip operating temperature, weak noise from the analog-to-digital converter, or simple system clock counting. When these entropy sources are of low quality or tend to stabilize under certain operating conditions, the generated random number sequences may exhibit regularity, resulting in insufficient session key strength. Attackers could potentially crack the key generation pattern through long-term observation or analysis, thereby predicting or reconstructing the session key, rendering the entire encrypted erasure mechanism ineffective. Summary of the Invention
[0005] To address the technical problem that the quality of key generation depends on an unstable entropy source, the present invention provides solutions in the following aspects.
[0006] In a first aspect, the present invention provides a method for encrypting data collected by a shared oxygen enrichment device, comprising:
[0007] The time when a user initiates a new session is recorded as the target time. Historical session information and target physical data for the target time are obtained. The historical session information includes the usage duration and average oxygen flow rate of several historical sessions, with a preset time window. The target physical data includes the temperature and voltage of all sampling times within the time window before the target time. Based on the usage duration and average oxygen flow rate values and their dispersion in the historical session information, the complexity of the historical session information is obtained. Real-time physical disturbance indicators are obtained based on the temperature and voltage fluctuations of the target physical data. The complexity of the historical session information, the real-time physical disturbance indicators, and the initial random seed are fused to obtain a composite entropy source seed. The composite entropy source seed is used to generate the session key for the target time, completing the encryption of the shared oxygen enrichment instrument's collected data. This includes: using the composite entropy source seed as input to seed the pseudo-random number generator within the microcontroller unit of the shared oxygen enrichment instrument, completing the initialization of the pseudo-random number generator; calling the initialized pseudo-random number generator to generate a session key; during the session corresponding to the target time, using the generated session key to encrypt all collected data from the shared oxygen enrichment instrument and storing it in the storage unit; destroying the session key from the storage unit after the session ends.
[0008] This invention does not rely on a single, unstable physical entropy source. Instead, it dynamically integrates the device's historical usage patterns and real-time physical operating states to construct a highly complex and highly random composite entropy source seed, thereby generating high-quality session keys. By integrating the device's unique historical usage history and real-time physical state fluctuations, this invention creates a highly complex composite entropy source. This makes the randomness and unpredictability of the final generated session key far exceed that of traditional methods relying solely on a single, unstable entropy source, fundamentally solving the key generation quality problem and enhancing the security of the encryption erasure mechanism.
[0009] Preferably, the complexity of the historical session information satisfies the expression:
[0010] ;
[0011] In the formula, Indicates the complexity of historical session information; The coefficient of variation represents the duration of use of historical sessions; The coefficient of variation represents the average oxygen flow rate during historical sessions.
[0012] This invention obtains the complexity of historical session information based on the usage duration and average oxygen flow rate of historical sessions, and can establish an entropy source seed with the characteristics of an oxygen enrichment instrument, thereby improving the uniqueness of the key.
[0013] Preferably, obtaining the coefficient of variation of the usage duration of the historical sessions includes: recording the standard deviation of the usage duration of the historical sessions and the mean of the usage duration of the historical sessions as the coefficient of variation of the usage duration of the historical sessions.
[0014] This invention uses the ratio of the standard deviation to the mean of the usage duration as the coefficient of variation of the usage duration, and takes the usage of historical sessions as a basis, thereby increasing the computational dimension of the complexity of historical session information and providing a foundation for unique entropy source seeds.
[0015] Preferably, obtaining the coefficient of variation of the average oxygen flow rate of the historical sessions includes: taking the standard deviation of the average oxygen flow rate of the historical sessions and the mean of the average oxygen flow rate of the historical sessions as the coefficient of variation of the average oxygen flow rate of the historical sessions.
[0016] Preferably, the real-time physical disturbance index satisfies the expression:
[0017] ;
[0018] In the formula, Indicates real-time physical disturbance indicators; Indicates the number of sampling moments within the time window; This represents the temperature fluctuation at the i-th sampling moment within the time window; This represents the voltage fluctuation at the i-th sampling moment within the time window; This represents the absolute value function.
[0019] This invention obtains real-time physical disturbance indicators based on the physical environment status of the oxygen enrichment instrument, further improving the uniqueness of the entropy source seed and enhancing the data security of the shared oxygen enrichment instrument.
[0020] Preferably, the temperature fluctuation at the i-th sampling moment within the time window includes: recording the temperature difference between the i-th and (i-1)-th sampling moments within the time window as the temperature fluctuation at the i-th sampling moment within the time window.
[0021] Preferably, the voltage fluctuation at the i-th sampling moment within the time window includes: recording the voltage difference between the i-th and (i-1)-th sampling moments within the time window as the voltage fluctuation at the i-th sampling moment within the time window.
[0022] Preferably, the composite entropy source seed satisfies the expression:
[0023] ;
[0024] In the formula, Represents the seed of the composite entropy source; Indicates real-time physical disturbance indicators; Indicates the information complexity of historical sessions; Indicates the initial random number; This represents the XOR function.
[0025] This invention combines the unique historical session information and real-time physical disturbance indicators of a shared oxygen enrichment instrument to generate a composite entropy source seed that is device-specific. This ensures that even devices of the same model can generate unique session key sequences.
[0026] Preferably, the initial random number is obtained by generating the initial random number through a pseudo-random number generator built into the microcontroller of the shared oxygen enrichment instrument.
[0027] Secondly, the present invention provides a shared oxygen enrichment instrument data encryption system, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned shared oxygen enrichment instrument data encryption method is implemented.
[0028] By adopting the above technical solution, the above-mentioned method for encrypting data collected by a shared oxygen enrichment instrument is used to generate a computer program, which is then stored in a memory for loading and execution by a processor. This allows for the creation of a terminal device based on the memory and processor, making it convenient to use.
[0029] The beneficial effects of this invention are as follows:
[0030] (1) Based on the uniqueness of the data of the shared oxygen enrichment instrument, the present invention establishes an entropy source seed so that the key can achieve one key per machine, making it impossible for attackers to predict the key pattern of another device by analyzing one device, thereby improving the data security of the shared oxygen enrichment instrument.
[0031] (2) This invention does not require the addition of an extra, expensive hardware true random number generator chip, and is compatible with different types of shared oxygen enrichment devices, thus expanding its scope of application;
[0032] (3) The complexity of the historical session information of the present invention serves as a stable contribution source. Even when the device is in a stable physical environment with constant temperature and pressure for a long time, it can provide a sufficient complexity basis for the entropy source seed, thus ensuring the robustness of the key quality under various working environments. Attached Figure Description
[0033] Figure 1 This is a flowchart illustrating a method for encrypting data collected by a shared oxygen enrichment device according to the present invention. Detailed Implementation
[0034] This invention discloses a method for encrypting data collected by a shared oxygen enrichment device, referring to... Figure 1 This includes steps S1-S3:
[0035] S1: Record the time when a user starts a new session as the target time, obtain the historical session information and target physical data of the target time. The historical session information includes the usage duration and average oxygen flow of several historical sessions, and the target physical data includes the temperature and voltage within the time window before the target time.
[0036] It should be noted that during the acquisition of entropy source data, considering that more frequently used oxygen enrichment devices require higher key complexity, the historical information of shared oxygen enrichment devices is used to determine the subsequent entropy source seed. Given that the usage and physical environment of each shared oxygen enrichment device are different, this invention first collects the usage data of the shared oxygen enrichment devices and their corresponding physical environment as factors in constructing the entropy source seed, thus ensuring the uniqueness of the key.
[0037] Specifically, the time when a user initiates a new session is recorded as the target time. Historical session information and target physical data for the target time are acquired. The historical session information includes the usage duration and average oxygen flow rate of several historical sessions. A preset time window is used to collect target physical data within the time window preceding the target time. This target physical data includes temperature and voltage. It should be noted that the time window is set by the implementer based on the actual implementation situation; for example, the time window can be set to 1 minute. The temperature refers to the surface temperature of core components of the oxygen enrichment device, such as the compressor. The voltage is obtained through an internal voltage sensor of the oxygen enrichment device, and the sampling frequency for temperature and voltage can be set to 10Hz. The amount of historical session information is set by the implementer based on the actual implementation situation; for example, one week's worth of historical session information can be collected.
[0038] At this point, the historical session information and target physical data for the target time have been obtained.
[0039] S2: Based on the usage duration, average oxygen flow rate, and distribution dispersion of historical session information, obtain the complexity of historical session information; based on the temperature fluctuation and voltage fluctuation of the target physical data, obtain the real-time physical disturbance index; fuse the information complexity of historical sessions, the real-time physical disturbance index, and the initial random seed to obtain the composite entropy source seed.
[0040] It should be noted that, in order to transform the collected multidimensional data into a single, highly deterministic entropy source seed, this invention establishes the entropy source seed based on historical session information and target physical data at the target time, combined with initial random numbers. Considering the randomness of the usage time and duration of the shared oxygen enrichment device, and the randomness of the oxygen demand of users using the device, this invention establishes a complexity index for historical session information, ensuring the uniqueness of the encryption key for the shared oxygen enrichment device's data. Secondly, given the different usage environments of the shared oxygen enrichment device, its internal temperature and voltage can serve as another unique indicator characterizing it. Therefore, this invention establishes a real-time physical disturbance index using target physical data, further improving the uniqueness of the encryption key for the shared oxygen enrichment device's data.
[0041] It should be noted that the distribution of usage duration and average oxygen flow rate in historical session information can reflect the usage characteristics of shared oxygen enrichment devices, such as rigid demand areas like medical institutions and emergency support areas like transportation hubs. If there are many historical sessions and the usage duration distribution is [1 2 1 3 2], it indicates that the corresponding shared oxygen enrichment device is used for emergency purposes. If there are few historical sessions and the usage duration distribution is [5 6], it indicates that the corresponding shared oxygen enrichment device is used in rigid demand areas with longer usage periods. Therefore, the complexity of historical session information can be obtained through the usage duration, average oxygen flow rate, and distribution dispersion of historical session information, which can be used to construct entropy source seeds. More complex shared oxygen enrichment devices can be used with more complex entropy source seeds.
[0042] Specifically, the complexity of obtaining historical session information based on usage duration, average oxygen flow rate, and distribution dispersion includes:
[0043] The complexity of historical session information satisfies the expression:
[0044] ;
[0045] ;
[0046] ;
[0047] In the formula, Indicates the complexity of historical session information; The coefficient of variation represents the duration of use of historical sessions; The coefficient of variation representing the average oxygen flow rate during historical sessions; The standard deviation of the usage duration of historical sessions; This represents the average usage duration of historical sessions. The standard deviation of the average oxygen flow rate in historical sessions; This represents the average oxygen flow rate over historical sessions.
[0048] In the formula, , This indicates the diversity of usage duration and average oxygen flow rate in historical sessions. A higher value indicates greater variation in usage duration and average oxygen flow rate, and thus greater diversity in these metrics. It also suggests a more complex user behavior pattern. , The coefficient of variation represents the usage duration and average oxygen flow rate of historical sessions. The larger the value, the larger the standard deviation and the smaller the mean of the usage duration and average oxygen flow rate, thus indicating a higher complexity of the usage duration and average oxygen flow rate. , This ensures that the impact of usage duration and average oxygen flow rate on the information complexity of historical sessions is greater than 1, thus preventing lower information complexity of historical sessions from affecting key quality.
[0049] At this point, the information complexity of the historical conversations has been obtained.
[0050] It should be noted that incorporating target physical data into the calculation can further improve the security of the entropy source seed. When the usage characteristics of shared oxygen enrichment devices are similar, the geographical environment of the shared oxygen enrichment devices can be considered. Target physical data differs in different geographical environments. For example, the temperature at the storage location of shared oxygen enrichment devices varies in different locations, and the temperature and voltage changes during the startup process of the oxygen enrichment device differ before user use. Therefore, this invention further establishes a real-time physical disturbance index using the target physical data of shared oxygen enrichment devices, thereby further improving the uniqueness and security of the entropy source seed.
[0051] Preferably, based on the temperature and voltage fluctuations of the target physical data, real-time physical disturbance indicators are obtained, including:
[0052] It should be noted that this formula calculates the sum of the absolute values of the products of temperature and voltage changes between consecutive sampling points. Only when both temperature and voltage fluctuate simultaneously will they contribute significantly to the real-time physical disturbance index. The physical disturbance index is determined by capturing the combined disturbances of multiple physical states, rather than the stationary noise of a single parameter. The more unstable the instantaneous state of the equipment (e.g., the electrothermal shock during compressor startup), the more drastic the linked changes in temperature and voltage, and the larger the value of the real-time physical disturbance index, indicating a more chaotic and random physical state at that moment.
[0053] The real-time physical disturbance index satisfies the expression:
[0054] ;
[0055] In the formula, Indicates real-time physical disturbance indicators; Indicates the number of sampling moments within the time window; , This represents the temperature at the i-th and (i-1)-th sampling times within the time window; , This represents the voltage at the i-th and (i-1)-th sampling times within the time window; This represents the absolute value function.
[0056] In the formula, This represents the temperature difference between the i-th and (i-1)-th sampling times within the time window, and represents the temperature fluctuation at the i-th sampling time within the time window. This represents the voltage difference between the i-th and (i-1)-th sampling times within the time window, and represents the voltage fluctuation at the i-th sampling time within the time window. This represents the absolute value of the product of the temperature difference and the voltage difference at the i-th and (i-1)-th sampling times within the time window. It represents the cumulative temperature and voltage fluctuations at the i-th sampling time within the time window. The larger this value is, the greater the simultaneous fluctuations in temperature and voltage at the i-th sampling time within the time window. This represents the sum of temperature and voltage fluctuations at all sampling moments within the time window, indicating the overall physical disturbance of the shared oxygen enrichment device before the target time. The larger this value, the more unstable the instantaneous state of the shared oxygen enrichment device, indicating a more chaotic and random physical state at this moment. For example, the electrothermal shock during compressor startup.
[0057] At this point, real-time physical disturbance indicators were obtained.
[0058] It should be noted that the information complexity of historical sessions and the real-time physical disturbance index are both random indicators determined based on the operating status of the device. By fusing the information complexity of historical sessions and the real-time physical disturbance index with the initial random seed, a more secure entropy source seed can be obtained.
[0059] Preferably, the information complexity of historical sessions, real-time physical perturbation indicators, and initial random seeds are fused to obtain a composite entropy source seed, including:
[0060] An initial random number is generated using the pseudo-random number generator built into the microcontroller of the shared oxygen enrichment device.
[0061] The seed of the composite entropy source satisfies the expression:
[0062] ;
[0063] In the formula, Represents the seed of the composite entropy source; Indicates real-time physical disturbance indicators; Indicates the information complexity of historical sessions; Indicates the initial random number; This represents the XOR function.
[0064] In the formula, This means that the higher the information complexity of historical sessions—that is, the more complex the historical session information of the shared oxygen enrichment device—the greater the weight of real-time physical disturbance indicators in generating entropy source seeds. This indicates that for a shared oxygen enrichment device that is frequently and diversely used, small uncertainties at the physical level will be amplified by complex historical session information, thus generating a more unpredictable entropy source base. Performing an XOR operation between the entropy source base number and the initial random number can produce a non-linear result while avoiding the reduced randomness of the entropy source seed caused by a small entropy source base number.
[0065] Thus, the composite entropy source seed has been obtained.
[0066] S3: Use the composite entropy source seed to generate the session key at the target time, and complete the encryption of the shared oxygen enrichment instrument's collected data.
[0067] Specifically, firstly, the composite entropy source seed obtained through the methods in steps S1-S2 is used as input to seed the pseudo-random number generator in the microcontroller unit of the shared oxygen enrichment instrument, thereby completing the initialization of the pseudo-random number generator.
[0068] Next, the initialized pseudo-random number generator is invoked to generate a session key.
[0069] Finally, during the session corresponding to the target time, all collected data from the shared oxygen enrichment instrument are encrypted using the generated session key and stored in the storage unit. After the session ends, the session key is destroyed from the storage unit.
[0070] This completes the encryption of data collected by the shared oxygen enrichment device.
[0071] This invention also discloses a shared oxygen enrichment instrument data encryption system, including a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement a shared oxygen enrichment instrument data encryption method according to the present invention.
[0072] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.
[0073] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.
Claims
1. A method for encrypting data collected by a shared oxygen enrichment device, characterized in that, include: The time when a user initiates a new session is recorded as the target time. Historical session information and target physical data at the target time are obtained. The historical session information includes the usage duration and average oxygen flow of several historical sessions, and a preset time window. The target physical data includes the temperature and voltage of all sampling times within the time window before the target time. The complexity of obtaining historical session information is based on the usage duration, average oxygen flow rate, and distribution dispersion of historical session information. Based on the temperature and voltage fluctuations of the target physical data, real-time physical disturbance indicators are obtained; the information complexity of historical sessions, real-time physical disturbance indicators, and initial random seeds are fused to obtain a composite entropy source seed; the complexity of historical session information satisfies: ; Indicates the complexity of historical session information; The coefficient of variation representing the duration of use of historical sessions; The coefficient of variation representing the average oxygen flow rate during historical sessions; The coefficient of variation of the usage duration of historical sessions is obtained by: the ratio of the standard deviation of the usage duration of historical sessions to the mean of the usage duration of historical sessions, which is recorded as the coefficient of variation of the usage duration of historical sessions. The coefficient of variation of the average oxygen flow rate of historical sessions is obtained by: the ratio of the standard deviation of the average oxygen flow rate of historical sessions to the mean of the average oxygen flow rate of historical sessions, which is recorded as the coefficient of variation of the average oxygen flow rate of historical sessions. The composite entropy source seed is used to generate the session key at the target time to encrypt the data collected by the shared oxygen enrichment instrument. This includes: using the composite entropy source seed as input to seed the pseudo-random number generator in the microcontroller unit of the shared oxygen enrichment instrument to initialize the pseudo-random number generator; calling the initialized pseudo-random number generator to generate a session key; during the session corresponding to the target time, using the generated session key to encrypt all the collected data of the shared oxygen enrichment instrument and storing it in the storage unit; and destroying the session key from the storage unit after the session ends.
2. The method for encrypting data collected by a shared oxygen enrichment device according to claim 1, characterized in that, The real-time physical disturbance index satisfies the expression: ; In the formula, Indicates real-time physical disturbance indicators; Indicates the number of sampling moments within the time window; This represents the temperature fluctuation at the i-th sampling moment within the time window; This represents the voltage fluctuation at the i-th sampling moment within the time window; This represents the absolute value function.
3. The method for encrypting data collected by a shared oxygen enrichment device according to claim 2, characterized in that, The temperature fluctuation at the i-th sampling moment within the time window includes: recording the temperature difference between the i-th and (i-1)-th sampling moments within the time window as the temperature fluctuation at the i-th sampling moment within the time window.
4. The method for encrypting data collected by a shared oxygen enrichment device according to claim 2, characterized in that, The voltage fluctuation at the i-th sampling moment within the time window includes: recording the voltage difference between the i-th and (i-1)-th sampling moments within the time window as the voltage fluctuation at the i-th sampling moment within the time window.
5. The method for encrypting data collected by a shared oxygen enrichment device according to claim 1, characterized in that, The composite entropy source seed satisfies the expression: ; In the formula, Represents the seed of the composite entropy source; Indicates real-time physical disturbance indicators; Indicates the information complexity of historical sessions; Indicates the initial random seed; This represents the XOR function.
6. The method for encrypting data collected by a shared oxygen enrichment device according to claim 5, characterized in that, The initial random seed is obtained by generating the initial random seed through the pseudo-random number generator built into the microcontroller of the shared oxygen enrichment instrument.
7. A data encryption system for shared oxygen enrichment instruments, characterized in that, include: A processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, implement a method for encrypting data collected by a shared oxygen enrichment instrument according to any one of claims 1-6.
Citation Information
Patent Citations
Random number generation method and chip
CN115309366A
High-entropy random number generation method in physical unclonable function hardware
CN116527238A