Cloud-edge collaborative time series data timeline alignment method, system, device and medium

By deploying a unified timetable generation microservice in the cloud and coordinating with an edge data acquisition and storage integrated microservice, the problem of inconsistent data timestamps in high-frequency, multi-location scenarios is solved, and efficient alignment of data timetables is achieved.

CN122137490APending Publication Date: 2026-06-02INSPUR GENERSOFT CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INSPUR GENERSOFT CO LTD
Filing Date
2026-02-27
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In high-frequency, multi-location scenarios, existing technologies struggle to effectively unify the timestamps of various acquisition protocols, resulting in large data volumes, high complexity, and low efficiency in timetable alignment.

Method used

A unified timetable generation microservice is deployed in the cloud, and a unified timestamp and storage instruction are sent to the edge acquisition and storage integrated microservice via a message queue. The edge acquisition and storage integrated microservice compares the timestamp with the local timestamp. If the difference is within the allowable range, the unified timestamp is used to store the data. If it exceeds the range, error processing is performed.

Benefits of technology

It achieves unified data timestamps in high-frequency, multi-location scenarios, reducing the complexity of data processing and improving the efficiency of timetable alignment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122137490A_ABST
    Figure CN122137490A_ABST
Patent Text Reader

Abstract

This application provides a method, system, device, and medium for aligning time-series data in a cloud-edge collaborative manner, belonging to the field of cloud-edge collaboration technology. The method includes deploying a time-series generation microservice in the cloud or on a central server; constructing multiple edge acquisition and storage integrated microservices for various data acquisition protocols and deploying them to corresponding edge hardware devices; each edge acquisition and storage integrated microservice collecting time-series data from industrial IoT devices; subscribing to a unified time-series message; the time-series generation microservice sending a message containing a unified timestamp and storage instructions to the edge acquisition and storage integrated microservice via a message queue; comparing the message with the local timestamp; if the timestamp difference is within the allowable error range, formatting the collected time-series data using the unified timestamp and storing it in a database; if it exceeds the allowable error range, executing a preset error handling process. This application's technical solution can solve the problem of low time-series alignment efficiency in high-frequency, multi-location scenarios with large data volumes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of cloud-edge collaboration technology, specifically relating to a time-series data time schedule alignment method, system, device, and medium for cloud-edge collaboration. Background Technology

[0002] The current industrial IoT scenarios involve numerous device models and various data acquisition protocols, making support for multiple acquisition protocols a basic requirement for industrial IoT software. These scenarios often involve high-frequency time-series data as the data source for subsequent applications. The timestamps of time-series data are crucial for subsequent storage, forwarding, processing, and display. However, multiple acquisition protocols typically correspond to multiple acquisition service instances running on multiple hardware instances. In high-frequency scenarios, it is difficult to ensure consistency in their execution schedules. Even if acquisition begins simultaneously with the same interval, the time-series data acquired and stored by different acquisition services may have inconsistent timestamps, leading to difficulties in subsequent processing.

[0003] To address the aforementioned issues, taking a partner encountered in a project as an example, one solution is to unify data storage service instances. Specifically, the collected data is centralized into individual service instances, timestamped, and then stored. While this solution does ensure timestamp consistency, its problems are also obvious: in high-frequency, multi-location scenarios, the large volume and complexity of data lead to inefficient time schedule alignment. Summary of the Invention

[0004] The technical solution described in this application aims to provide a method, system, device, and medium for time-series data time-series alignment in a cloud-edge collaborative manner. This solution can solve the problems of large data volume, high complexity, and low time-series alignment efficiency in high-frequency, multi-location scenarios.

