A treatment day query method and device of a respiratory apparatus, a terminal and a medium

CN122903667APending Publication Date: 2026-10-13GUANGDONG YONGSHENG MEDICAL TECHNOLOGY CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610987923.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-03
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0004]本发明要解决的技术问题在于,针对现有技术的上述缺陷,提供一种呼吸设备的治疗日查询方法、装置、终端及介质,旨在解决现有技术中同一次夜间治疗会话的数据会被跨越两个自然日拆分,导致长周期合规报表统计偏差,无法适配全球化多时区业务下本地化时间口径独立核算的问题

Benefits of technology

[0015]本发明的有益效果:本发明实施例通过获取待查询的设备标识、查询时间范围和时区偏移参数;确定治疗日相对于自然日的治疗日偏移时间,根据时区偏移参数、治疗日偏移时间以及查询时间范围确定世界协调时间戳区间;根据世界协调时间戳区间和设备标识进行查询,确定各目标治疗记录。由于本发明根据治疗日偏移时间和时区偏移参数对查询时间范围进行偏移后来获取各治疗记录,避免了同一治疗会话被拆分,因此可以有效地解决现有技术中同一次夜间治疗会话的数据会被跨越两个自然日拆分,导致长周期合规报表统计偏差,无法适配全球化多时区业务下本地化时间口径独立核算的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122903667A_ABST
    Figure CN122903667A_ABST
Patent Text Reader

Abstract

The application discloses a treatment day query method and device of a respiratory equipment, a terminal and a medium, relates to the technical field of medical health information, and the method acquires an equipment identifier to be queried, a query time range and a time zone offset parameter; determines a treatment day offset time of a treatment day relative to a natural day, determines a world coordinated time stamp interval according to the time zone offset parameter, the treatment day offset time and the query time range; queries according to the world coordinated time stamp interval and the equipment identifier, and determines each target treatment record. Since each treatment record is acquired according to the treatment day offset time and the time zone offset parameter after the query time range is offset, the same treatment session is avoided from being split, so that the problem that the data of the same night treatment session in the prior art is split across two natural days, resulting in statistical deviation of a long-period compliance report, and the problem that the local time criterion independent accounting cannot be adapted to the globalization multi-time zone business are effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical and health information technology, and in particular to a method, device, terminal, and medium for querying the treatment days of a respiratory device. Background Technology

[0002] Ventilators are used to treat conditions such as sleep apnea syndrome. The characteristics of this type of device are: patients wear it while sleeping at night and it is usually not used during the day. A typical treatment session often lasts from evening (e.g., 10:00 PM) to the following morning (e.g., 6:00 AM). This presents unique data statistics requirements: if the calendar day (00:00 to 23:59) is used as the statistical unit, the data for the same nighttime treatment session will be split across two calendar days, resulting in fragmented treatment session data within a single calendar day, distortion of full-cycle treatment characteristic indicators, and consequently, biases in long-term compliance reports. This makes it unsuitable for the business compliance requirements of independent accounting of local time standards in a globalized, multi-timezone business environment.

[0003] Therefore, existing technologies still need improvement and development. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a method, device, terminal and medium for querying treatment days of respiratory equipment, in order to address the above-mentioned defects of the prior art. The aim is to solve the problem that in the prior art, the data of the same nighttime treatment session is split across two natural days, resulting in statistical deviations in long-term compliant reports and making it impossible to adapt to the independent accounting of local time caliber in globalized multi-time zone business.

[0005] The technical solution adopted by this invention to solve the problem is as follows: In a first aspect, embodiments of the present invention provide a method for querying the treatment day of a respiratory device, wherein the method includes: Obtain the device identifier, query time range, and time zone offset parameters to be queried; Determine the treatment day time offset relative to the calendar day, and determine the Coordinated Universal Timestamp (UTC) interval based on the time zone offset parameter, the treatment day time offset, and the query time range; The target treatment records are determined by querying the global harmonized timestamp interval and the device identifier.

