Industrial time series data storage and preprocessing method and device based on space-time big data

By using PostGIS technology in the Postgres database to convert industrial time series data into line strings, and perform combined splicing and thinning processing, the problem of low efficiency in high-frequency time series data storage and preprocessing is solved, and efficient data storage and AI are achieved. application.

CN118760679APending Publication Date: 2024-10-11刘昊松

Patent Information

Application Number
CN202410803724.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

Existing technology cannot conveniently and efficiently realize the storage and preprocessing of industrial high-frequency/ultra-high frequency time series data, resulting in low data transmission and storage efficiency and inability to meet the needs of industrial AI applications.

Method used

Build a table structure in the Postgres database, use PostGIS to convert time series data into linestrings, and perform combined splicing and thinning processing through st_union() and st_simplify functions to form a smooth data curve, eliminating the need to fill in missing values. Improved storage and processing efficiency.

Benefits of technology

It achieves convenient and efficient storage and preprocessing of high-frequency/ultra-high-frequency time series data, significantly saves storage space, and improves the efficiency of data retrieval and AI analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118760679A_ABST
    Figure CN118760679A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of big data processing, and discloses an industrial time series data storage and preprocessing method and device based on space-time big data, and the method comprises the steps: converting a plurality of points composed of values corresponding to timestamps and measuring point names in industrial time series data into meter coordinates in a PostGIS; sequentially connecting all the meter coordinates to form a line string, and storing the line string to a field corresponding to the geometry type in the table structure; the method comprises the following steps: carrying out combination splicing processing on a geometer field of a wire string through a stunion () function according to a timestamp in industrial time series data, and then carrying out thinning processing on the combined and spliced wire string by using the stunion () function to obtain a data curve of a thinned wire string type, so as to conveniently and efficiently realize storage and preprocessing of the industrial high-frequency / ultrahigh-frequency time series data, and improve the storage efficiency of the industrial high-frequency / ultrahigh-frequency time series data. And the storage space is greatly saved, and the AI application of subsequent industrial high-frequency / ultrahigh-frequency time series data is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of big data processing technology, and in particular to an industrial time series data storage and preprocessing method and device based on spatiotemporal big data. Background Art

[0002] With the development of big data and artificial intelligence (AI) technology, data-based artificial intelligence has been applied to all walks of life. The maturity of industrial time series data collection technology has given rise to a technical system that integrates data and AI algorithms. Big data technology based on the Greenplum (a distributed database system with PostgreSQL cluster as the underlying layer) / PostgreSQL (a relational database that can store and calculate time series data, compatible with AI engines and procedural programming functions such as Plpython scripts) ecosystem seamlessly connects with the complete machine learning engine of Madlib (an AI engine based on Greenplum / PostgresSQL), making it possible to efficiently implement AI methods based on big data.

[0003] The power and machinery fields are important modules of my country's energy and manufacturing industries, and are also the main economic pillars of the country. Real-time data collection through sensors, combined with various time series data storage and analysis technologies, and AI analysis methods combined with various prediction models to predict and recommend future data, are conducive to efficient and accurate automatic control of industrial processes.

[0004] However, for the real-time collection of various types of time series data, different devices may have different frequencies, or even the frequency of the same measuring point may not be fixed. For example, in a scenario where a sensor on an industrial site collects 1,000 pieces of data per second with a complete timestamp, various missing phenomena are likely to occur during data transmission and landing due to the high collection frequency, resulting in the actual data after storage is usually between 500 and 1,000 pieces. After non-uniformly spaced time series data is stored, it is necessary to standardize the interval processing on the one hand and to thin out the samples on the other hand when performing AI analysis. Therefore, traditional storage methods cannot meet the real-time storage and analysis needs of today's industry. Therefore, how to conveniently and efficiently realize the storage and preprocessing of industrial high-frequency / ultra-high-frequency time series data, and greatly save storage space, so as to facilitate the subsequent AI application of industrial high-frequency / ultra-high-frequency time series data, has become a problem that needs to be solved urgently.