[0005] According to a first aspect of this application, embodiments of this application provide a cloud-edge collaborative time-series data schedule alignment method, comprising: deploying a unified schedule generation microservice in the cloud or a central server; wherein the schedule generation microservice is capable of generating a unified schedule and publishing a message containing a unified timestamp and storage instructions; constructing corresponding edge acquisition and storage integrated service images for various data acquisition protocols, and deploying them to multiple edge hardware devices respectively; wherein the edge acquisition and storage integrated microservice integrates data acquisition functions and data storage logic; each edge acquisition and storage integrated microservice starts the data acquisition function to acquire time-series data from industrial IoT devices; each edge acquisition and storage integrated microservice subscribes to the unified schedule published by the schedule generation microservice; so that the schedule generation microservice sends a message containing a unified timestamp and storage instructions to the edge acquisition and storage integrated microservice through a message queue; Upon receiving a message containing a unified timestamp and storage instructions, each edge data acquisition and storage microservice compares the unified timestamp with the local timestamp recorded when it acquired the data. If the difference between the local timestamp and the unified timestamp is within the preset allowable error range, the edge data acquisition and storage microservice uses the unified timestamp to format the acquired time-series data and stores it in the database. If the difference exceeds the allowable error range, a preset error handling process is executed.

[0006] Preferably, in the above-mentioned cloud-edge collaborative time-series data time-series alignment method, the time-series generation microservice is a globally unique service instance, responsible for providing a unified time benchmark for all distributed edge data acquisition and storage integrated microservices.

[0007] Preferably, in the above-mentioned cloud-edge collaborative time-series data time-series alignment method, the steps of constructing corresponding edge acquisition and storage integrated microservices for various data acquisition protocols and deploying them to multiple edge hardware devices include: For various data acquisition protocols, corresponding edge acquisition and storage integrated service images are constructed; wherein, the edge acquisition and storage integrated service image integrates data acquisition functions and data storage logic; Each edge acquisition and storage integrated service image is instantiated into a corresponding edge acquisition and storage integrated microservice, and each edge acquisition and storage integrated microservice is deployed to multiple edge hardware devices to ensure that each edge hardware device accesses the microservice generated by the timetable.

[0008] Preferably, in the above-mentioned cloud-edge collaborative time-series data time-series alignment method, the edge acquisition and storage integrated service image is built by encapsulating the data acquisition program and data storage logic of a specific protocol in a container image, preferably a Docker container.

[0009] Preferably, in the above-mentioned cloud-edge collaborative time-series data time schedule alignment method, the time schedule generation microservice integrates a message queue to implement a unified time schedule message publishing and subscription communication mode; the unified time schedule message publishing includes publishing messages containing a unified timestamp and storage instructions.

[0010] Preferably, in the above-mentioned cloud-edge collaborative time-series data time-series time-series alignment method, the step of each edge acquisition and storage integrated microservice comparing the unified timestamp with the local timestamp recorded when it collects data after receiving the unified timestamp and storage instruction includes: calculating the absolute difference between the local timestamp and the unified timestamp, and determining whether the absolute difference is within a preset allowable error range; the allowable error range includes the error range defined by the minimum and maximum values ​​of the historically available absolute differences.

[0011] Preferably, in the above-mentioned cloud-edge collaborative time-series data time-series time-series alignment method, if the difference exceeds the allowable error range, a preset error handling process is executed, including one or more of the following: discarding the batch of data, recording an error log, and storing and marking it as unaligned data using a local timestamp.

[0012] According to the second aspect provided in this application, this application provides a cloud-edge collaborative time-series data time schedule alignment system, used to implement the cloud-edge collaborative time-series data time schedule alignment method provided by any of the above technical solutions, including: a time schedule generation microservice module, deployed in the cloud or a central server, used to generate a unified time schedule and publish messages through a built-in message queue; multiple edge acquisition and storage integrated microservice modules, respectively deployed on multiple edge hardware devices, each module corresponding to a data acquisition protocol, and integrating a data acquisition unit, a data storage unit, and a message communication unit; wherein, the message communication unit is used to subscribe to messages from the time schedule generation microservice module, and the data storage unit performs data storage operations after receiving a unified timestamp that meets the time alignment conditions.