[0006] In one implementation method, determining the Coordinated Universal Timestamp (UTC) interval based on the time zone offset parameter, the treatment day time offset, and the query time range includes: The device binding time period is obtained based on the device identifier, and the intersection of the query time range and the device binding time period is calculated to determine the valid access time interval. The effective access time interval is converted based on the time zone offset parameter and the treatment day time offset to determine the Coordinated Universal Timestamp (COUC) interval.

[0007] In one implementation method, each target treatment record is determined by querying based on the Coordinated Universal Timestamp (COU) interval and the device identifier, including: The target storage space is determined based on the preset timestamp interval and the Coordinated Universal Timestamp interval; The target treatment records are determined by querying the target storage space based on the global harmonic timestamp interval and the device identifier.

[0008] In one implementation method, determining the target storage space based on a preset timestamp interval and the Coordinated Universal Time stamp interval includes: The Coordinated Universal Timestamp Interval is determined based on a preset timestamp interval; When the World Coordinated Timestamp interval is greater than or equal to the preset timestamp interval, the target storage space is determined to be a pre-aggregated storage space. If the Coordinated Universal Timestamp (UTC) interval is less than the preset timestamp interval, then the target storage space is determined to be the original storage space.

[0009] In one implementation method, when the target storage space is a pre-aggregated storage space, a query is performed in the target storage space according to the Coordinated Universal Timestamp (COUC) interval and the device identifier to determine each of the target treatment records, including: Determine the corresponding time zone pre-aggregation storage space based on the time zone offset parameter and determine whether the time zone pre-aggregation storage space is empty; If the time zone pre-aggregation storage space is not empty, then each pre-aggregation time sequence record corresponding to the device identifier in the time zone pre-aggregation storage space is obtained, and each pre-aggregation time sequence record is used as the target treatment record.

[0010] In one implementation method, when the time zone pre-aggregation storage space is empty or the target storage space is the original storage space, a query is performed in the target storage space according to the Coordinated Universal Timestamp interval and the device identifier to determine each of the target treatment records, including: Based on the Coordinated Universal Timestamp (COU) interval and the device identifier, a query is performed in the original storage space to determine the original time-series records of each target. The original time-series records of each target are converted based on the time zone offset parameter and the treatment day time offset to determine the target query record.

[0011] In one implementation method, the generation of each pre-aggregated time-series record in the time zone pre-aggregation storage space includes: If the current time is the trigger time, retrieve the original time series data within the preset time period; Based on the time zone offset and treatment day offset time corresponding to the time zone pre-aggregation storage space, the original time series data are offset to determine each pre-aggregated time series record.

[0012] Secondly, embodiments of the present invention also provide a treatment day query device for a respiratory device, wherein the treatment day query device for a respiratory device includes: The data acquisition module is used to acquire the device identifier to be queried, the query time range, and the time zone offset parameter; The time offset module is used to determine the treatment day time offset relative to the calendar day, and to determine the Coordinated Universal Timestamp (UTC) interval based on the time zone offset parameter, the treatment day time offset, and the query time range. The record query module is used to query based on the World Coordinated Timestamp interval and the device identifier to determine each target treatment record.

[0013] Thirdly, embodiments of the present invention also provide a terminal, the terminal including a memory and one or more processors; the memory stores one or more programs; the programs include instructions for executing the treatment day query method of any of the above-described respiratory devices; the processor is used to execute the programs.

[0014] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a plurality of instructions, wherein the instructions are adapted to be loaded and executed by a processor to implement the treatment day query method for any of the above-described respiratory devices.