[0005] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0006] The main purpose of the present invention is to provide a method and device for industrial time series data storage and preprocessing based on spatiotemporal big data, aiming to solve the technical problem that the existing technology cannot conveniently and efficiently realize the storage and preprocessing of industrial high-frequency / ultra-high-frequency time series data, and greatly save storage space for subsequent AI applications of industrial high-frequency / ultra-high-frequency time series data.

[0007] To achieve the above object, the present invention provides an industrial time series data storage and preprocessing method based on spatiotemporal big data, the method comprising the following steps:

[0008] Constructing a table structure in a postgres database, wherein the table structure includes a plurality of fields to be stored, wherein the plurality of fields to be stored include a timestamp, a measuring point name, and a numerical point string to be stored, wherein the timestamp is of a timestamp type, the measuring point name is of a text type, and the numerical point string is of a geometry type;

[0009] Convert several point-type points consisting of the timestamps and numerical values ​​corresponding to the measurement point names in the real-time collected industrial time series data into metric coordinates of point-type plane projection in PostGIS through the metric coordinate system;

[0010] Connect all metric coordinates in sequence to form a linestring, and store the linestring in the field corresponding to the geometry type in the table structure, store the timestamp in the industrial time series data in the field corresponding to the timestamp type in the table structure, and store the measurement point name in the industrial time series data in the field corresponding to the text type in the table structure;

[0011] According to the timestamp in the industrial time series data, the geometry field of the linestring is combined and spliced ​​by the st_union() function to obtain the linestring of the measurement point names under different groups combined and spliced ​​in the corresponding time period;

[0012] The st_simplify function is used to perform thinning processing on the combined linestring line string to obtain a thinned linestring type data curve.

[0013] Optionally, the step of combining and splicing the geometry field of the linestring using the st_union() function according to the timestamp in the industrial time series data to obtain the linestring of the measurement point names under different groups combined and spliced ​​in the corresponding time period includes:

[0014] Sorting a number of measuring points corresponding to measuring point names in different groups in the industrial time series data according to timestamps in the industrial time series data to obtain a measuring point sorting result;

[0015] According to the measurement point sorting result, the geometry field of the linestring is combined and spliced ​​by the st_union() function to obtain the linestring of the measurement point names under different groups combined and spliced ​​in the corresponding time period.

[0016] Optionally, all steps in the industrial time series data storage and preprocessing method based on spatiotemporal big data are implemented based on Plpython functions.

[0017] In addition, to achieve the above purpose, the present invention also proposes an industrial time series data storage and preprocessing device based on spatiotemporal big data, and the industrial time series data storage and preprocessing device based on spatiotemporal big data includes:

[0018] A table structure construction module is used to construct a table structure in a postgres database, wherein the table structure includes a plurality of fields to be stored, wherein the plurality of fields to be stored include a timestamp, a measuring point name and a numerical point string to be stored, wherein the timestamp is of a timestamp type, the measuring point name is of a text type, and the numerical point string is of a geometry type;

[0019] A coordinate conversion module is used to convert a number of point-type points consisting of timestamps and numerical values ​​corresponding to measurement point names in real-time collected industrial time series data into metric coordinates of point-type plane projection in PostGIS through the metric coordinate system;

[0020] A linestring generation module, used to connect all metric coordinates in sequence to form a linestring, and store the linestring in a field corresponding to the geometry type in the table structure, store the timestamp in the industrial time series data in a field corresponding to the timestamp type in the table structure, and store the measurement point name in the industrial time series data in a field corresponding to the text type in the table structure;

[0021] A line string concatenation module is used to combine and concatenate the geometry field of the line string through the st_union() function according to the timestamp in the industrial time series data, so as to obtain the line string of the measurement point names under different groups combined and concatenated in the corresponding time period;

[0022] The curve thinning module is used to use the st_simplify function to perform thinning processing on the combined linestring line string to obtain a thinned linestring type data curve.

[0023] Optionally, the line string splicing module is further used to sort a number of measuring points corresponding to measuring point names under different groups in the industrial time series data according to timestamps in the industrial time series data to obtain a measuring point sorting result;

[0024] The linestring splicing module is also used to combine and splice the geometry field of the linestring through the st_union() function according to the measurement point sorting result, so as to obtain the linestring linestrings composed of the measurement point names under different groups in the corresponding time period.