[0013] According to a third aspect provided in this application, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the program to implement the cloud-edge collaborative time-series data schedule alignment method provided by any of the above technical solutions.

[0014] According to the fourth aspect provided in this application, this application also provides a computer storage medium having a computer program stored thereon, wherein when the computer program is executed, it implements the cloud-edge collaborative time-series data schedule alignment method as provided in any of the above embodiments.

[0015] The technical solution of this application has at least the following technical effects: This application provides a cloud-edge collaborative time-series data time-series data alignment method. It unifies the time-series data generation microservice, specifically deploying the time-series data generation microservice in the cloud or on a central server. Multiple edge acquisition and storage integrated microservices are built for various data acquisition protocols and deployed to corresponding edge hardware devices. Each edge acquisition and storage integrated microservice collects time-series data from industrial IoT devices and subscribes to a unified time-series message. The time-series data generation microservice sends a message containing a unified timestamp and storage instructions to the edge acquisition and storage integrated microservice via a message queue. This message is compared with the local timestamp. If the timestamp difference is within the allowable error range, the collected time-series data is formatted using the unified timestamp and stored in the database; otherwise, a preset error handling process is executed. By building and deploying a unique time-series data generation microservice, a unified time-series is generated, thus solving the problems of existing technologies where all acquisition services run in one place, making it difficult to unify the timestamps of the collected data, and increasing the difficulty and complexity of subsequent data processing. Furthermore, it addresses the issues of large data volumes and low time-series data alignment efficiency in high-frequency, multi-location scenarios in existing technologies. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A flowchart illustrating a cloud-edge collaborative time-series data time-series time-series alignment method provided in an embodiment of this application; Figure 2 for Figure 1 The embodiment shown provides a schematic diagram of the overall process for time-series data time-series alignment in a cloud-edge collaborative manner. Figure 3 A schematic diagram of the overall architecture of a cloud-edge collaborative time-series data time-series alignment system provided in this application embodiment; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0017] To more clearly illustrate the overall concept of this application, a detailed explanation is provided below with reference to the accompanying drawings.

[0018] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. For those skilled in the art, various modifications and variations can be made to this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

[0019] Many specific details are set forth in the following description to provide a thorough understanding of this application. However, this application may also be implemented in other ways different from those described herein. Therefore, the scope of protection of this application is not limited to the specific embodiments disclosed below. It should be noted that, unless otherwise specified, the embodiments of this application and the features thereof can be combined with each other.

[0020] In this application, unless otherwise expressly specified and limited, the terms "above" and "below" the second feature can refer to direct contact between the first and second features, or indirect contact between the first and second features through an intermediate medium. In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described can be combined in any suitable manner in one or more embodiments or examples.

[0021] The existing technology has the following drawbacks: Multiple data acquisition protocols typically correspond to multiple data acquisition service instances, running on multiple hardware instances. In high-frequency scenarios, it's difficult to ensure consistent execution schedules. Even if data acquisition begins simultaneously with the same interval, the time-series data acquired and stored by different acquisition services may have inconsistent timestamps, leading to difficulties in subsequent processing. To address this issue, taking a partner encountered in a project as an example, one solution is to unify the data storage service instance. Specifically, the collected data is centralized across individual service instances, timestamped, and then stored. While this solution does ensure consistent timestamps, the problem is also obvious: in high-frequency, multi-location scenarios, the total data volume is large, resulting in low efficiency in schedule alignment.

[0022] To address the aforementioned issues, the following embodiments of the present invention provide a time-series data time-series ...

[0023] To achieve the above objectives, see [link to relevant documentation]. Figure 1 , Figure 1 A flowchart illustrating a cloud-edge collaborative time-series data time-series ... Figure 1As shown, the cloud-edge collaborative time-series data schedule alignment method includes: S110: Deploying a unified schedule generation microservice in the cloud or a central server; wherein, the schedule generation microservice is used to generate a unified schedule and publish messages containing a unified timestamp and storage instructions through its internally integrated message queue.