[0015] The beneficial effects of this invention are as follows: This invention obtains the device identifier to be queried, the query time range, and the time zone offset parameter; determines the treatment day offset time relative to the calendar day; determines the Coordinated Universal Timestamp (UTC) interval based on the time zone offset parameter, the treatment day offset time, and the query time range; and performs a query based on the UTC interval and the device identifier to determine each target treatment record. Because this invention offsets the query time range based on the treatment day offset time and the time zone offset parameter before obtaining each treatment record, it avoids the splitting of the same treatment session. Therefore, it effectively solves the problem in the prior art where data from the same nighttime treatment session is split across two calendar days, leading to statistical bias in long-term compliant reports and failing to adapt to the independent accounting of local time standards in globalized multi-timezone businesses. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a flowchart illustrating the method for querying the treatment day of a respiratory device provided in an embodiment of the present invention.

[0018] Figure 2 This is a schematic diagram of the time-off pre-aggregation principle provided in an embodiment of the present invention.

[0019] Figure 3 This is a schematic diagram of the multi-time zone pre-aggregation task architecture provided in an embodiment of the present invention.

[0020] Figure 4 This is a schematic diagram of the three-layer data model architecture provided in an embodiment of the present invention.

[0021] Figure 5 This is a flowchart of the treatment data query routing provided in an embodiment of the present invention.

[0022] Figure 6 This is a schematic diagram of the internal modules of the treatment day query device for respiratory equipment provided in an embodiment of the present invention.

[0023] Figure 7 This is a schematic diagram of the terminal provided in the embodiment of the present invention. Detailed Implementation

[0024] This invention discloses a method, device, terminal, and medium for querying the treatment day of a respiratory device. To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention.

[0025] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.

[0026] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0027] Ventilators are used to treat conditions such as sleep apnea syndrome. The characteristics of this type of device are: patients wear it while sleeping at night and it is usually not used during the day. A typical treatment session often lasts from evening (e.g., 10:00 PM) to the following morning (e.g., 6:00 AM). This presents unique data statistics requirements: if the calendar day (00:00 to 23:59) is used as the statistical unit, the data for the same nighttime treatment session will be split across two calendar days, resulting in fragmented treatment session data within a single calendar day, distortion of full-cycle treatment characteristic indicators, and consequently, biases in long-term compliance reports. This makes it unsuitable for the business compliance requirements of independent accounting of local time standards in a globalized, multi-timezone business environment.

[0028] To address the aforementioned deficiencies in existing technologies, this invention provides a method for querying treatment days for respiratory devices. The method involves obtaining the device identifier, query time range, and time zone offset parameter; determining the treatment day offset time relative to a calendar day; determining the Coordinated Universal Timestamp (UTC) interval based on the time zone offset parameter, treatment day offset time, and query time range; and performing a query based on the UTC interval and device identifier to identify each target treatment record. Because this invention offsets the query time range based on the treatment day offset time and time zone offset parameter before obtaining each treatment record, it avoids the splitting of the same treatment session. Therefore, it effectively solves the problem in existing technologies where data from the same nighttime treatment session is split across two calendar days, leading to statistical bias in long-term compliant reports and failing to adapt to the independent accounting of local time standards in globalized multi-timezone businesses.

[0029] Exemplary method: like Figure 1 As shown, the method for querying the treatment day of the respiratory device includes: Step S100: Obtain the device identifier to be queried, the query time range, and the time zone offset parameters; In simple terms, the device identifier is a globally unique identification code parameter for respiratory therapy devices. The query time range is a time interval parameter that limits the data query, used to filter records where the device's binding time or treatment time falls within the range. The query time range can be a start and end date or a timestamp. The time zone offset parameter (timezoneOffsetMinutes) represents the difference between the local time and UTC (Coordinated Universal Time) standard time. It receives a treatment query request from the user, specifying the device identifier, query time range, and time zone offset parameter (e.g., 480 minutes represents UTC+8). After verifying device access permissions and the binding period time range, it queries each time-series record in the storage space based on the device identifier, query time range, and time zone offset parameter.