[0025] Optionally, the functions of all modules in the industrial time series data storage and preprocessing device based on spatiotemporal big data are implemented based on Plpython functions.

[0026] In the present invention, a table structure is constructed in a postgres database, wherein the table structure includes a plurality of fields to be stored, wherein the plurality of fields to be stored include a timestamp, a measuring point name and a numerical point string to be stored, wherein the timestamp is of the timestamp type, the measuring point name is of the text type, and the numerical point string is of the geometry type; a plurality of point-type points consisting of the timestamp and the numerical values ​​corresponding to the measuring point name in the real-time collected industrial time series data are converted into point-type metric coordinates of plane projection through the metric coordinate system in PostGIS; all metric coordinates are connected in sequence to form a linestring, and the linestring is stored in the table structure geo The timestamp in the industrial time series data is stored in the field corresponding to the timestamp type in the table structure, and the measuring point name in the industrial time series data is stored in the field corresponding to the text type in the table structure; the geometry field of the linestring is combined and spliced ​​by the st_union() function according to the timestamp in the industrial time series data to obtain the linestring linestring composed of the measuring point names under different groups in the corresponding time period; the st_simplify function is used to thin the combined and spliced ​​linestring linestring to obtain the thinned linestring type data curve. The industrial time series data is stored and preprocessed based on the above functions through PostGIS to form a linestring. The linestring can obtain a relatively smooth curve by directly connecting lines, eliminating the process of filling missing values ​​using methods such as mean, median, and smoothing. This greatly improves the data storage and processing efficiency, makes the calculation process extremely short, and also makes the industrial time series data storage and preprocessing method based on spatiotemporal big data described in the present invention directly play the role of high-frequency / ultra-high-frequency big data retrieval, and is more convenient and efficient. In addition, because a linestring of one thousand points of a geometry type saves hundreds of times more space than storing one thousand floats in a database, a significant reduction in storage space is also achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 It is a flow chart of the first embodiment of the industrial time series data storage and preprocessing method based on spatiotemporal big data of the present invention;

[0028] Figure 2 This is a structural block diagram of the first embodiment of the industrial time series data storage and preprocessing device based on spatiotemporal big data of the present invention.

[0029] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0030] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0031] The embodiment of the present invention provides an industrial time series data storage and preprocessing method based on spatiotemporal big data, referring to Figure 1 , Figure 2 It is a flow chart of the first embodiment of the industrial time series data storage and preprocessing method based on spatiotemporal big data of the present invention.

[0032] In this embodiment, the industrial time series data storage and preprocessing method based on spatiotemporal big data includes the following steps:

[0033] Step S10: constructing a table structure in a postgres database, wherein the table structure includes a plurality of fields to be stored, wherein the plurality of fields to be stored include a timestamp, a measuring point name, and a numerical point string to be stored, wherein the timestamp is of a timestamp type, the measuring point name is of a text type, and the numerical point string is of a geometry type;

[0034] This embodiment implements the storage and analysis of industrial time series data with irregular frequency based on the Greenplum / Postgres+Madlib+Plpython environment. In the specific implementation, industrial acquisition equipment, OPC (OLE for Process Control) data acquisition protocol, distributed control system (DCS) / supervisory control and data acquisition (SCADA) and other systems can be used to achieve ultra-high frequency real-time storage of one thousand data per second at each measuring point.

[0035] When constructing a table structure in a Postgres database, the table structure may include several fields to be stored, and the multiple fields to be stored include but are not limited to the timestamp (timestamp), the name of the observation point (text) and the numerical point string (geometry) to be stored, that is, the timestamp is of the timestamp type, the name of the observation point is of the text type, and the numerical point string is of the geometry type, wherein the observation point (observation point) can be understood as the target point observed during field measurement, and the name of the observation point is the name of the measured data, such as temperature, pressure, speed, etc.; Geometry is a spatial geometry data type, which is often used to describe spatial geometry information, such as coordinate points, lines, surfaces, three-dimensional information, etc. In a specific implementation, the Geographic Information System (GIS) can use the Geometry data type to store and display geographic information. In addition, the fields to be stored may also include a quality stamp (text) and other information to be stored (text or json), that is, the quality stamp is of the text type, and other information to be stored is of the text or json type, wherein the quality stamp can be used to describe the quality level of the measured data, such as good (good) and bad (bad).