[0024] In the technical solution provided in this application embodiment, the timetable generation microservice integrates a message queue to implement a unified timetable message publishing and subscription communication mode; the unified timetable message publishing includes publishing a message containing a unified timestamp and storage instructions.

[0025] By deploying a unified time-series generation microservice in the cloud or on a central server, local edge hardware devices can acquire high-frequency time-series data and then use this microservice to download a unified timestamp and storage instructions. The unified timestamp is then used to calibrate and align the high-frequency time-series data. This unified time-series generation service ensures that local edge hardware devices, regardless of their location or transmission speed, can use a unified timestamp to align time-series data.

[0026] Additionally, it should be noted that, as a preferred embodiment, the schedule generation microservice is a globally unique service instance responsible for providing a unified time base for all distributed edge data acquisition and storage microservices.

[0027] This timetable generates a microservice as a globally unique service instance, providing a unified time base for each distributed edge acquisition and storage microservice. This enables each distributed edge hardware device to use a unified timestamp to align data, ensuring time alignment between different edge hardware devices.

[0028] Figure 1 The technical solution provided in the illustrated embodiment, after deploying a unified schedule to generate microservices in the cloud or on a central server, further includes: S120: For various data acquisition protocols, corresponding edge acquisition and storage integrated microservices are built and deployed to multiple edge hardware devices respectively; among them, the edge acquisition and storage integrated microservices integrate data acquisition functions and data storage logic.

[0029] Specifically, as a preferred embodiment, in this cloud-edge collaborative time-series data time schedule alignment method, step S120: constructing corresponding edge acquisition and storage integrated microservices for various data acquisition protocols and deploying them to multiple edge hardware devices includes: S121: Construct corresponding edge acquisition and storage integrated service images for various data acquisition protocols; among them, the edge acquisition and storage integrated service image integrates data acquisition functions and data storage logic; S122: Instantiate each edge acquisition and storage service image into a corresponding edge acquisition and storage microservice, and deploy each edge acquisition and storage microservice to multiple edge hardware devices to ensure that each edge hardware device accesses the microservice generated by the timetable.

[0030] The technical solution provided in this application constructs edge acquisition and storage integrated service images for different data acquisition protocols. Each edge acquisition and storage integrated service image integrates data acquisition functionality and data storage logic. This allows the data acquisition function to collect high-frequency time-series data as specified in the aforementioned data acquisition protocols, and the data storage logic to store this high-frequency time-series data. Furthermore, each edge acquisition and storage integrated service image is instantiated into a corresponding edge acquisition and storage integrated microservice and deployed to the corresponding edge hardware devices. Each edge hardware device can then use this edge acquisition and storage integrated microservice to access the timetable generation microservice. Specifically, a unified timetable for the microservice is generated by subscribing to the timetable of the aforementioned cloud or central server, and a unified timestamp and time command are downloaded via a message queue.

[0031] In a preferred embodiment, the step of constructing corresponding edge acquisition and storage integrated service images for the various data acquisition protocols described above involves building the edge acquisition and storage integrated service image by encapsulating the data acquisition program and data storage logic for a specific protocol within a container image. Preferably, the container is a Docker container.

[0032] S130: Each edge data acquisition and storage microservice starts the data acquisition function to collect time-series data from industrial IoT devices; The technical solution provided in this application encapsulates each edge data acquisition and storage service image within a container image, thereby ensuring the functional integrity of the edge data acquisition and storage service image. This achieves stability in high-frequency data acquisition and standardization in data storage. Through the aforementioned container image, each edge data acquisition and storage microservice initiates its data acquisition function, collecting time-series data from industrial IoT devices. This time-series data is high-frequency; by subscribing to a unified timetable deployed in the cloud or central processing unit, the edge data acquisition and storage microservice obtains a unified timestamp, which is then compared with the local timestamp for use.