[0030] Step S200: Determine the treatment day time offset relative to the calendar day, and determine the Coordinated Universal Timestamp (UTC) interval based on the time zone offset parameter, the treatment day time offset, and the query time range; Considering that treatment sessions using respiratory therapy devices often extend from the evening (e.g., 10 PM) to the following morning (e.g., 6 AM), specific data statistics requirements arise. A common approach is to use calendar days (00:00 to 24:00) as the statistical unit, grouping the uploaded time-series treatment data by UTC or local calendar day and calculating statistical indicators for each day. However, processing by calendar day can easily lead to the fragmentation of individual treatment sessions. For example, a patient started treatment at 22:30 on March 10, 2025, and ended it at 06:00 on March 11, 2025 (a typical nighttime session, totaling 7.5 hours); on calendar day 2025-03-10: only data from 22:30 to 23:59 was collected; on calendar day 2025-03-11: only data from 00:00 to 06:00 was collected; neither calendar day can represent the complete statistical results of a whole night of treatment, and compliance assessment and treatment quality indicators are separated.

[0031] This embodiment defines a treatment day and delineates the starting boundary of the treatment day. Each treatment day includes 24 hours, so that the duration of the treatment session can be fully covered according to the treatment day. When querying each time-series record according to the treatment day, the treatment session in the time-series record can be completely preserved. This avoids splitting each treatment session into two time periods, which would lead to problems such as the inability to fully express the treatment indicators of a single treatment (such as mean airway pressure, median air leakage, etc.) and inaccurate results of clinical compliance reports.

[0032] For example, the patient's nighttime treatment started at 22:30 on March 10, 2025, and ended at 06:00 on March 11, 2025. Daily statistics: March 10, 2025, only contains 90 minutes, and March 11, 2025, only contains 360 minutes, both incomplete. Treatment day statistics (12:00 boundary): The treatment day March 10, 2025 (12:00 to March 11, 2025, 12:00) fully contains 7.5 hours of data; the pre-aggregated results provide the complete median and P90 index for this treatment day.

[0033] The treatment day offset relative to the calendar day is calculated based on the treatment day's offset. For example, defining the start and end times of the treatment day as 12:00 local time to 12:00 the following day will completely cover nighttime treatment sessions. This treatment day offset relative to the calendar day is 12 hours. Based on the calculated time zone offset parameter and treatment day time offset, the query time range of the current time zone is converted into a standardized Coordinated Universal Timestamp (UTC) interval to facilitate subsequent time-series record queries.

[0034] For example, a treatment day is defined as the time zone from 12:00 (noon) local time in the user's time zone to 12:00 (noon) the following day. Using UTC+8 as an example: local 12:00 corresponds to UTC 04:00, therefore the boundary of the treatment day in UTC time is from 04:00 to 04:00 the following day, and this time is used as the converted Coordinated Universal Timestamp (UTC) interval. When a user selects a treatment day 2025-10-20 (UTC+8): the system converts the query time range to the UTC millisecond timestamps corresponding to 2025-10-20 12:00:00 (UTC+8) to 2025-10-21 11:59:59 (UTC+8), consistent with the treatment day identifier in the pre-aggregated storage space, ensuring query boundary alignment.

[0035] In one implementation, determining the Coordinated Universal Timestamp (UTC) interval based on the time zone offset parameter, the treatment day time offset, and the query time range includes: Step S201: Obtain the device binding time period based on the device identifier, perform an intersection operation on the query time range and the device binding time period, and determine the valid access time interval; Step S202: Convert the effective access time interval according to the time zone offset parameter and the treatment day time offset to determine the Coordinated Universal Timestamp interval.

[0036] Specifically, the device binding time period is the time interval between the respiratory therapy device and the user. The device binding time period corresponding to the device identifier is retrieved from the storage space by searching for the device identifier. The retrieved device binding time includes all binding time intervals between the device corresponding to that device identifier and each different user. The intersection of the retrieved device binding time and the query time range yields the binding time interval of the respiratory therapy device within the query time range, which is then used as the valid access time interval. For the valid access time interval, it is converted to the representation corresponding to the current time zone based on the time zone offset parameter, and then converted to the representation of the treatment day based on the treatment day time offset, thus determining the Coordinated Universal Timestamp (UTC) interval.