[0036] Step S20: converting a number of point-type points consisting of timestamps and numerical values ​​corresponding to measurement point names in the real-time collected industrial time series data into metric coordinates of point-type plane projection in PostGIS through the metric coordinate system;

[0037] Step S30: connect all metric coordinates in sequence to form a linestring, and store the linestring in a field corresponding to the geometry type in the table structure, store the timestamp in the industrial time series data in a field corresponding to the timestamp type in the table structure, and store the measurement point name in the industrial time series data in a field corresponding to the text type in the table structure;

[0038] It is easy to understand that the industrial time series data collected in real time stores all 1000 data Values ​​of the measuring point within 1 second of the current moment, forms a numerical point string according to the timestamp, and sets the spatial reference identifier (Spatial Reference Identifier, SRID) = 26918 in PostGIS (PostGIS is an extension of PostgreSQL. PostGIS provides spatial information service functions such as spatial objects, spatial indexes, spatial operation functions and spatial operators. In this embodiment, it can be understood as a GIS engine based on Greenplum / Postgres, which is used to store and calculate geometry type fields). It can also be understood as a plane GIS projection coordinate, where the x-axis is the time interval (which can be determined based on the timestamp), which can be milliseconds (ms), and each second = 1000 meters, and the y-axis is the numerical value corresponding to the measuring point name at these 1000 moments, and its unit is meter, which constitutes 1000 points (x n ,y n ), 1≤n≤1000. Then, connect these 1000 points in sequence to form a linestring (x1 y1, x2 y2, x3y3, ..., x 1000 y 1000 ), and store the result in a geometry type in a numerical point string. This method is repeated every second until the storage of industrial high-frequency / ultra-high-frequency time series data is completed. Among them, linestring can be understood as a line object, which is connected by a series of points. In this implementation, the starting point and end point of the linestring overlap, which is a closed linestring.

[0039] It should be noted that for industrial time series data collected in real time at high frequency / ultra-high frequency, it is often impossible to collect 1,000 records in one second in a strict sense. For example, at the current moment, eight or nine hundred records are collected in one second. Generally, data processing needs to be filled in according to time, such as using the mean, median, smoothing and other methods to fill in missing values. However, for geometry type data, a relatively smooth curve can be obtained by directly connecting the lines, which greatly improves the efficiency of data storage and processing, and is also convenient for subsequent data preprocessing.

[0040] In a specific implementation, the linestring can be stored in the field corresponding to the geometry type in the table structure, the timestamp in the industrial time series data can be stored in the field corresponding to the timestamp type in the table structure, and the measurement point name in the industrial time series data can be stored in the field corresponding to the text type in the table structure; in addition, the quality stamp in the industrial time series data can also be stored in the field corresponding to the text type in the table structure; other information to be stored in the industrial time series data can be stored in the field corresponding to the text type or json type in the table structure.

[0041] Step S40: combining and splicing the geometry field of the linestring using the st_union() function according to the timestamp in the industrial time series data, so as to obtain the linestring of the measurement point names under different groups combined and spliced ​​in the corresponding time period;

[0042] It is easy to understand that the several measuring points corresponding to the measuring point names under different groups in the industrial time series data can be sorted according to the timestamps in the industrial time series data to obtain the measuring point sorting results, and then, according to the measuring point sorting results, the geometry field of the linestring line string is combined and spliced ​​through the st_union() function to obtain the linestring line string composed of the measuring point names under different groups in the corresponding time period. In a specific implementation, data can be queried through a big data query method, such as first performing a group query according to the measuring point name, wherein a single measuring point is sorted according to the timestamp, and then taking the geometry field of the linestring line string for st_union() calculation to obtain all the combined and spliced ​​data in the complete time period. Since the values ​​of the first and last moments are the same, the type after st_union is still the linestring type.

[0043] Step S50: using the st_simplify function to perform thinning processing on the combined linestring linestring to obtain a data curve of the thinned linestring type.