[0033] S140: Each edge acquisition and storage integrated microservice subscribes to a unified schedule published by the schedule generation microservice, so that the schedule generation microservice sends a message containing a unified timestamp and storage instructions to the edge acquisition and storage integrated microservice through a message queue.

[0034] In one preferred embodiment, a message queue is integrated within the schedule generation microservice to implement a unified schedule message publish and subscribe communication mode. The edge data acquisition and storage integrated microservice has data acquisition capabilities and data storage logic. Through this data acquisition and data storage logic, it can subscribe to messages containing a unified timestamp and storage instructions from the schedule generation microservice deployed in the cloud or central server. These messages are encapsulated through a message queue, enabling the download of the unified timestamp and the implementation of the aforementioned data storage logic according to the storage instructions.

[0035] S150: Each edge data acquisition and storage microservice, upon receiving a message containing a unified timestamp and a storage instruction, compares the unified timestamp with the local timestamp recorded when it acquired the data. In a preferred embodiment, the step of comparing the unified timestamp with the local timestamp recorded when it acquired the data includes calculating the absolute difference between the local timestamp and the unified timestamp.

[0036] After receiving a unified timestamp and storage instruction, each edge data acquisition and storage integrated microservice compares the unified timestamp with the local timestamp recorded when it collects data. The steps include: calculating the absolute difference between the local timestamp and the unified timestamp, and determining whether the absolute difference is within a preset allowable error range. The allowable error range includes the error range defined by the minimum and maximum values ​​of the historically available absolute differences.

[0037] S160: If the difference between the local timestamp and the unified timestamp is within the preset allowable error range, the edge data acquisition and storage integrated microservice uses the unified timestamp to format the collected time-series data and stores it in the database; if the difference exceeds the allowable error range, the preset error handling process is executed.

[0038] Combination Figure 2 As can be seen from the overall process shown, in a preferred embodiment, in this cloud-edge collaborative data timetable alignment method, if the difference exceeds the allowable error range, a preset error handling process is executed, including one or more of the following: discarding the batch of data, recording an error log, and storing and marking it as unaligned data using a local timestamp.

[0039] In summary, the cloud-edge collaborative time-series data time-series alignment method provided in this application embodiment unifies the time-series generation microservice. Specifically, the time-series generation microservice is deployed in the cloud or on a central server; multiple edge acquisition and storage integrated microservices are built for various data acquisition protocols and deployed to corresponding edge hardware devices; each edge acquisition and storage integrated microservice collects time-series data from industrial IoT devices; subscribes to a unified time-series message; the time-series generation microservice sends a message containing a unified timestamp and storage instructions to the edge acquisition and storage integrated microservice via a message queue; the message is compared with the local timestamp; if the timestamp difference is within the allowable error range, the collected time-series data is formatted using the unified timestamp and stored in the database; if it exceeds the range, a preset error handling process is executed. By building and deploying a unique time-series generation microservice, a unified time-series is generated, thereby solving the problems in the prior art where all acquisition services run in one place, making it difficult to unify the timestamps of the collected data, and increasing the difficulty and complexity of subsequent data processing. Furthermore, it solves the problems of large data volume and poor performance in high-frequency, multi-location scenarios in the prior art.

[0040] See also: Figure 2 , Figure 2 This is a flowchart illustrating the second cloud-edge collaborative time-series data time-series alignment method provided in this application embodiment. (See attached diagram.) Figure 2 As shown, the time-series data time-series alignment method for cloud-edge collaboration includes: S201: Encapsulate and deploy the schedule to generate microservices.

[0041] S202: Encapsulate the acquisition service and storage logic into an edge acquisition and storage integrated microservice image.

[0042] S203: Deploy an integrated edge data acquisition and storage microservice to the edge.

[0043] S204: Start collecting data, subscribe to the message queue, and wait for storage requests and unified timestamps.

[0044] S205: Send data storage requests and unified timestamps via message queue.