[0037] Among them, such as Figure 2 As shown, the formula for calculating time zone offset is as follows: Let the user's time zone offset be Z (in hours), then the time offset used for pre-aggregation is: Δt=Z 12 (hours).

[0038] The offsets for different time zones are shown in Table 1.

[0039] Table 1. Time Zone Offset Table

[0040] Step S300: Query based on the World Coordinated Timestamp interval and the device identifier to determine each target treatment record.

[0041] In short, the database is filtered using the input device identifier and the converted Coordinated Universal Time Stamp (UTC) interval as search criteria. Data entries with matching device identifiers and record times falling within the specified UTC interval are matched, while irrelevant device and time period data are filtered out. Finally, all target treatment records that meet the criteria are extracted and output, completing the data query and filtering process. The query results are formatted as statistical rows arranged by treatment days (including the median and p90 fields) or as a summary statistical summary (number of treatment days, total duration, number of days ≥4 hours, etc.) and returned to the front end.

[0042] In one implementation, each target treatment record is determined by querying based on the Coordinated Universal Timestamp (COU) interval and the device identifier, including: Step S301: Determine the target storage space based on the preset timestamp interval and the Coordinated Universal Timestamp interval; Step S302: Query the target storage space according to the world coordinated timestamp interval and the device identifier to determine each of the target treatment records.

[0043] like Figure 5 As shown, the preset timestamp interval is a predefined time range used to define the target storage space for this query. Specifically, the target storage space can be determined by comparing the Coordinated Universal Timestamp (UTC) interval with the preset timestamp interval. The storage space can be divided according to the type of time-series records stored or the number of time-series record entries. After determining the corresponding target storage space, the query is then performed within the target storage space based on the UTC interval and device identifier, reducing the number of entries to be queried and improving query speed. For example, when a user queries 90 days of treatment statistics for a certain device, the system first filters the data by binding period time to obtain a set of valid access sub-intervals, and then routes the query to the corresponding target storage space within this set, returning only the treatment day statistics within the binding period, avoiding unauthorized access to data outside the binding period.

[0044] In one implementation, determining the target storage space based on a preset timestamp interval and the Coordinated Universal Timestamp (UTC) interval includes: Step S3011: Determine the Coordinated Universal Timestamp Interval based on the preset timestamp interval; Step S3012: When the World Coordinated Timestamp Interval is greater than or equal to the preset timestamp interval, the target storage space is determined to be a pre-aggregated storage space. Step S3013: When the Coordinated Universal Timestamp interval is less than the preset timestamp interval, the target storage space is determined to be the original storage space.

[0045] Specifically, the granularity of the query is determined by comparing the size of the preset timestamp interval and the Coordinated Universal Time (UTC) interval. If the UTC interval is greater than or equal to the preset timestamp interval, the query is considered coarse-grained, and the pre-aggregated storage space is used preferentially. The pre-aggregated storage space stores time-series records for a preset time period (e.g., 30 days) prior to the current time point. For coarse-grained queries, searching directly from the pre-aggregated storage space can significantly save search time. When the UTC interval is smaller than the preset timestamp interval, i.e., for single-day or fine-grained queries, the original storage space is used preferentially for the query.

[0046] In one implementation, when the target storage space is a pre-aggregated storage space, a query is performed in the target storage space based on the Coordinated Universal Timestamp (COUC) interval and the device identifier to determine each of the target treatment records, including: Step S3021: Determine the corresponding time zone pre-aggregation storage space based on the time zone offset parameter and determine whether the time zone pre-aggregation storage space is empty; Step S3022: If the time zone pre-aggregation storage space is not empty, then obtain each pre-aggregation time sequence record corresponding to the device identifier in the time zone pre-aggregation storage space, and use each pre-aggregation time sequence record as the target treatment record.