[0044] In the specific implementation, the st_simplify function can be used to thin out the above linestring type results. The tolerance parameters in the thinning can be configured according to the actual needs of the data curve. The result after thinning is still of linestring type, thus forming a complete thinned data curve for AI calculation and analysis.

[0045] It should be noted that, through the above step S40, a response in seconds can be achieved and a complete glued data curve for analysis can be formed. Through the above step S50, a thinned curve can also be quickly calculated, and the GIS curve thinning itself plays a role in curve smoothing and sample sparseness, and retains abnormal points that produce large fluctuations for subsequent time series anomaly detection and analysis. At this point, the sparse samples are effectively sparse, and the retained fluctuations are completely retained. The time consumed by the calculation process based on the above function by PostGIS is extremely short, so that the industrial time series data storage and preprocessing method based on spatiotemporal big data described in this embodiment directly plays a role in high-frequency / ultra-high-frequency big data retrieval, and is more convenient and efficient. Because a linestring of one thousand points of a geometry type saves hundreds of times more space than storing one thousand floats in a database, a significant reduction in storage space is also achieved.

[0046] In a specific implementation, all steps in the industrial time series data storage and preprocessing method based on spatiotemporal big data can be implemented based on the Plpython function, that is, the implementation of the process functions of the above steps are all converted into Plpython functions, and the Greenplum / Postgres big data processing capabilities are used to achieve efficient parallelism. When storing data, the process function is called and the point string array is passed in. When querying, the point string results after data preprocessing are returned in combination with functions such as thinning, which is convenient for subsequent AI analysis to use this type of data for curve drawing, data similarity comparison, and for various time series prediction and time series anomaly detection models. Among them, Plpython can be understood as a procedural programming language based on Greenplum / Postgres, which converts Python code into a function executable by the database. This embodiment uses Plpython to complete the procedural encapsulation of the entire algorithm, and can be directly called to obtain the calculation results.

[0047] In this embodiment, a table structure is constructed in a postgres database, wherein the table structure includes several fields to be stored, wherein the multiple fields to be stored include a timestamp, a measuring point name and a numerical point string to be stored, wherein the timestamp is of the timestamp type, the measuring point name is of the text type, and the numerical point string is of the geometry type; several point-type points consisting of the timestamp and the numerical values ​​corresponding to the measuring point name in the real-time collected industrial time series data are converted into point-type metric coordinates of plane projection through the metric coordinate system in PostGIS; all metric coordinates are connected in sequence to form a linestring, and the linestring is stored in the table structure. ometry type, store the timestamp in the industrial time series data in the field corresponding to the timestamp type in the table structure, and store the measurement point name in the industrial time series data in the field corresponding to the text type in the table structure; combine and splice the geometry field of the linestring line string through the st_union() function according to the timestamp in the industrial time series data to obtain the linestring line string composed of the measurement point names under different groups in the corresponding time period; use the st_simplify function to thin out the combined and spliced ​​linestring line string to obtain the thinned linestring type data curve. The industrial time series data is stored and preprocessed based on the above functions through PostGIS to form a linestring. The linestring can obtain a relatively smooth curve by directly connecting lines, eliminating the process of filling missing values ​​using methods such as mean, median, and smoothing. This greatly improves the data storage and processing efficiency, makes the calculation process extremely short, and also makes the industrial time series data storage and preprocessing method based on spatiotemporal big data described in this embodiment directly play a role in high-frequency / ultra-high-frequency big data retrieval, and is more convenient and efficient. In addition, because a linestring of one thousand points of a geometry type saves hundreds of times more space than storing one thousand floats in a database, a significant reduction in storage space is also achieved.

[0048] Reference Figure 2 , Figure 2 This is a structural block diagram of the first embodiment of the industrial time series data storage and preprocessing device based on spatiotemporal big data of the present invention.

[0049] like Figure 2 As shown, the industrial time series data storage and preprocessing device based on spatiotemporal big data proposed in the embodiment of the present invention includes:

[0050] A table structure building module 10 is used to build a table structure in a postgres database, wherein the table structure includes a plurality of fields to be stored, wherein the plurality of fields to be stored include a timestamp, a measuring point name and a numerical point string to be stored, wherein the timestamp is of a timestamp type, the measuring point name is of a text type, and the numerical point string is of a geometry type;

[0051] A coordinate conversion module 20, for converting a number of point-type points consisting of timestamps and numerical values ​​corresponding to measurement point names in real-time collected industrial time series data into metric coordinates of point-type plane projection in PostGIS through a metric coordinate system;

[0052] A linestring generation module 30, used to connect all metric coordinates in sequence to form a linestring, and store the linestring into a field corresponding to the geometry type in the table structure, store the timestamp in the industrial time series data into a field corresponding to the timestamp type in the table structure, and store the measurement point name in the industrial time series data into a field corresponding to the text type in the table structure;

[0053] A line string concatenation module 40 is used to perform a combination and concatenation process on the geometry field of the line string through the st_union() function according to the timestamp in the industrial time series data, so as to obtain a line string of the measurement point names under different groups combined and concatenated within a corresponding time period;

[0054] The curve thinning module 50 is used to use the st_simplify function to perform thinning processing on the combined linestring line string to obtain a thinned linestring type data curve.

[0055] In a specific implementation, the line string splicing module 40 is further used to sort a number of measuring points corresponding to measuring point names under different groups in the industrial time series data according to the timestamps in the industrial time series data to obtain a measuring point sorting result;

[0056] The linestring concatenation module 40 is further used to perform concatenation processing on the geometry field of the linestring through the st_union() function according to the measurement point sorting result, so as to obtain the linestring of the measurement point names under different groups combined and concatenated within the corresponding time period.

[0057] In a specific implementation, the functions of all modules in the industrial time series data storage and preprocessing device based on spatiotemporal big data are implemented based on the Plpython function.

[0058] In this embodiment, a table structure is constructed in a postgres database, wherein the table structure includes several fields to be stored, wherein the multiple fields to be stored include a timestamp, a measuring point name and a numerical point string to be stored, wherein the timestamp is of the timestamp type, the measuring point name is of the text type, and the numerical point string is of the geometry type; several point-type points consisting of the timestamp and the numerical values ​​corresponding to the measuring point name in the real-time collected industrial time series data are converted into point-type metric coordinates of plane projection through the metric coordinate system in PostGIS; all metric coordinates are connected in sequence to form a linestring, and the linestring is stored in the table structure. ometry type, store the timestamp in the industrial time series data in the field corresponding to the timestamp type in the table structure, and store the measurement point name in the industrial time series data in the field corresponding to the text type in the table structure; combine and splice the geometry field of the linestring line string through the st_union() function according to the timestamp in the industrial time series data to obtain the linestring line string composed of the measurement point names under different groups in the corresponding time period; use the st_simplify function to thin out the combined and spliced ​​linestring line string to obtain the thinned linestring type data curve. The industrial time series data is stored and preprocessed based on the above functions through PostGIS to form a linestring. The linestring can obtain a relatively smooth curve by directly connecting lines, eliminating the process of filling missing values ​​using methods such as mean, median, and smoothing. This greatly improves the data storage and processing efficiency, makes the calculation process extremely short, and also makes the industrial time series data storage and preprocessing device based on spatiotemporal big data described in this embodiment directly play a role in high-frequency / ultra-high-frequency big data retrieval, and is more convenient and efficient. In addition, because a linestring of one thousand points of a geometry type saves hundreds of times more space than storing one thousand floats in a database, a significant reduction in storage space is also achieved.

[0059] Other embodiments or specific implementation methods of the industrial time series data storage and preprocessing device based on spatiotemporal big data of the present invention can refer to the above-mentioned method embodiments and will not be repeated here.