[0045] S206: Encapsulate the data storage request and unified timestamp into a message queue and send it to the message queue.

[0046] S207: Received storage request and unified timestamp. S208: Determine if the time difference is acceptable. If yes, proceed to step S209; otherwise, proceed to S210.

[0047] S209: Apply timestamps to store data.

[0048] S210: Subsequent processing will not be exemplified here.

[0049] In conclusion, Figure 2 The technical solution provided in the illustrated embodiment involves building and deploying a unique timetable generation microservice, which generates a unified timetable containing a message queue. Then, various protocol collection services, along with data storage logic, are merged and encapsulated into various edge data collection and storage integrated service images. Each edge data collection and storage integrated service is then instantiated as a microservice, i.e., an edge data collection and storage integrated microservice, and deployed to edge hardware to ensure access to the timetable generation microservice. Each edge data collection and storage integrated microservice enables its collection function, collecting data but not storing it immediately. Next, each edge data collection and storage integrated microservice subscribes to the unified timetable published by the timetable generation microservice. The timetable generation microservice contains the unified timetable and publishes timestamps and storage requests via the message queue. Finally, each edge data collection and storage integrated microservice receives storage requests and timestamps via the message queue and compares them with its own timestamp. If the time difference is within acceptable limits, it is organized into a time-series data format according to the received timestamp and stored in the database for subsequent processing. If the time difference is unacceptable, other processing is performed, depending on the actual situation; examples are not provided here.

[0050] pass Figure 2 The method shown in this application provides a technical solution that can generate microservices with a unified timetable. Regardless of where each storage service runs or how fast the transmission speed is, the timestamp can be unified before storage, which greatly facilitates subsequent processes.

[0051] In addition, the following embodiments of this application provide product embodiments, the beneficial effects of which are the same as those of the cloud-edge collaborative time-series data time schedule alignment method provided in the above embodiments, and other technical features in the product embodiments are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0052] See Figure 3 , Figure 3 This application provides a schematic diagram of the structure of a cloud-edge collaborative time-series data time-series time-series alignment system. For example... Figure 3 As shown, the cloud-edge collaborative time-series data time-series ... Figure 3 The edge segment physical hardware A, edge segment physical hardware B, edge segment physical hardware C, and edge segment physical hardware D shown correspond to a data acquisition protocol (e.g., ...). Figure 3The data acquisition protocols shown are A, B, C, and D, and it integrates a data acquisition unit, a data storage unit, and a message communication unit. The data acquisition unit is... Figure 3 The system includes devices and sensors; the message communication unit is used to subscribe to messages from the time schedule generation microservice module, and the data storage unit performs data storage operations after receiving a unified timestamp that meets the time alignment conditions.

[0053] The cloud-edge collaborative time-series data schedule alignment system provided in this application generates a unified schedule by building and deploying a unique schedule generation microservice. This schedule alignment system unifies the schedule generation microservice, ensuring that timestamps are unified before storage, regardless of the location or transmission speed of each storage service, greatly facilitating subsequent processes. This solution addresses the problems in existing technologies where all data acquisition services run in one location, making it difficult to unify timestamps and increasing the difficulty and complexity of subsequent data processing. It also solves the problems of large data volumes and low schedule alignment efficiency in high-frequency, multi-location scenarios.

[0054] See Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 4 As shown, the electronic device includes: A memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor, when executing the program, implements a time-series data time-series alignment method for cloud-edge collaboration as provided by any of the above technical solutions.

[0055] like Figure 4As shown, the electronic device can include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory ROM 1002 or a program loaded from a storage device 1003 into a random access memory RAM 1004. The RAM 1004 also stores various programs and data required for the operation of the electronic device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. The communication device 1009 can operate the electronic device to exchange data with other devices via wireless or wired communication. Although the diagram shows a model building device with various systems, it should be understood that it is not required to implement or have all of the systems shown. It is possible to implement or have more or fewer systems alternatively.