[0047] Specifically, such as Figure 3 As shown, a pre-aggregation storage space corresponding to each time zone is set up. For example, a query from a Chinese user (timezoneOffsetMinutes=480) is routed to the UTC+8 pre-aggregation storage space, returning statistical results with CST treatment days as the boundary. A query from a Japanese user (timezoneOffsetMinutes=540) is routed to the UTC+9 pre-aggregation storage space, returning statistical results with JST treatment days as the boundary. The two pre-aggregation sets do not interfere with each other.

[0048] The system reads the time zone offset parameter and matches it with the corresponding pre-aggregated storage space in the system's preset time zone to complete the storage partition location. After location, a null check is performed to determine whether there are cached pre-aggregated time-series records in the current time zone pre-aggregated storage space. If the check result shows that there are no pre-aggregated time-series records in the storage space, this branch logic is skipped, and the original storage space query process is entered; if the storage space is not empty, the device identifier passed in the request is used as a filter condition to traverse and search in the current time zone pre-aggregated storage space to extract all pre-aggregated time-series records that match the device identifier. The pre-aggregated time-series records have already completed data aggregation calculations in advance according to the time zone, device, and time dimensions, so no secondary processing is required. All the pre-aggregated time-series records obtained by filtering are directly identified as the target treatment records required for this query, saving the reading and aggregation calculation of the underlying original data and improving the query response efficiency. If scanning the original layer requires processing tens of millions of 200ms records, it takes several seconds to tens of seconds; if the pre-aggregated layer is hit, only about 90 result rows aggregated by treatment day need to be read, which usually takes less than 200 milliseconds.

[0049] In one implementation, the generation of each pre-aggregated time-series record in the time zone pre-aggregation storage space includes: If the current time is the trigger time, retrieve the original time series data within the preset time period; Based on the time zone offset and treatment day offset time corresponding to the time zone pre-aggregation storage space, the original time series data are offset to determine each pre-aggregated time series record.

[0050] The generation of each pre-aggregated time series record in the time zone pre-aggregation storage space is triggered by a scheduled task. For each supported time zone, an independent set of scheduled pre-aggregation tasks is deployed, with a corresponding trigger time set. When the trigger time is reached, raw time series data is acquired to generate pre-aggregated time series records. For example, it might be triggered approximately one hour after the end of a treatment day (e.g., 13:00 local time). After triggering, raw time series data within a preset time period is read from the raw storage space; for example, raw time series records of specified measurement types and fields from the last 30 days.

[0051] Based on the time zone offset and treatment day offset time corresponding to the time zone pre-aggregation storage space, each original time series data is offset. After applying Δt offset to all UTC timestamps of the original time series data, the start time of the treatment day (local 12:00) is aligned to the natural day 00:00 on the virtual time axis, so that the time series database's aggregation capability by natural day can be directly used to achieve grouping by treatment day.

[0052] In one implementation, the data is grouped by virtual timeline natural day (every:1d) window, and the median (P50) and 90th percentile of each field are calculated separately. Each aggregation result is labeled with a timezone identifier and a pre-aggregation identifier. The result record is configured with stat_type (median or p90), timezone (e.g., CST), and precomputed (true). The results are written to a separate pre-aggregation cache for the corresponding timezone. The data is then written to the UTC+8 pre-aggregation storage space. The same process is executed independently in the UTC+9 timezone, Δt= 3 hours later, write to the UTC+9 pre-aggregated storage space.

[0053] In one implementation, when the time zone pre-aggregation storage space is empty or the target storage space is the original storage space, a query is performed in the target storage space based on the Coordinated Universal Timestamp (UTC) interval and the device identifier to determine each of the target treatment records, including: Step S3023: Query the original storage space according to the Coordinated Universal Timestamp interval and the device identifier to determine the original time sequence record of each target; Step S3024: Convert the original time series records of each target according to the time zone offset parameter and the treatment day time offset to determine the target query record.

