Processing method, device and equipment based on time series data of Internet of Things and medium
Through the structure and visual processing of IoT timing data, visual information of the current cycle is generated, and the problem of being unable to quickly respond to business changes or new data needs in the existing technology, real-time data visualization and incremental refresh are realized.
Patent Information
- Application Number
- CN202510872224.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-06-26
AI Technical Summary
In the prior art, the visual processing of IoT timing data can only realize the display of historical data, resulting in operation and maintenance personnel and business decision makers being unable to respond quickly to business changes or new data needs.
The message object in the current cycle is structured and visualized, the first information is generated, and the second information of the corresponding time span is deleted from the visualization window of the previous cycle, and the visualization information of the current cycle is merged to ensure the coherent display of new data and old data.
It realizes rapid visual processing and display of real-time data, supports operation and maintenance personnel and decision makers to respond to business changes or new data needs in a timely manner, while maintaining the consistency of data visualization information.
Smart Images

Figure CN120492528A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a method, device, equipment and medium for processing time series data based on the Internet of Things. Background Art
[0002] In today's IoT and digital twin systems, massive heterogeneous devices continuously generate high-frequency, real-time time-series data through message queue protocols. This data is widely used in scenarios such as device monitoring, status assessment, trend analysis, and predictive maintenance.
[0003] In order to enable operation and maintenance personnel and business decision makers to make real-time judgments and responses to the business based on the obtained data, front-end or back-end developers will visualize the obtained data in the form of code.
[0004] However, the above-mentioned data visualization processing can only realize the visualization processing of the historical data that has been obtained. This will result in that operation and maintenance personnel and business decision makers cannot quickly respond to business changes or new data requirements. Summary of the Invention
[0005] The present invention provides a processing method, device, equipment and medium based on Internet of Things time series data, which solves the problem that only historical data can be visualized, resulting in staff being unable to quickly respond to business changes or new data requirements, and realizes real-time visualization processing and visualization display of newly obtained data.
[0006] According to one aspect of the present invention, a method for processing IoT time series data is provided, which is applied to IoT devices. The method includes:
[0007] Structural processing and visualization processing are sequentially performed on the message objects of the current period to obtain first information.
[0008] According to the first information, the second information is determined and deleted from the visualization information corresponding to the visualization window in the previous period to obtain the remaining information, wherein the time span of the visualization window is greater than the time span of the first information, the time span of the first information is equal to the time span of the second information, and the second information is the earliest piece of information in the visualization information corresponding to the visualization window in the previous period.
[0009] Visualization information corresponding to the visualization window in the current period is generated according to the remaining information and the first information.
[0010] The processing method based on time series data of the Internet of Things provided by the embodiment of the present invention sequentially performs structured processing and visualization processing on the message objects of the current cycle to obtain first information; based on the first information, determines and deletes the second information from the visualization information corresponding to the previous cycle in the visualization window to obtain the remaining information; based on the remaining information and the first information, generates the visualization information corresponding to the current cycle in the visualization window. In the above technical solution, on the one hand, the structured processing and visualization processing of the message objects of the current cycle can realize the rapid visualization of real-time data, which is convenient for the subsequent direct display of real-time visualization information to operation and maintenance personnel and decision managers. On the other hand, based on the time span of the first information, determines and deletes the second information from the visualization information corresponding to the previous cycle in the visualization window, and merges the remaining information displayed in the visualization window of the previous cycle with the first information of the current cycle corresponding to the newly obtained message object in the current cycle to generate the visualization information corresponding to the current cycle in the visualization window, which solves the problem that only historical data can be visualized, resulting in the inability of staff to quickly respond to business changes or new data requirements, and realizes real-time visualization processing and visualization display of newly obtained data. Furthermore, the visualization information generated in the visualization window not only includes the first information corresponding to the newly added message object of the current cycle, but also includes part of the information in the visualization window in the previous cycle, that is, the remaining information, which realizes the incremental refresh of the visualization of the data and ensures the continuity of the data visualization information when visually displaying new data and old data.
[0011] According to another aspect of the present invention, a processing device based on IoT time series data is provided, which is applied to IoT devices. The device includes:
[0012] The preprocessing module is used to perform structural processing and visual processing on the message objects of the current period in sequence to obtain first information.
[0013] A processing module is used to determine and delete second information from the visualization information corresponding to the visualization window in the previous period based on the first information to obtain remaining information, wherein the time span of the visualization window is greater than the time span of the first information, the time span of the first information is equal to the time span of the second information, and the second information is the earliest piece of information in the visualization information corresponding to the visualization window in the previous period.
[0014] The generating module is used to generate the visualization information corresponding to the visualization window in the current period according to the remaining information and the first information.
[0015] According to another aspect of the present invention, an Internet of Things device is provided, the Internet of Things device comprising:
[0016] at least one processor; and
[0017] a memory communicatively connected to at least one processor; wherein,
[0018] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor can execute the processing method based on Internet of Things time series data of any embodiment of the present invention.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions. The computer instructions are used to enable a processor to implement the processing method based on Internet of Things time series data according to any embodiment of the present invention when executed.
[0020] According to another aspect of the present invention, a computer program product is provided, including a computer program, which, when executed by a processor, implements the processing method based on Internet of Things time series data according to any embodiment of the present invention.
[0021] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 A flowchart of a method for processing IoT time series data provided by an embodiment of the present invention;
[0024] Figure 2 A flowchart of another method for processing IoT time series data provided by an embodiment of the present invention;
[0025] Figure 3 A schematic diagram of the structure of a processing device based on IoT time series data provided by an embodiment of the present invention;
[0026] Figure 4 A schematic diagram of the structure of an Internet of Things device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "current", "previous", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] Figure 1 A flowchart of a processing method based on IoT time series data provided in an embodiment of the present invention is provided. This embodiment is applicable to situations where real-time data is to be visualized. The method can be executed by a processing device based on IoT time series data, which can be implemented in the form of hardware and / or software, and can be configured in an IoT device. In this embodiment, an IoT device is equivalent to an IoT system. An IoT device is presented in the form of an electronic device. An electronic device can refer to a computer or a terminal device. Figure 1 As shown, the method includes:
[0030] S101: Perform structural processing and visualization processing on message objects of the current period in sequence to obtain first information.
[0031] A message object refers to the data received by an IoT device from a target topic or queue according to the message protocol rules. In this embodiment, a cycle is determined by a preset data refresh rate. Structuring is the process of converting data into structured objects. Visualization is the process of visualizing data.
[0032] Specifically, IoT devices listen to predetermined target topics or queues based on connectors and receive data in real time according to the message protocol rules. The data enters the access channel in the form of message objects. At this time, the period can be determined based on the pre-set data refresh frequency. For example, if the refresh frequency is 10s, the message objects of the current period are: based on the current moment, all message objects received between the last refresh to the current moment and the next refresh are the message objects of the current period. After obtaining the message objects of the current period, the message objects are first structured to obtain structured objects. The structured objects are then visualized to obtain the first information. The first information is the visualized data after the visualization of the message objects of the current period.
[0033] In this embodiment, message objects are divided into message objects with different periods according to a preset refresh frequency, providing a basis for refreshing visualization information at the same refresh frequency. Furthermore, structuring and visualizing message objects in the current period enables rapid visualization of real-time data, facilitating the subsequent direct presentation of real-time visualization information to operations and maintenance personnel and decision-makers.
[0034] S102: According to the first information, determine and delete the second information from the visualization information corresponding to the visualization window in the previous period to obtain remaining information.
[0035] The time span of the visualization window is greater than the time span of the first information, the time span of the first information is equal to the time span of the second information, and the second information is the earliest information in the visualization information corresponding to the visualization window in the previous cycle.
[0036] Specifically, the visualization window is a window that displays the visualized data. When the first information is obtained, it can be determined whether there is already visualized data displayed on the visualization window. For example, if the "message object of the current cycle" is the first round of message objects received by the IoT device, it can be determined that no visualized data is displayed on the visualization window. That is, as long as the "message object of the current cycle" is not the first round of message objects received by the IoT device, the visualization information corresponding to the previous cycle of the visualization window can be obtained, and according to the time span of the first information, the earliest section of information displayed in the visualization window can be determined and deleted, that is, the second information is deleted. After deleting the second information, the remaining visualization information corresponding to the previous cycle displayed on the visualization window is the remaining information.
[0037] For example, assume that the time span of the visualization window is one hour. That is, the visualization information displayed in the visualization window is data within one hour. At this time, the first information is obtained, and the time span of the first information, that is, the cycle length corresponding to the current cycle, is 20 minutes. Then, first determine that the span of the visualization information corresponding to the visualization window in the previous cycle is from 10:10 am to 11:10 am. Then, based on the time span of 20 minutes of the first information, the visualization information corresponding to the visualization window in the previous cycle from 10:10 am to 10:30 am, that is, the second information, can be deleted. Then, the remaining visualization information from 10:30 am to 11:10 am is the remaining information.
[0038] In this embodiment, based on the time span of the first information, the second information is determined and deleted from the visualization information corresponding to the previous period in the visualization window, so that a position to be filled in the visualization window can be reserved for the newly introduced first information corresponding to the current period. While achieving the consistency of the time span of the visualization window, after obtaining the new data of the current period, the old data can be eliminated according to the time span of the new data, providing a basis for adding visualization information of the new data in the visualization window.
[0039] S103: Generate visualization information corresponding to the visualization window in the current period according to the remaining information and the first information.
[0040] Specifically, after deleting the second information and obtaining the remaining information, the remaining information can be merged with the first information to generate visualization information corresponding to the current period in the visualization window of the current period after obtaining the message object of the current period.
[0041] In this embodiment, the remaining information displayed in the visualization window of the previous cycle is combined with the first information of the current cycle corresponding to the newly obtained message object of the current cycle to generate the visualization information corresponding to the current cycle in the visualization window. This solves the current problem of only being able to visualize historical data, which makes it impossible for staff to quickly respond to business changes or new data needs. It realizes real-time visualization processing and visualization of newly obtained data. Furthermore, the visualization information generated in the visualization window includes not only the first information corresponding to the newly added message object of the current cycle, but also includes part of the information in the visualization window of the previous cycle, namely the remaining information. This realizes the incremental refresh of the data visualization and ensures the consistency of the data visualization information when visually displaying new and old data.
[0042] The processing method based on time series data of the Internet of Things provided by the embodiment of the present invention sequentially performs structured processing and visualization processing on the message objects of the current cycle to obtain first information; based on the first information, determines and deletes the second information from the visualization information corresponding to the previous cycle in the visualization window to obtain the remaining information; based on the remaining information and the first information, generates the visualization information corresponding to the current cycle in the visualization window. In the above technical solution, on the one hand, the structured processing and visualization processing of the message objects of the current cycle can realize the rapid visualization of real-time data, which is convenient for the subsequent direct display of real-time visualization information to operation and maintenance personnel and decision managers. On the other hand, based on the time span of the first information, determines and deletes the second information from the visualization information corresponding to the previous cycle in the visualization window, and merges the remaining information displayed in the visualization window of the previous cycle with the first information of the current cycle corresponding to the newly obtained message object in the current cycle to generate the visualization information corresponding to the current cycle in the visualization window, which solves the problem that only historical data can be visualized, resulting in the inability of staff to quickly respond to business changes or new data requirements, and realizes real-time visualization processing and visualization display of newly obtained data. Furthermore, the visualization information generated in the visualization window not only includes the first information corresponding to the newly added message object of the current cycle, but also includes part of the information in the visualization window in the previous cycle, that is, the remaining information, which realizes the incremental refresh of the visualization of the data and ensures the continuity of the data visualization information when visually displaying new data and old data.
[0043] Figure 2 This is a flow chart of another method for processing IoT time series data provided by an embodiment of the present invention. Based on the above embodiments and other examples, this embodiment provides a detailed description of "structuring and visualizing message objects" and "generating visual information corresponding to the current cycle in the visualization window." Figure 2 As shown, the method includes:
[0044] S201: Perform structured processing on the message objects of the current cycle to obtain structured data of the current cycle.
[0045] Optionally, before obtaining the message object, you also need to perform the following operations:
[0046] IoT devices include multiple connectors. Based on the same connection adapter mechanism, the devices implement corresponding connectors for different message queue protocols. For example, the connector is instantiated at the initialization time and establishes a persistent connection to the corresponding message middleware. Before establishing the connection, the following information can be defined, such as specifying the message queue topic or channel to be monitored and mapping the fields in the original message body to standard fields within the device. It supports extracting timestamps from specified fields in the message, configuring the time format, and supporting a fallback mechanism based on the current device to generate timestamps when the message does not contain a timestamp. After defining the above configuration, each connector of the device will continuously listen to the target topic or queue according to the above configuration and receive new data in real time according to the message protocol rules. At this time, the data enters the access channel in the form of a "message object". Optionally, it supports multi-channel concurrent reception and uses asynchronous coroutines / thread pools to improve throughput.
[0047] Specifically, after receiving the message object of the current period according to the preset period, the message object can be processed according to the preset structured processing method to obtain the structured data of the current period.
[0048] Exemplarily, the step of obtaining structured data of the current period includes:
[0049] (1) Determine whether the message object of the current cycle has a corresponding parsing function; if so, execute (2); if not, execute (3).
[0050] Specifically, after receiving the message data for the current cycle, the device determines whether a corresponding parsing function exists for the message object. Parsing functions are only used when the manufacturer has customized the encoding or the message structure is complex. Therefore, it is necessary to first determine whether a corresponding parsing function exists for the message object for the current cycle.
[0051] (2) Utilize the parsing function to parse the message object of the current cycle to obtain the structured data of the current cycle.
[0052] Specifically, when it is determined that a parsing function exists, the parsing function may be used to parse the message object of the current period to obtain a structured object, that is, structured data of the current period.
[0053] For example, the logic of using the parsing function to perform structural processing on the message object is: t =P(M raw ), where M raw is the message object, P(·) is the parsing function, D t It is standard structured time series data, including timestamp t, value v, and label tag.
[0054] (3) Standardizing the message objects of the current cycle using the preset data fields to obtain the structured data of the current cycle.
[0055] Specifically, if there is no parsing function corresponding to the message data, the message object is standardized using the pre-set data fields, that is, the message object is standardized into a unified "time series data structure".
[0056] Exemplarily, the preset data fields generally include: timestamp: data timestamp; metric: indicator identifier (such as temperature, voltage); value: numerical value; tags: optional context tags such as device ID, floor, room number, etc.
[0057] Optionally, when standardizing data timestamps, the device also needs to perform integrity and chronological verification on the timestamp field. For example, if the message does not contain a timestamp field, the receipt time is added; if the time format is non-standard, it is converted to Unix timestamp milliseconds; for data arriving out of order, the device supports lightweight timestamp-based reordering and buffering (e.g., reordering within a maximum delay of 5 seconds).
[0058] After structural processing, the structured data of the current cycle can be expressed as: D t ={t, v, tag}.
[0059] In this embodiment, the message object is structured to obtain structured time series data, which ensures the consistency of the data while providing a basis for subsequent data visualization. For example, standardized time series data processing is more efficient, facilitates data analysis and mining, and can display data more intuitively and accurately during visualization.
[0060] S202: Perform data aggregation and visualization processing on the structured data of the current period to generate visualized first information.
[0061] Among them, data aggregation and visualization processing is to process the data in an aggregated manner and then perform visualization operations on the data.
[0062] Specifically, data aggregation and visualization can be performed as follows:
[0063] (1) Processing the structured data of the current period according to a preset aggregation method to obtain aggregated data.
[0064] The aggregation method includes at least one of time dimension aggregation, sliding window aggregation, and trend line fitting.
[0065] Specifically:
[0066] (1) If the aggregation method includes time dimension aggregation, the time bucket corresponding to the structured data of the current period is determined according to the timestamp of the structured data of the current period, the aggregation result within each time bucket is obtained, and the aggregation result within each time bucket is determined as the aggregated data.
[0067] Among them, time dimension aggregation refers to aggregating time series data according to a specified time granularity (for example, by minute, hour, etc.).
[0068] For example, suppose there is a set of time series data {(t1, v1), (t2, v2), ..., (t n , v n )}, where t i is the timestamp, v i At time point t i The time granularity is Δt, such as every minute or every hour. For each data point t i Round off to get the corresponding time bucket: t bucket (t i )=|t i / △t|*△t. After that, all data points in the same time bucket are aggregated. Common aggregation operations include summing, averaging, maximum or minimum, etc. Assuming that the average value is chosen, the aggregation formula is: agg (t bucket )=1 / N∑ i=1 N *v i . Among them, N is the number of data points in the same time bucket. Finally, the aggregation results in each time bucket are output {[t bucket , v agg (t bucket )]}.
[0069] (2) If the aggregation method includes sliding window aggregation, the smoothed data value corresponding to the structured data of the current period is determined according to the structured data of the current period and the preset sliding window range, and the smoothed data value corresponding to the structured data of the current period is determined as the aggregated data.
[0070] Among them, sliding window aggregation is used to smooth the real-time data stream. Common operations include sliding average, maximum value, minimum value, etc.
[0071] For example, suppose there is a set of time series data {(t1, v1), (t2, v2), ..., (t n , v n )}, where t i is the timestamp, v i At time point t i The sliding window size is W, which means that at most W data points are stored in the window. For each data point vi , where the window is the data point in [i-W+1, i]. Aggregate all data points in the window.
[0072] For example, to find the sliding average within the window:
[0073] Alternatively, if you want to calculate the maximum or minimum value, you can change the aggregate function to the maximum or minimum function: or Finally, the output is at each time point t i Smoothed data value v on smooth (i).
[0074] (3) If the aggregation method includes trend line fitting, the fitted trend line is determined based on the structured data of the current period and the fitting method, and the fitted trend line is determined as the aggregated data.
[0075] Among them, trend line fitting is to fit the trend line of the data based on past data points using methods such as linear regression.
[0076] For example, suppose there is a set of time series data {(t1, v1), (t2, v2), ..., (t n , v n )}, where t i is the timestamp, v i At time point t i The value on .
[0077] Compute the mean of the data:
[0078] Calculate the slope m and intercept b:
[0079] Calculate the fitted value of the trend line: v trend (t i )=m*t i +b.
[0080] At this point, the predicted value of the trend line can be output: {[t i , v trend (t i )]}.
[0081] Optionally, extreme value analysis can be performed to identify the maximum and minimum values in the data, ultimately determining local extreme points.
[0082] Optionally, after processing the structured data of the current period according to a preset aggregation method to obtain aggregated data, the branching steps can also be executed synchronously:
[0083] (1) Determine the target message middleware based on the data access configuration.
[0084] A connector establishes a connection with a message middleware. Data access configuration refers to the pre-access configuration that users perform on the device to obtain data. For example, this involves setting the message queue protocol type, data topic, field mapping, timestamp parsing rules, selecting a default adapter, pre-setting data access configuration, and enabling data stream subscriptions.
[0085] Specifically, if the target message middleware has not changed, that is, the user has not changed the "message protocol type", then (2) is directly executed; if the target message middleware has changed, then the target message middleware needs to be adjusted according to the data access configuration.
[0086] (2) Based on the target connector connected to the target message middleware, obtain the message object of the next cycle.
[0087] Specifically, after the device first determines the target message middleware, it uses a connector to connect to the target message middleware. The connected connector becomes the target connector. At this point, the device can directly obtain the message object for the next cycle based on the target connector.
[0088] Furthermore, after obtaining the message object of the next cycle, the message object of the next cycle can be directly used as the message object of the current cycle, and the process returns to step S301.
[0089] Please note that the "synchronous execution branch step" is executed synchronously, that is, the following operations are continued on the original "structured data of the current cycle", while the message object of the next cycle is received and returned as the message object of the current cycle to execute step S201. According to the above description, the message objects obtained in "real time" can be dynamically and continuously visualized without interruption. Optionally, the acquisition of the "message object of the next cycle" can also be performed after "processing the structured data of the current cycle in any aggregation method".
[0090] (2) Visualizing the aggregated data according to a preset visualization configuration to obtain first information.
[0091] Specifically, the preset visualization configuration is a configuration for visualizing data. For example, each floor of each building is equipped with an energy collection device, and the device reports the real-time electricity consumption data of each meter through a certain protocol at a certain period. In this case, the preset visualization configuration is to select the access source configured in the previous step as the data source; set the display dimensions to floor number (Floor) and meter number (Meter ID); select kilowatt-hour as the display value for the display field; set the chart type to a line chart; set the chart style to blue as the main color, "kilowatt-hour (kWh)", and enable dual Y-axes; refresh frequency: set to automatically refresh every 5 seconds; time window: select "past 1 hour" data as the display interval; data processing method: enable the "sliding average" processing algorithm, and set the sliding window width to 5 minutes; other interactive settings: enable chart zoom, floating prompts, export functions, etc.
[0092] S203: According to the first information, determine and delete the second information from the visualization information corresponding to the visualization window in the previous period to obtain remaining information.
[0093] Specifically, upon obtaining the first information, the visualization window can be retrieved for the previous period. Based on the time span of the first information, the earliest period of information displayed in the visualization window is determined and deleted, i.e., the second information is deleted. After deleting the second information, the remaining visualization information corresponding to the previous period displayed in the visualization window is the remaining information.
[0094] S204: Determine an information access point according to the start timestamp of the first information and the end timestamp of the remaining information.
[0095] Specifically, since each data point in the first information includes a timestamp, the timestamp with the greatest difference between the time recorded by the timestamp of each data point in the first information and the current time can be determined. This timestamp is the starting timestamp. Furthermore, the ending time of the remaining information can be determined, i.e., the ending timestamp. Based on these two timestamps, the information access point can be determined.
[0096] For example, continuing with the above example, if the time span of the remaining information is from 10:30 AM to 11:10 AM, then the end timestamp would be 11:10 AM. Furthermore, if the start timestamp of the first information is 11:11 AM, then the information access point can be determined to be between 11:10 AM and 11:11 AM. The "between" here is because the time used in this example is relatively large; in actual situations, the information access point may be a time point of seconds or even smaller.
[0097] S205 : splicing the first information and the remaining information based on the information access point to obtain visualization information corresponding to the visualization window in the current period.
[0098] Specifically, after determining the information access point, the first information can be spliced onto the remaining information at the location of the information access point to achieve incremental data update, and displayed in the visualization window, which is the visualization information corresponding to the current period.
[0099] In this embodiment, by splicing the newly acquired first information with the remaining information corresponding to the previous cycle and displaying them in a visualization window, the user can see the continuously spliced and visualized first information while viewing the remaining information displayed in the visualization window, thereby achieving a dynamic visualization of the data based on the updated data. Furthermore, based on the above steps, since the message object of each cycle is automatically generated after the first information is triggered, it is possible to view the dynamic visualization data update without refreshing the visualization window. Furthermore, since the visualization process is performed on each acquired message object first, when the visualization window is incrementally refreshed, the visualization information corresponding to the incremental message object is directly and dynamically generated.
[0100] Optionally, in this embodiment, all message object acquisition, data structured processing, and visualization processing can be displayed on the browser side of the IoT device. Data updates, that is, the setting of a cycle, can be accurate to the second level or higher, depending on the refresh rate setting.
[0101] Optionally, during the above process, users can modify the visualization window's time window span, sliding average period, and fitting function (e.g., to linear fit, polynomial fit, etc.) as needed. The device will instantly recalculate the data, push the new calculation results, and display them in the visualization window. The visualization window will automatically refresh and display the visualization information based on the new algorithm. Furthermore, users can switch chart types in the visualization window (e.g., from a line chart to a bar chart, area chart, donut chart, or gauge chart), modify colors, axis labels, units, etc. Users can also change the refresh rate (e.g., from 5 seconds to 1 second). Modifying the visualization interface is not limited to dragging, dropping, or using templates. Furthermore, style parameter configuration options are provided, such as preset themes and custom color schemes; axis ranges, labels, gridline display, etc.; coordinate units and precision; and the display of legends, data lines, and callout lines. Furthermore, the refresh rate of data in the visualization window and the time window span of the visualization window can be modified according to user needs.
[0102] In this embodiment, the various configurations of the visualization window described above can be directly selected or set by operations and maintenance personnel and business decision makers based on the visualization window. After reconfiguration, the visual information displayed in the visualization window will quickly and dynamically respond to the configuration, enabling rapid response to business changes or new requirements. Furthermore, since the above configuration does not rely on front-end and back-end developers, it is suitable for users without a technical background. Furthermore, since the visualization settings allow the selection of various data aggregation processes, data extreme value determination, and other data analyses, the visualized information provides a deeper level of data presentation.
[0103] Optionally, in this embodiment, when receiving message objects based on multiple connectors in an IoT device, the IoT device supports multiple mainstream message queue protocols. Furthermore, users can select a target message queue from the IoT device's registered data sources. Fuzzy matching is supported for input, and hierarchical topics can be selected from a tree structure. The backend pulls the latest data, i.e., message objects, from the corresponding message queue based on configuration parameters.
[0104] Optionally, the visualization window of this embodiment supports cross-chart linkage operations. For example, multiple charts can share the same timeline, making it easier to observe linkage changes in multiple dimensions. When a user hovers over a time point on Chart 1, Charts 2 and 3 automatically highlight the data at that time point. When a chart is zoomed in or out, the other charts automatically respond.
[0105] Figure 3 This is a schematic diagram of the structure of a processing device based on IoT time series data provided by an embodiment of the present invention. Figure 3 As shown, the device is applied to an Internet of Things device and includes:
[0106] The pre-processing module 301 is used to perform structural processing and visual processing on the message objects of the current period in sequence to obtain first information.
[0107] Processing module 302 is used to determine and delete second information from the visualization information corresponding to the visualization window in the previous period based on the first information to obtain remaining information, wherein the time span of the visualization window is greater than the time span of the first information, the time span of the first information is equal to the time span of the second information, and the second information is the earliest piece of information in the visualization information corresponding to the visualization window in the previous period.
[0108] The generating module 303 is configured to generate visualization information corresponding to the visualization window in the current period according to the remaining information and the first information.
[0109] Optionally, the preprocessing module 301 is specifically configured to:
[0110] The message objects of the current cycle are structured to obtain the structured data of the current cycle; the structured data of the current cycle are aggregated and visualized to generate visualized first information.
[0111] Optionally, the message objects of the current period are structured to obtain structured data of the current period. The pre-processing module 301 is specifically configured to:
[0112] Determine whether there is a corresponding parsing function for the message object of the current period; if so, use the parsing function to parse the message object of the current period to obtain the structured data of the current period; if not, use the preset data fields to standardize the message object of the current period to obtain the structured data of the current period.
[0113] Optionally, data aggregation and visualization processing are performed on the structured data of the current period to generate visualized first information. The preprocessing module 301 is specifically configured to:
[0114] The structured data of the current period is processed according to a preset aggregation method to obtain aggregated data; and the aggregated data is visualized according to a preset visualization configuration to obtain first information.
[0115] Optionally, the preset aggregation method includes at least one of time dimension aggregation, sliding window aggregation, and trend line fitting; the structured data of the current period is processed according to the preset aggregation method to obtain aggregated data, and the preprocessing module 301 is specifically used to:
[0116] If the aggregation method includes time dimension aggregation, the time bucket corresponding to the structured data of the current period is determined according to the timestamp of the structured data of the current period, the aggregation result within each time bucket is obtained, and the aggregation result within each time bucket is determined as the aggregated data; if the aggregation method includes sliding window aggregation, the smoothed data value corresponding to the structured data of the current period is determined according to the structured data of the current period and the preset sliding window range, and the smoothed data value corresponding to the structured data of the current period is determined as the aggregated data; if the aggregation method includes trend line fitting, the fitting trend line is determined according to the structured data of the current period and the fitting method, and the fitting trend line is determined as the aggregated data.
[0117] Optionally, the apparatus further includes: a connection module; the IoT device includes a plurality of connectors; after sequentially performing structured processing and visualization processing on the message objects of the current cycle to obtain the first information, the connection module is specifically configured to:
[0118] The target message middleware is determined according to the data access configuration, wherein a connector establishes a connection relationship with a message middleware; and a message object of the next cycle is obtained based on the target connector connected to the target message middleware.
[0119] Optionally, the generating module 303 is specifically configured to:
[0120] An information access point is determined according to a start timestamp of the first information and an end timestamp of the remaining information; and the first information and the remaining information are spliced based on the information access point to obtain visualization information corresponding to the visualization window in the current period.
[0121] The processing device based on IoT time series data provided by an embodiment of the present invention can execute the processing method based on IoT time series data provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0122] Figure 4 Schematic diagram of the structure of the Internet of Things device provided for an embodiment of the present invention. In this embodiment, the Internet of Things device is presented in the form of an electronic device. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0123] like Figure 4 As shown, the IoT device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the IoT device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0124] Multiple components in IoT device 10 are connected to I / O interface 15, including: input unit 16, such as a keyboard and mouse; output unit 17, such as various types of displays and speakers; storage unit 18, such as a magnetic disk and optical disk; and communication unit 19, such as a network card, modem, wireless communication transceiver, etc. Communication unit 19 allows IoT device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0125] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the processing method based on IoT time series data.
[0126] In some embodiments, the processing method based on the time series data of the Internet of Things can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the Internet of Things device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the processing method based on the time series data of the Internet of Things described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the processing method based on the time series data of the Internet of Things in any other appropriate manner (for example, by means of firmware).
[0127] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0128] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0129] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0130] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0131] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0132] A computing system may include a client and a server. The client and server are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within a cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0133] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements a processing method based on IoT time series data as provided in any embodiment of the present invention.
[0134] The computer program product may be implemented by writing computer program code for performing the operations of the present invention in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0135] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0136] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A processing method based on Internet of Things time series data, characterized in that: Applied to an IoT device, the method includes: Performing structural processing and visual processing on the message objects of the current period in sequence to obtain first information; Determining and deleting second information from the visualization information corresponding to the visualization window in the previous period based on the first information to obtain remaining information, wherein a time span of the visualization window is greater than a time span of the first information, the time span of the first information is equal to a time span of the second information, and the second information is the earliest information in the visualization information corresponding to the visualization window in the previous period; Visualization information corresponding to the visualization window in the current period is generated according to the remaining information and the first information.
2. The method for processing time series data based on the Internet of Things according to claim 1, characterized in that: The message objects of the current period are sequentially subjected to structural processing and visual processing to obtain first information, including: Performing structured processing on the message objects of the current cycle to obtain structured data of the current cycle; Data aggregation and visualization processing are performed on the structured data of the current period to generate visualized first information.
3. The method for processing IoT time series data according to claim 2, characterized in that: The structural processing of the message objects of the current cycle to obtain structured data of the current cycle includes: Determine whether there is a corresponding parsing function for the message object of the current cycle; If it exists, the message object of the current period is parsed using a parsing function to obtain the structured data of the current period; If it does not exist, the message object of the current period is standardized using the preset data field to obtain the structured data of the current period.
4. The method for processing time series data based on the Internet of Things according to claim 2, characterized in that: The performing data aggregation and visualization processing on the structured data of the current period to generate first visualized information includes: Processing the structured data of the current period according to a preset aggregation method to obtain aggregated data; The aggregated data is visualized according to a preset visualization configuration to obtain the first information.
5. The method for processing time series data based on the Internet of Things according to claim 4, characterized in that: The preset aggregation method includes at least one of time dimension aggregation, sliding window aggregation, and trend line fitting; The processing of the structured data of the current period according to a preset aggregation method to obtain aggregated data includes: If the aggregation method includes time dimension aggregation, then determining the time bucket corresponding to the structured data of the current period according to the timestamp of the structured data of the current period, obtaining the aggregation result within each of the time buckets, and determining the aggregation result within each of the time buckets as the aggregated data; If the aggregation method includes sliding window aggregation, determining a smoothed data value corresponding to the structured data of the current period according to the structured data of the current period and a preset sliding window range, and determining the smoothed data value corresponding to the structured data of the current period as the aggregated data; If the aggregation method includes trend line fitting, a fitting trend line is determined according to the structured data of the current period and the fitting method, and the fitting trend line is determined as the aggregated data.
6. The method for processing time series data based on the Internet of Things according to claim 1, characterized in that: The IoT device includes a plurality of connectors; after sequentially performing structured processing and visualization processing on message objects of the current cycle to obtain first information, the method further includes: Determine the target message middleware according to the data access configuration, wherein a connector establishes a connection relationship with a message middleware; Based on the target connector connected to the target message middleware, a message object of the next cycle is obtained.
7. The method for processing time series data based on the Internet of Things according to claim 1, characterized in that: Generating visualization information corresponding to the visualization window in the current period according to the remaining information and the first information includes: Determine an information access point according to a start timestamp of the first information and an end timestamp of the remaining information; The first information and the remaining information are spliced based on the information access point to obtain visualization information corresponding to the visualization window in the current period.
8. A processing device based on time series data of the Internet of Things, characterized in that: Applied to IoT devices, the device includes: A preprocessing module, configured to sequentially perform structural processing and visualization processing on message objects of a current period to obtain first information; a processing module, configured to determine and delete second information from the visualization information corresponding to the visualization window in the previous period based on the first information to obtain remaining information, wherein a time span of the visualization window is greater than a time span of the first information, the time span of the first information is equal to a time span of the second information, and the second information is the earliest piece of information in the visualization information corresponding to the visualization window in the previous period; A generating module is used to generate visualization information corresponding to the visualization window in the current period according to the remaining information and the first information.
9. An Internet of Things device, characterized in that: include: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the processing method based on Internet of Things time series data as described in any one of claims 1 to 7.
10. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the processing method based on Internet of Things time series data as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Workshop field data real-time monitoring and anomaly detection method based on stream processing
CN111143438A
Streaming data real-time processing method and device, equipment and medium
CN114723413A
Coal mine underground moving target real-time visualization method
CN117743453A
Cloud monitoring data visualization method and device
CN118487961A
Real-time processing method and device for equipment operation data of Internet of Things
CN119202100A