[0060] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0061] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0062] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0063] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for storing and preprocessing industrial time series data based on spatiotemporal big data, characterized in that: The industrial time series data storage and preprocessing method based on spatiotemporal big data includes the following steps: Constructing a table structure in a postgres database, wherein the table structure includes a plurality of fields to be stored, wherein the plurality of fields to be stored include a timestamp, a measuring point name, and a numerical point string to be stored, wherein the timestamp is of a timestamp type, the measuring point name is of a text type, and the numerical point string is of a geometry type; Convert several point-type points consisting of the timestamps and numerical values ​​corresponding to the measurement point names in the real-time collected industrial time series data into metric coordinates of point-type plane projection in PostGIS through the metric coordinate system; Connect all metric coordinates in sequence to form a linestring, and store the linestring in the field corresponding to the geometry type in the table structure, store the timestamp in the industrial time series data in the field corresponding to the timestamp type in the table structure, and store the measurement point name in the industrial time series data in the field corresponding to the text type in the table structure; According to the timestamp in the industrial time series data, the geometry field of the line string is combined and spliced ​​by the st_union() function to obtain the linestring line string of the measurement point names under different groups combined and spliced ​​in the corresponding time period; The st_simplify function is used to perform thinning processing on the combined linestring line string to obtain a thinned linestring type data curve.

2. The industrial time series data storage and preprocessing method based on spatiotemporal big data according to claim 1 is characterized in that: The step of combining and splicing the geometry field of the linestring using the st_union() function according to the timestamp in the industrial time series data to obtain the linestring of the measurement point names under different groups combined and spliced ​​in the corresponding time period includes: Sorting a number of measuring points corresponding to measuring point names in different groups in the industrial time series data according to timestamps in the industrial time series data to obtain a measuring point sorting result; According to the measurement point sorting result, the geometry field of the linestring is combined and spliced ​​by the st_union() function to obtain the linestring of the measurement point names under different groups combined and spliced ​​in the corresponding time period.

3. The industrial time series data storage and preprocessing method based on spatiotemporal big data according to claim 1 is characterized in that: All steps in the industrial time series data storage and preprocessing method based on spatiotemporal big data are implemented based on Plpython functions.

4. An industrial time series data storage and preprocessing device based on spatiotemporal big data, characterized in that: The industrial time series data storage and preprocessing device based on spatiotemporal big data includes: A table structure construction module is used to construct a table structure in a postgres database, wherein the table structure includes a plurality of fields to be stored, wherein the plurality of fields to be stored include a timestamp, a measuring point name and a numerical point string to be stored, wherein the timestamp is of a timestamp type, the measuring point name is of a text type, and the numerical point string is of a geometry type; A coordinate conversion module is used to convert a number of point-type points consisting of timestamps and numerical values ​​corresponding to measurement point names in real-time collected industrial time series data into metric coordinates of point-type plane projection in PostGIS through the metric coordinate system; A linestring generation module, used to connect all metric coordinates in sequence to form a linestring, and store the linestring in a field corresponding to the geometry type in the table structure, store the timestamp in the industrial time series data in a field corresponding to the timestamp type in the table structure, and store the measurement point name in the industrial time series data in a field corresponding to the text type in the table structure; A line string concatenation module is used to combine and concatenate the geometry field of the line string through the st_union() function according to the timestamp in the industrial time series data, so as to obtain the line string of the measurement point names under different groups combined and concatenated in the corresponding time period; The curve thinning module is used to use the st_simplify function to perform thinning processing on the combined linestring line string to obtain a thinned linestring type data curve.

5. The industrial time series data storage and preprocessing device based on spatiotemporal big data according to claim 4 is characterized in that: The line string splicing module is further used to sort the plurality of measuring points corresponding to the measuring point names under different groups in the industrial time series data according to the timestamps in the industrial time series data to obtain the measuring point sorting result; The linestring splicing module is also used to combine and splice the geometry field of the linestring through the st_union() function according to the measurement point sorting result, so as to obtain the linestring linestrings composed of the measurement point names under different groups in the corresponding time period.

6. The industrial time series data storage and preprocessing device based on spatiotemporal big data according to claim 4, characterized in that: The functions of all modules in the industrial time series data storage and preprocessing device based on spatiotemporal big data are implemented based on Plpython functions.

Citation Information

Patent Citations

  • High-frequency time series data real-time sparse display method based on number of pixel points

    CN110597697A

  • Time series information analyzer and program for time series information analysis

    JP2013218451A

Cited By

  • Industrial time series data efficient restoration method and device based on Gis format storage

    CN122777881A