[0054] If the time zone pre-aggregation storage space has no data, or if the selected target storage space is the original storage space, then a fine-grained query process is executed. For example, if the preset timestamp interval is 30 days, if the pre-aggregation layer returns empty and the number of days queried does not exceed 30 days, it falls back to the original data layer and dynamically aggregates according to the treatment day logic; if it exceeds 30 days and the pre-aggregation is empty, it returns empty or partial results and records an alarm.

[0055] like Figure 4 As shown in Table 2, if a device's pre-aggregation task has not yet been covered or the cache is temporarily empty, and the user queries the statistics for the last 7 days, the system will detect that there is no data in the second layer and the number of days queried is ≤30. It will automatically fall back to the first layer, aggregate in real time according to the treatment day logic (grouped by day after subtracting 12 hours), and return the data to ensure data availability.

[0056] For targets stored in the original storage space, the process first accesses the original storage space using the Coordinated Universal Timestamp (UTC) interval and device identifier as search criteria, filtering out all target original time-series records that match both time and device. Then, combining the input time zone offset parameter and treatment day time offset correction parameters, the time field in each original time-series record is converted to uniformly adapt to the corresponding time zone and business statistical day standard, completing the time dimension correction. All data after time conversion processing constitutes the standardized target query record, which serves as the target treatment record for this query. This process does not use pre-aggregated caching; it directly reads the underlying original time-series data and completes time offset correction, ensuring data integrity and accuracy. It is suitable for query scenarios such as those without caching and those with custom statistical time periods.

[0057] Table 2 Three-tier data query model

[0058] Based on the above embodiments, the present invention also provides a treatment day query device for respiratory equipment, such as... Figure 6 As shown, the device includes: Data acquisition module 01 is used to acquire the device identifier to be queried, the query time range, and the time zone offset parameter; Time offset module 02 is used to determine the treatment day time offset relative to the calendar day, and to determine the Coordinated Universal Timestamp interval based on the time zone offset parameter, the treatment day time offset and the query time range; The record query module 03 is used to query based on the World Coordinated Timestamp interval and the device identifier to determine each target treatment record.

[0059] Based on the above embodiments, the present invention also provides a terminal, the principle block diagram of which can be as follows: Figure 7 As shown, the terminal includes a processor, memory, network interface, and display screen connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for querying the treatment day of the respiratory device. The display screen can be an LCD screen or an e-ink screen.

[0060] Those skilled in the art will understand that Figure 7The schematic diagram shown is merely a partial structural diagram related to the present invention and does not constitute a limitation on the terminal to which the present invention is applied. A specific terminal may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0061] In one implementation, the terminal's memory stores one or more programs, and these programs are configured to be executed by one or more processors, and include instructions for performing a treatment day query method for a respiratory device.

[0062] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0063] In summary, this invention discloses a method, device, terminal, and medium for querying treatment days for respiratory equipment. The method involves obtaining the device identifier, query time range, and time zone offset parameter; determining the treatment day offset time relative to a calendar day; determining the Coordinated Universal Timestamp (UTC) interval based on the time zone offset parameter, treatment day offset time, and query time range; and querying based on the UTC interval and device identifier to identify each target treatment record. Because this invention offsets the query time range based on the treatment day offset time and time zone offset parameter to obtain each treatment record, it avoids the splitting of the same treatment session. Therefore, it effectively solves the problem in existing technologies where data from the same nighttime treatment session is split across two calendar days, leading to statistical bias in long-term compliant reports and failing to adapt to the independent accounting of local time standards in globalized multi-timezone businesses.

[0064] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. A method for querying the treatment days of a respiratory device, characterized in that, The method includes: Obtain the device identifier, query time range, and time zone offset parameters to be queried; Determine the treatment day offset time relative to the calendar day, and determine the Coordinated Universal Timestamp (UTC) interval based on the time zone offset parameter, the treatment day offset time, and the query time range; The target treatment records are determined by querying the global harmonized timestamp interval and the device identifier.