Claims

1. A method for aligning time-series data schedules in a cloud-edge collaborative manner, characterized in that, include: A unified timetable generation microservice is deployed in the cloud or on a central server. This microservice generates a unified timetable and publishes messages containing a unified timestamp and storage instructions. Corresponding edge acquisition and storage microservices are built for various data acquisition protocols and deployed to multiple edge hardware devices. Each edge acquisition and storage microservice integrates data acquisition functionality and data storage logic. Each edge acquisition and storage microservice initiates its data acquisition function to collect time-series data from industrial IoT devices. Each edge acquisition and storage microservice subscribes to the unified timetable published by the timetable generation microservice, enabling the timetable generation microservice to send messages containing a unified timestamp and storage instructions to the edge acquisition and storage microservice via a message queue. Upon receiving the message containing a unified timestamp and storage instructions, each of the edge data acquisition and storage integrated microservices compares the unified timestamp with the local timestamp recorded when it collects data. If the difference between the local timestamp and the unified timestamp is within a preset allowable error range, the edge data acquisition and storage integrated microservice uses the unified timestamp to format the collected time-series data and stores it in the database. If the difference exceeds the allowable error range, a preset error handling process is executed.

2. The method according to claim 1, characterized in that, The timetable generation microservice is a globally unique service instance, responsible for providing a unified time benchmark for all distributed edge data acquisition and storage microservices.

3. The method according to claim 1, characterized in that, The steps of constructing corresponding edge acquisition and storage microservices for various data acquisition protocols and deploying them to multiple edge hardware devices include: For various data acquisition protocols, corresponding edge acquisition and storage integrated service images are constructed; wherein, the edge acquisition and storage integrated service image integrates data acquisition functions and data storage logic; Each edge acquisition and storage integrated service image is instantiated into a corresponding edge acquisition and storage integrated microservice, and each edge acquisition and storage integrated microservice is deployed to multiple edge hardware devices to ensure that each edge hardware device accesses the microservice generated by the timetable.

4. The method according to claim 3, characterized in that, The edge acquisition and storage integrated service image is constructed by encapsulating a data acquisition program and data storage logic for a specific protocol in a container image.

5. The method according to claim 1, characterized in that, The timetable generation microservice integrates a message queue to implement the message publishing and subscription communication mode of the unified timetable. The message publishing of the unified timetable includes publishing a message containing a unified timestamp and storage instructions.

6. The method according to claim 1, characterized in that, After receiving the unified timestamp and storage instruction message, each of the edge data acquisition and storage integrated microservices compares the unified timestamp with the local timestamp recorded when it collects data, including: Calculate the absolute difference between the local timestamp and the unified timestamp; determine whether the absolute difference is within a preset allowable error range; the allowable error range includes the error range defined by the minimum and maximum values ​​of the historically available absolute differences.

7. The method according to claim 1, characterized in that, If the difference exceeds the allowable error range, a preset error handling process is executed, including one or more of the following: discarding the batch of data, recording an error log, and storing and marking the data as unaligned using the local timestamp.

8. A cloud-edge collaborative time-series data time-series ... include: The timetable generation microservice module, deployed in the cloud or on a central server, is used to generate a unified timetable and publish messages through a built-in message queue. Multiple edge data acquisition and storage integrated microservice modules are deployed on multiple edge hardware devices. Each module corresponds to a data acquisition protocol and integrates a data acquisition unit, a data storage unit, and a message communication unit. The message communication unit is used to subscribe to messages from the time schedule generation microservice module, and the data storage unit performs data storage operations after receiving a unified timestamp that meets the time alignment conditions.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the program, it implements the cloud-edge collaborative time-series data time schedule alignment method as described in any one of claims 1 to 7.

10. A computer storage medium having a computer program stored thereon, characterized in that, When the computer program is executed, it implements the cloud-edge collaborative time-series data time schedule alignment method as described in any one of claims 1 to 7.