2. The method for querying the treatment day of a respiratory device according to claim 1, characterized in that, The Coordinated Universal Timestamp (UTC) interval is determined based on the time zone offset parameter, the treatment day offset time, and the query time range, including: The device binding time period is obtained based on the device identifier, and the intersection of the query time range and the device binding time period is calculated to determine the valid access time interval. The effective access time interval is converted based on the time zone offset parameter and the treatment day offset time to determine the Coordinated Universal Timestamp (COUC) interval.

3. The method for querying the treatment day of a respiratory device according to claim 1, characterized in that, Based on the aforementioned global harmonized timestamp interval and the device identifier, the target treatment records are determined, including: The target storage space is determined based on the preset timestamp interval and the Coordinated Universal Timestamp interval; The target treatment records are determined by querying the target storage space based on the global harmonic timestamp interval and the device identifier.

4. The method for querying the treatment day of a respiratory device according to claim 3, characterized in that, The target storage space is determined based on the preset timestamp interval and the Coordinated Universal Timestamp interval, including: The Coordinated Universal Timestamp Interval is determined based on a preset timestamp interval; If the World Coordinated Timestamp interval is greater than or equal to the preset timestamp interval, then the target storage space is determined to be a pre-aggregated storage space. If the Coordinated Universal Timestamp (UTC) interval is smaller than the preset timestamp interval, then the target storage space is determined to be the original storage space.

5. The method for querying the treatment day of a respiratory device according to claim 4, characterized in that, When the target storage space is a pre-aggregated storage space, a query is performed in the target storage space according to the World Harmonized Timestamp interval and the device identifier to determine each of the target treatment records, including: Determine the corresponding time zone pre-aggregation storage space based on the time zone offset parameter and determine whether the time zone pre-aggregation storage space is empty; If the time zone pre-aggregation storage space is not empty, then each pre-aggregation time sequence record corresponding to the device identifier in the time zone pre-aggregation storage space is obtained, and each pre-aggregation time sequence record is used as the target treatment record.

6. The method for querying the treatment day of a respiratory device according to claim 5, characterized in that, If the time zone pre-aggregation storage space is empty or the target storage space is the original storage space, a query is performed in the target storage space according to the Coordinated Universal Timestamp interval and the device identifier to determine each of the target treatment records, including: Based on the Coordinated Universal Timestamp (COU) interval and the device identifier, a query is performed in the original storage space to determine the original time-series records of each target. The original time-series records of each target are converted based on the time zone offset parameter and the treatment day offset time to determine the target query record.

7. The method for querying the treatment day of a respiratory device according to claim 5, characterized in that, The generation of each pre-aggregated time-series record in the time zone pre-aggregation storage space includes: If the current time is the trigger time, retrieve the original time series data within the preset time period; Based on the time zone offset and treatment day offset time corresponding to the time zone pre-aggregation storage space, the original time series data are offset to determine each pre-aggregated time series record.

8. A treatment day query device for a respiratory device, characterized in that, The device includes: The data acquisition module is used to acquire the device identifier to be queried, the query time range, and the time zone offset parameter; The time offset module is used to determine the treatment day offset time relative to the calendar day, and to determine the Coordinated Universal Timestamp interval based on the time zone offset parameter, the treatment day offset time, and the query time range. The record query module is used to query based on the World Coordinated Timestamp interval and the device identifier to determine each target treatment record.

9. A terminal, characterized in that, The terminal includes a memory and one or more processors; the memory stores one or more programs; the programs contain instructions for executing the treatment day query method of the respiratory device as described in any one of claims 1-7; the processor is used to execute the programs.

10. A computer-readable storage medium storing a plurality of instructions thereon, characterized in that, The instructions are loaded and executed by the processor to implement the steps of the treatment day query method for the respiratory device according to any one of claims 1-7.