Construction of Theoretical Models and Analysis Methods and Systems for Heterogeneous Data Computation in the Internet of Things
By constructing a multidimensional data structure and extending relational algebra, and introducing new syntax and primitive operations, the problem of low efficiency in traditional databases when processing IoT time-series data is solved, achieving efficient heterogeneous data management and computation, and reducing user costs.
Patent Information
- Application Number
- CN202310594967.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-25
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2043-05-25
AI Technical Summary
Traditional relational databases are inefficient at processing IoT time-series data, and cannot effectively manage and compute the multidimensional data collected by IoT devices, increasing user learning, application development, deployment, and maintenance costs.
We construct a multidimensional data structure based on operation units, add attribute labels and perform dimension calculations, expand and reinterpret relational algebra, introduce new syntax and primitive operations, transform explicit and implicit data computation models, and achieve efficient integration of cross-model data computation.
It enables efficient management and computation of heterogeneous IoT data, reduces user learning and application development, deployment and maintenance costs, supports unified and transparent computation of multi-dimensional time series data, and takes into account efficient processing and resource optimization of heterogeneous data models.
Smart Images

Figure CN116628104B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of heterogeneous database technology, specifically to a method and system for constructing and analyzing a theoretical model for heterogeneous data computing in the Internet of Things (IoT). Background Technology
[0002] Traditional relational databases, including existing time-series databases in the industry, all use columns or fields as the data computing units derived from relational databases. They put various types of information collected in the Internet of Things into tables and columns, and then rely on existing relational algebra operations or introduce customized API interfaces and various data exchange protocols to support the calculation and analysis of time-series data.
[0003] Data collected by devices and information acquisition sensors in the Internet of Things (IoT) is typically time-sensitive, independent, large in volume, rarely updated, and often has a retention period. The computation and analysis of this data are often based on real-time queries and various aggregations and statistics at specific time points / segments or other dimensions, along with special calculations such as stream computing, alarms, subscriptions, and interpolation. This data collection behavior, data storage methods, and data computation models differ significantly from the usage and storage models of traditional relational databases. While relational databases can be used to manage and compute time-series data, their efficiency is low. Two simple examples illustrate this: typical features of relational databases, such as transaction processing, are unnecessary for IoT time-series data processing and can incur significant unnecessary performance costs; the computation and analysis of time-series data primarily focus on the latest and most frequently accessed data, making many high-performance physical design features of traditional databases, such as B+ tree indexes, unsuitable.
[0004] Furthermore, the data collected by devices from sensors in the Internet of Things (IoT) often has multi-dimensional characteristics, such as location coordinates, collection time, and data validity. While these data can certainly be converted into one-dimensional columns for storage and calculation, when a device needs to collect multiple different types of information, such as location coordinates, temperature, humidity, and speed, and each type of information also has its own validity information and other attribute information, the traditional one-dimensional column group of a database becomes very cumbersome. The relationships between columns need to be considered when storing and calculating data, which increases the data maintenance cost and computational complexity.
[0005] Therefore, how to achieve unified cross-modal and cross-structure computing, so as to more uniformly and transparently manage, process, compute and fill gaps in different types of complex data of the Internet of Things, and thus reduce the total cost of learning, application development, deployment and maintenance for users, is a technical problem that urgently needs to be solved. Summary of the Invention
[0006] The technical objective of this invention is to provide a method and system for constructing and analyzing a theoretical model for heterogeneous data computing in the Internet of Things (IoT), in order to solve the problem of how to achieve unified cross-model and cross-structure computing, thereby enabling more unified and transparent efficient management, processing, computing, and gap analysis of different types of complex data in the IoT, and ultimately reducing the total cost of learning, application development, deployment, and maintenance for users.
[0007] The technical objective of this invention is achieved as follows: a method for constructing and analyzing a theoretical model for heterogeneous data computing in the Internet of Things (IoT), the specific method being as follows:
[0008] Constructing a multidimensional data structure based on operation units: enabling more effective and efficient computation, storage, and management of data tailored to the characteristics of time-series data in the Internet of Things;
[0009] Add attribute tags and perform dimension calculations;
[0010] Extending and reinterpreting relational algebra: providing a theoretical basis for computational analysis on multidimensional data structures based on operational units for new data computation models;
[0011] Added new syntax and primitive operations: to more effectively analyze and calculate new data, especially IoT time-series data, and dynamically adjust the calculation scope.
[0012] Transforming explicit and implicit data computation models: Opening up an efficient channel for free data transformation between different models, providing a theoretical basis for new cross-model data computation and analysis;
[0013] Cross-model computational analysis: Deep cross-model data computation and fusion at the operator level, thereby achieving higher efficiency in cross-model data computation, while also avoiding the waste of computational resources caused by post-computation data exchange between existing models.
[0014] As a preferred approach, the construction of a multidimensional data structure based on operational units is as follows:
[0015] Using endpoints as the basic unit of data computation, each endpoint has a timestamp and one or more values, forming a multi-dimensional data structure, represented as follows:
[0016] e1 =<timestamp,v1,v2,v3,…> ;
[0017] This differs from a single column in a table of a traditional relational database, where a column is merely a single-dimensional value. Each data collection point is allowed to contain or be associated with several specific tags or attributes, including the data unit and place of manufacture. These tags are obtained through selection or customization and are unrelated to the actual data collected at the data collection point. Therefore, unlike the dimensions in the fixed multidimensional data structure of a data collection point, specific tags or attributes are dynamically associated labels for the data collection point. The values of these tags or attributes are used in the analysis and calculations in the same way as the definition of the data collection point. Logically, specific tags or attributes are considered part of the metadata definition of the data collection point and / or the device.
[0018] A device can be understood as a set of related data collection points, represented as:
[0019] S = {e|e∈S};
[0020] Here, S represents a device. Related collection points on the same device generate data at the same or different time points. To facilitate calculations in units of time, the concept of a collection point set (group) is further introduced to group collection points that generate data at the same time point into the same collection point set.
[0021] In special cases, each data collection point on a device belongs to a separate data collection point set, while in general, all data collection points on a device belong to the same data collection point set.
[0022] As a preferred option, adding attribute tags and performing dimension calculations are as follows:
[0023] Add one or more different attribute tags to a collection point or device based on the business scenario or the characteristics of the device collection point;
[0024] The data collection point, the equipment composed of the data collection points, and the data collection point set constitute a multidimensional data structure. Multidimensional data calculations are performed on the data collection points, that is, calculations are performed on different values or time dimensions of the data collection points.
[0025] When calculating different values or time dimensions at a collection point, the calculation is performed on data of a specific dimension at that collection point, as follows:
[0026] ① Use the special symbol $ or other specific characters to reference data from any dimension, in the form: speed$timestamp;
[0027] Where speed is a collection point; timestamp is the timestamp dimension data on speed.
[0028] ② Through custom calculations: Custom functions in the database are used to perform customized calculations, analyses, and comparisons on multidimensional data at an endpoint, in the following form:
[0029] DISTANCE(location1,location2,5s);
[0030] Location1 and Location2 are two endpoints, each containing a timestamp and three-dimensional coordinate data, respectively. DISTANCE is a user-defined function that returns the distance between two endpoints if their time differences do not exceed 5 seconds. When calculating or referencing an endpoint without specifying its dimension or using a user-defined calculation, the default value of the first acquisition dimension of the endpoint, excluding the timestamp, is used. Alternatively, the default behavior is determined by the database system in the implementation.
[0031] As a preferred approach, the extended and reinterpreted relational algebra includes set operations and relational operations. The objects of the adjusted relational and set operations are logically devices (Device(s)), and the results of the operations are also devices (Device).
[0032] Set operations include union, intersection, difference, and Cartesian product;
[0033] Relational operations: projection, selection, join, and division;
[0034] Let car1 and car2 be two devices. car1 and car2 contain endpoints: (pressure, speed, rev, temperature, consumption, mileage, location). Each data point contains a multi-dimensional data structure of timestamp, value, and validity.
[0035] The union operation is as follows: If the structures of S1 and S2 are compatible, perform a union operation on S1 and S2. The result of the union operation is a deduplicated set of tuples from S1 and S2. Similar to the previous set operations, each endpoint in the result set retains its original multidimensional data structure, as follows:
[0036] S1∪S2={e|e∈S1∨e∈S2};
[0037] The result of S1∪S2 is the same as the result of S2∪S1;
[0038] The difference operation is as follows: If the structures of S1 and S2 are compatible, perform a difference operation on S1 and S2. The result of the difference operation is a set of tuples that appear in S1 but not in S2. Similar to the previous set operations, each endpoint in the result set retains its original multidimensional data structure, as follows:
[0039]
[0040] The Cartesian product is specifically: two sets S1( <a1,a2,a3…a n >) and S2( <b1,b2,b3…b m The Cartesian product of S1 and S2 is the concatenation of each tuple in S1 with all tuples in S2, as shown below:
[0041] { <a1,a2,a3…a n ,b1,b2,b3…b m >| <a1,a2,a3…a n >∈S1∧ <b1,b2,b3…b m >∈S2};
[0042] The final result set is logically also a device, and the device in the result set has the sum of the number of collection points of S1 and S2, and the number of its tuples is the product of the number of tuples of S1 and S2; as with the previous set operations, each endpoint in the result set still retains the original multidimensional data structure.
[0043] The projection operation is as follows: S1 is vertically cut to eliminate several acquisition points (endpoint(s)), and the order of the projection acquisition point group is rearranged according to the input. The multidimensional data structure of each acquisition point is still retained. The information of the (speed, rev) projection endpoint of car1 is obtained in the following form:
[0044] Π (speed,rev) (car1);
[0045] The selection operation specifically involves: horizontally splitting S1 to select the set of tuples that meet the input conditions. The selection operation can be performed on any dimension of the multidimensional data structure of the collection point, or a custom calculation can be used to perform the selection on the entire collection point. If no dimension is specified by default and no custom calculation is used, the first value dimension of the collection point or a dimension defined in the system is used. For example, the following example returns all data for the temperature time dimension of car1 that falls on February 28, 2023:
[0046] σ (temperature$timestampbetween‘2023-02-2800:00:00.000‘and‘2023-03-0100:00:00.000‘) (car1);
[0047] The join operation is specifically as follows: perform a selection operation on the result set of the Cartesian product. The collection points in the predicates used in the join operation can be any one dimension or the whole, and the default is the default dimension determined by the system, usually value. Obtain the set of tuples where the speed of car1 is greater than that of car2 while the engine speed is lower than that of car2, in the form of:
[0048]
[0049] One special type of join is also called a natural join. Specifically, it is to perform a join operation on the common collection points (endpoint(s)) in S1 and S2, and the final result set is a set of tuples that meet the condition that the values of the common collection points are equal;
[0050] The division operation is specifically as follows: Suppose S1 contains n collection points, S2 contains m collection points, and the m collection points of S2 are a proper subset of the n collection points of S1, that is, m < n. Perform the division operation on S1 and S2, that is, S1 ÷ S2. The final result set is a set of collection point vectors with n - m collection points. The tuples in this result set are the tuples that satisfy the natural join of S1 and S2 and are only projected on the n - m collection points. Each endpoint in the result set still retains the original multi-dimensional data structure, in the form as follows:
[0051]
[0052] Preferably, adding new syntax and primitive operations is specifically as follows:
[0053] UNIONFROM: Used for the union operation, which combines the results that meet the conditions on different devices into the same result set. Here, the union uses different auxiliary options in the specific implementation to select whether to remove duplicates (UNION) or not (UNION ALL). This operation is different from FROM in the traditional relational data calculation model. The objects in FROM will perform a join operation;
[0054] SATISFYING: Used to perform a selection operation on the set of objects in UNIONFROM first. The selection operation determines the actual object set range for subsequent calculation and analysis at the metadata level, so as to filter out the branch sets in the union operation. Each branch performs various user-defined operations on a device within the range of this object set, including selection operations and projection operations.
[0055] Preferably, converting explicit and implicit data calculation models includes converting the time series data model to the relational data model and converting the relational data model to the time series data model;
[0056] The specific rules for converting time-series data models to relational data models are as follows:
[0057] ① Convert a device or an intermediate result of an extended relational algebra operation into a result table;
[0058] ② Each dimension of information at each data collection point (endpoint) is selectively converted into a column in the result table, while maintaining the definitions of data type / length / precision;
[0059] ③ Multiple dimensions of information at each data collection point (endpoint) are selectively converted into a column in the result table using custom dimension calculation, and the data type / length / precision of the calculation result is used as the column definition;
[0060] ④ Transformation of time dimensions of multiple data collection points (endpoints) under specific conditions: When time dimensions are aligned, they are converted into the same timestamp type column in the result table;
[0061] The specific rules for converting a relational data model to a time-series data model are as follows:
[0062] ① Convert a table or an intermediate result table of traditional relational algebra operations into a device, i.e., a virtual or exported device;
[0063] ② Each column is converted into a value column (endpoint), while maintaining the data type / length / precision definition, and the column name is used as the name of the data collection point (endpoint);
[0064] ③ Selectively convert one or more columns in the table into values in a single endpoint or its multidimensional structure in the resulting device using custom calculations, and use the data type / length / precision of the calculation results as the type definition of the endpoint or dimension value;
[0065] ④ If the table has a timestamp column, the timestamp column serves as the timestamp dimension for all collection points (endpoints), and the time dimensions of all collection points (endpoints) are aligned.
[0066] More specifically, the cross-model computational analysis is as follows:
[0067] The result set of a cross-model join operation will be reduced to a relational table under implicit model transformation, i.e., a two-dimensional structure; or,
[0068] Users can convert result sets or intermediate results into high-dimensional time series models through explicit model transformation, and then use time series model operations to perform further analysis and calculations.
[0069] A system for constructing and analyzing theoretical models for heterogeneous data computing in the Internet of Things (IoT), comprising:
[0070] The building module is used to construct multidimensional data structures based on operation units, enabling more effective and efficient computation, storage, and management of data tailored to the characteristics of time-series data in the Internet of Things.
[0071] Add module one, which is used to add attribute labels and perform dimension calculations;
[0072] The extension module is used to extend and reinterpret relational algebra, providing a theoretical basis for computational analysis on multidimensional data structures based on operational units in new data computation models;
[0073] Add Module 2 to add new syntax and primitive operations, enabling more effective analysis and calculation and dynamic adjustment of the calculation range, especially for the characteristics of new data, particularly IoT time-series data.
[0074] The conversion module is used to convert explicit and implicit data computing models, opening up an efficient channel for free data conversion between different models and providing a theoretical basis for new cross-model data computing and analysis.
[0075] The analysis module is used for cross-model computational analysis, which integrates cross-model data computation at the operator level to achieve higher efficiency in cross-model data computation, while avoiding the waste of computing resources caused by post-computation data exchange between existing models.
[0076] An electronic device includes: a memory and at least one processor;
[0077] The memory contains computer programs;
[0078] The at least one processor executes the computer program stored in the memory, causing the at least one processor to perform the above-described method for constructing and analyzing theoretical models for heterogeneous data computing in the Internet of Things.
[0079] A computer-readable storage medium storing a computer program that can be executed by a processor to implement the above-described method for constructing and analyzing a theoretical model for computing heterogeneous data in the Internet of Things.
[0080] The theoretical model construction and analysis method and system for heterogeneous data computing in the Internet of Things of the present invention have the following advantages:
[0081] (i) This invention establishes a new data computing model based on the characteristics of devices and sampling point data in the Internet of Things, thereby more effectively managing, storing and computing the time-series data of the Internet of Things;
[0082] (ii) The new data calculation model of this invention can meet the calculation and various operations of multidimensional time series data;
[0083] (III) The extended relational algebra operations introduced by the new computational model of this invention can take into account various operations and functions of heterogeneous data models, such as time series data models and relational data models, and can better adapt to the characteristics and behavior patterns of various data, and provide efficient computational services.
[0084] (iv) The attribute tag calculation introduced by the new calculation model of this invention can more effectively meet the need for filtering and analyzing data collected by the ever-increasing variety of devices and sensors in the Internet of Things, while avoiding frequent modifications to the application.
[0085] (v) The new computational model of this invention introduces data model transformation - both explicit and implicit - which can meet the unified and efficient processing of cross-model data storage and computational analysis;
[0086] (vi) The new computational model of this invention can enable systems based on the model to achieve deep integration of cross-modal computation at the operator level, thereby enabling optimized processing of cross-modal data computation and analysis in a consistent manner;
[0087] (vii) The new computing model of this invention fully considers reducing the difficulty for various users to learn and operate the new model. While giving the database system based on the model more powerful analytical computing capabilities, it still makes application development and operation and maintenance, including the operation and maintenance of the database system, simple and easy to use.
[0088] (viii) The new computing model of this invention can potentially support more other data models, making database systems based on this model easier to expand;
[0089] (ix) This invention redefines and extends relational algebra and introduces unique computational primitives and syntax, thereby providing a theoretical foundation for transparent storage, computation and analysis across modules and structures on systems based on this data computation model, filling a gap in this field;
[0090] (x) The novel computing model and corresponding computing operations of this invention enable better and more efficient management and computational analysis of time-series data. While achieving this goal, it also allows for deep and seamless integration with the relational data model of traditional relational databases to simultaneously support the comprehensive analysis and computation of structured relational data and other heterogeneous data in the Internet of Things, including machine learning. In addition, the ease of use of the new computing model for various users such as developers and operations and maintenance personnel should be considered to reduce the total cost of learning, application development, deployment and maintenance for users.
[0091] (xi) Through this cross-modal data computing model, the application can easily perform unified and transparent computing on data from various heterogeneous data sources involved in the Internet of Things scenario without having to use a specific computing model for each data source model.
[0092] (xii) In this invention, the terms commonly used in the Internet of Things (IoT) field, such as device and endpoint, are used to define a set of data computing units for constructing this computing model. The relational algebra on which traditional databases are based is extended on this set, and a set of operation primitives and syntax, as well as unique computing rules and specifications for heterogeneous data sources, are introduced. Thus, a complete and unified data computing model is introduced to cope with the increasingly rich heterogeneous data sources of the Internet of Things and the rapidly increasing data scale.
[0093] (XIII) The data computing model of this invention also explores and introduces a mechanism for seamless implicit or explicit conversion between different data models. Compared with the current industry where each model is implemented separately and its computing and storage can only be performed outside the model, the system based on the data computing model of this invention can realize the fusion of cross-model computing at the operator level, thereby maximizing the computing performance and efficiency of cross-model data and avoiding unnecessary additional overhead of various resources. Based on this theory, a new type of database system for Internet of Things applications can be built efficiently and conveniently.
[0094] (XIV) The purpose of this invention is to provide a unified computing model for heterogeneous data sources and data models, such as time-series data and relational data, in the Internet of Things (IoT) environment; to provide a theoretical basis and extension of computing primitives for various calculations on massive amounts of data from heterogeneous data sources in the IoT, to achieve unified cross-model and cross-structure computing, so that applications can more uniformly and transparently manage, process, calculate and analyze different types of complex data in the IoT. Attached Figure Description
[0095] The invention will be further described below with reference to the accompanying drawings.
[0096] Appendix Figure 1 A schematic diagram of a multidimensional data structure;
[0097] Appendix Figure 2 This is a schematic diagram illustrating the conversion of a system model into a time series model.
[0098] Appendix Figure 3 This is a schematic diagram illustrating the conversion between relational models and time-series models. Detailed Implementation
[0099] The following detailed description of the theoretical model construction and analysis method and system for heterogeneous data computing for the Internet of Things, based on the accompanying drawings and specific embodiments, is provided with reference to the accompanying drawings.
[0100] Example 1:
[0101] This embodiment provides a method for constructing and analyzing a theoretical model for heterogeneous data computing in the Internet of Things (IoT). The method is as follows:
[0102] S1. Construct a multi-dimensional data structure based on operation units: to perform more effective and efficient calculation, storage and management of data based on the characteristics of time-series data in the Internet of Things;
[0103] S2. Add attribute labels and perform dimension calculations;
[0104] S3, Extended and Reinterpreted Relational Algebra: Providing a theoretical basis for computational analysis on multidimensional data structures based on operational units for new data computation models;
[0105] S4. Add new syntax and primitive operations: For new data, especially IoT time-series data, more effective analysis and calculation and dynamic adjustment of the calculation range are achieved.
[0106] S5. Transformation of explicit and implicit data computation models: Opening up an efficient channel for free data transformation between different models, providing a theoretical basis for new cross-model data computation and analysis;
[0107] S6. Cross-model computational analysis: Deep cross-model data computation and fusion at the operator level, thereby achieving higher efficiency in cross-model data computation, while also avoiding the waste of computational resources caused by post-computation data exchange between existing models.
[0108] The specific steps in step S1 of this embodiment for constructing a multidimensional data structure based on operation units are as follows:
[0109] Using endpoints as the basic unit of data computation, each endpoint has a timestamp and one or more values, forming a multi-dimensional data structure, represented as follows:
[0110] e1 =<timestamp,v1,v2,v3,…> ;
[0111] This differs from a single column in a table of a traditional relational database, where a column is merely a single-dimensional value. Each data collection point is allowed to contain or be associated with several specific tags or attributes, including the data unit and place of manufacture. These tags are obtained through selection or customization and are unrelated to the actual data collected at the data collection point. Therefore, unlike the dimensions in the fixed multidimensional data structure of a data collection point, specific tags or attributes are dynamically associated labels for the data collection point. The values of these tags or attributes are used in the analysis and calculations in the same way as the definition of the data collection point. Logically, specific tags or attributes are considered part of the metadata definition of the data collection point and / or the device.
[0112] A device can be understood as a set of related data collection points, represented as:
[0113] S = {e|e∈S};
[0114] Here, S represents a device. Related collection points on the same device generate data at the same or different time points. To facilitate calculations in units of time, the concept of a collection point set (group) is further introduced to group collection points that generate data at the same time point into the same collection point set.
[0115] In special cases, each data collection point on a device belongs to a separate data collection point set, while in general, all data collection points on a device belong to the same data collection point set.
[0116] Appendix Figure 1 As shown, Device1 is a device with m endpoints, where Em is an endpoint with k value dimensions. Note that not every endpoint needs to have the same number of values. In this example, Device1 contains n records.
[0117] An endpoint, as the most basic unit of storage and computation, includes data input or injection, data output, various simple or complex calculations on the data, and data storage. An application built on a database system based on this computational model can write data at the endpoint level—or at the collection of multiple endpoints such as a group or device level. Write operations include traditional insert, update, and delete operations; however, in IoT time-series data scenarios, insert operations are typically used. The application (based on the database system, which in turn is based on this model) can also query devices, groups, and endpoints to obtain results. The output of these results is also a dataset at the endpoint (or group / device) level. During queries or computations, applications can use computational interfaces such as SQL, APIs, functions, and custom computations to perform various single or mixed computations on devices, groups, and endpoints, including arithmetic calculations, logical calculations, aggregation calculations, filtering, and matching.
[0118] In this embodiment, step S2, which involves adding attribute labels and calculating dimensions, is as follows:
[0119] The endpoint and device introduce attribute tag features, which allow adding one or more different attribute tags to a collection point or device based on the business scenario or the characteristics of the device collection point. These attribute tags, as part of the endpoint or device, can also participate in the corresponding calculations in this calculation model.
[0120] An endpoint itself can have a timestamp and one or more values. It is a vector data with time attributes. Compared with the typical two-dimensional structure of tables and columns in traditional databases, the collection point and the device and collection point set that make up the collection point are a multi-dimensional data structure. Multi-dimensional data calculations are performed on the collection point, that is, calculations are performed on different values or time dimensions of the collection point.
[0121] When calculating different values or time dimensions at a collection point, the calculation is performed on data of a specific dimension at that collection point, as follows:
[0122] ① Use the special symbol $ or other specific characters to reference data from any dimension, in the form: speed$timestamp;
[0123] Where speed is a collection point; timestamp is the timestamp dimension data on speed.
[0124] ② Through custom calculations: Custom functions in the database are used to perform customized calculations, analyses, and comparisons on multidimensional data at an endpoint, in the following form:
[0125] DISTANCE(location1,location2,5s);
[0126] Location1 and Location2 are two endpoints, each containing a timestamp and three-dimensional coordinate data, respectively. DISTANCE is a user-defined function that returns the distance between two endpoints if their time differences do not exceed 5 seconds. When calculating or referencing an endpoint without specifying its dimension or using a user-defined calculation, the default value of the first acquisition dimension of the endpoint, excluding the timestamp, is used. Alternatively, the default behavior is determined by the database system in the implementation.
[0127] As a preferred approach, the extended and reinterpreted relational algebra includes set operations and relational operations. The objects of the adjusted relational and set operations are logically devices (Device(s)), and the results of the operations are also devices (Device).
[0128] Set operations include union, intersection, difference, and Cartesian product; as shown in the table below:
[0129] Union S1 S2 S1∪S2 Intersection S1 S2 S1∩S2 difference set S1 S2 S1–S2 Cartesian product S1 S2 S1×S2
[0130] Relational operations include projection, selection, join, and division; as shown in the table below:
[0131]
[0132] Let car1 and car2 be two devices. car1 and car2 contain endpoints: (pressure, speed, rev, temperature, consumption, mileage, location). Each data point contains a multi-dimensional data structure of timestamp, value, and validity.
[0133] The union operation is as follows: If the structures of S1 and S2 are compatible, perform a union operation on S1 and S2. The result of the union operation is a deduplicated set of tuples from S1 and S2. Similar to the previous set operations, each endpoint in the result set retains its original multidimensional data structure, as follows:
[0134] S1∪S2={e|e∈S1∨e∈S2};
[0135] The result of S1∪S2 is the same as the result of S2∪S1;
[0136] The difference operation is as follows: If the structures of S1 and S2 are compatible, perform a difference operation on S1 and S2. The result of the difference operation is a set of tuples that appear in S1 but not in S2. Similar to the previous set operations, each endpoint in the result set retains its original multidimensional data structure, as follows:
[0137]
[0138] The Cartesian product is specifically: two sets S1( <a1,a2,a3…a n >) and S2( <b1,b2,b3…b m The Cartesian product of S1 and S2 is the concatenation of each tuple in S1 with all tuples in S2, as shown below:
[0139] { <a1,a2,a3…a n ,b1,b2,b3…b m >| <a1,a2,a3…a n >∈S1∧ <b1,b2,b3…b m >∈S2};
[0140] The final result set is logically also a device, and the device in the result set has the sum of the number of collection points of S1 and S2, and the number of its tuples is the product of the number of tuples of S1 and S2; as with the previous set operations, each endpoint in the result set still retains the original multidimensional data structure.
[0141] The projection operation is as follows: S1 is vertically cut to eliminate several acquisition points (endpoint(s)), and the order of the projection acquisition point group is rearranged according to the input. The multidimensional data structure of each acquisition point is still retained. The information of the (speed, rev) projection endpoint of car1 is obtained in the following form:
[0142] Π (speed,rev) (car1);
[0143] The selection operation specifically involves: horizontally splitting S1 to select the set of tuples that meet the input conditions. The selection operation can be performed on any dimension of the multidimensional data structure of the collection point, or a custom calculation can be used to perform the selection on the entire collection point. If no dimension is specified by default and no custom calculation is used, the first value dimension of the collection point or a dimension defined in the system is used. For example, the following example returns all data for the temperature time dimension of car1 that falls on February 28, 2023:
[0144] σ (temperature$timestamp between‘2023-02-28 00:00:00.000‘and‘2023-03-01 00:00:00.000‘) (car1);
[0145] The join operation is specifically as follows: A selection operation is performed on the result set of the Cartesian product. The collection points in the predicates used in the join operation can be any one dimension or the whole, and the default is the default dimension determined by the system, usually value; obtain the set of tuples where the speed of car1 is greater than that of car2 while the engine speed is lower than that of car2, in the form of:
[0146]
[0147] One special type of join is also called a natural join. Specifically, that is, a join operation is performed on the common collection points (endpoint(s)) in S1 and S2, and the final result set is a set of tuples that meet the condition that the values of the common collection points are equal;
[0148] The division operation is specifically as follows: Suppose S1 contains n collection points, S2 contains m collection points, and the m collection points of S2 are a proper subset of the n collection points of S1, that is, m < n; perform the division operation on S1 and S2, that is, S1÷S2; the final result set is a set of collection point vectors with n–m collection points. The tuples in this result set are the tuples that meet the natural join of S1 and S2 and are only projected on the n–m collection points; each endpoint in the result set still retains the original multi-dimensional data structure, in the form as follows:
[0149]
[0150] The operation of adding new syntax and primitives in step S3 of this embodiment is specifically as follows:
[0151] Both collection points and devices can be associated with a series of tags or attributes, and these tags or attributes can participate in the calculations and analyses in this model. A typical usage is to use tags or attributes to filter collection points and / or devices, so as to determine the scope of collection points and / or devices that can participate in the relational operations described above. Only the collection points and / or devices that meet the tag or attribute values input by the user can truly participate in the actual calculations defined by the user. This feature provides an ability to flexibly and dynamically determine the actual calculation scope, enabling applications using the system based on this model to automatically extend the analysis and calculations to newly added devices / collection points with the same tag or attribute values without changing the logic and code. These tags or attributes have characteristics similar to the metadata of collection points and / or devices. Therefore, the calculation operations on these tag or attribute values need to be somewhat distinguished from the calculation operations on the data of collection points and / or devices to avoid confusion. Therefore, based on the redefinition of the above relational algebra, specific primitives and syntax operations are introduced:
[0152] UNIONFROM: Used for union operations, merging results that meet the conditions on different devices into the same result set. In the specific implementation, the union operation uses different auxiliary options to choose to remove duplicates (UNION) or not remove duplicates (UNIONALL). This operation is different from FROM in the traditional relational data computing model, where objects in FROM are joined.
[0153] SATISFYING: Used to perform a selection operation on the set of objects in UNIONFROM. The selection operation determines the actual set of objects for subsequent calculation and analysis at the metadata level, thereby filtering out the set of branches in the union operation. Each branch is a set of user-defined operations for a device within the set of objects, including selection and projection operations.
[0154] Continuing with the previous definition of car, let's assume there is a set of car devices {car} i |i=1..n}, these cars i There are some related tags or attributes and their corresponding values:
[0155] brand–Lexus,Infiniti,Acura,BMW,Audi,Benz
[0156] engineType–diesel,gas,electric,hybrid
[0157] engineDisp – 2.0, 3.6, 5.7
[0158] Each vehicle is equipped with various sensors that collect relevant data every 5 seconds. Below is an example using SQL and extended source code to retrieve the vehicle brand, average fuel consumption, and average speed of diesel and gasoline vehicles with an engine displacement of less than 4 liters participating in the test, at an average speed of 80 to 100 km / h between 1 PM and 2 PM on February 28th:
[0159]
[0160]
[0161] In step S5 of this embodiment, the conversion between explicit and implicit data computation models is mutually convertible between the time-series data model and the traditional relational data model. As mentioned earlier, each endpoint is a multi-dimensional data structure with time attributes, analogous to multiple columns in a traditional relational data model. The conversion between models can be explicit, such as in the conversion from a time-series model to a relational model, where the user selects to convert certain dimensions of an endpoint into corresponding column sets in the relational data model. This reduces the multi-dimensional data structure of the required collection points to a flat, one-dimensional, multi-column structure, transforming the selected dimensions of each collection point in a device into a wide, multi-column table. Then, traditional relational data model operations can be performed on the result table. Alternatively, the conversion can be implicit, continuing the example of converting from a time-series model to a relational model. This involves performing operations on the device and the table in the relational model. In this case, the system, based on this model, defaults to mapping the endpoint's value dimension to columns in the relational model for computation.
[0162] During model conversion, the corresponding data types are automatically introduced into the target model. User-defined data types are also automatically applied to different models or converted into basic data types. For example, 3D coordinate types will be applied to the column definition and calculation of the relational model during the process of converting the corresponding dimension into a column.
[0163] The transformation of explicit and implicit data computing models includes the transformation of time-series data models to relational data models and the transformation of relational data models to time-series data models;
[0164] The specific rules for converting time-series data models to relational data models are as follows:
[0165] ① Convert a device or an intermediate result of an extended relational algebra operation into a result table;
[0166] ② Each dimension of information at each data collection point (endpoint) is selectively converted into a column in the result table, while maintaining the definitions of data type / length / precision;
[0167] ③ Multiple dimensions of information at each data collection point (endpoint) are selectively converted into a column in the result table using custom dimension calculation, and the data type / length / precision of the calculation result is used as the column definition;
[0168] ④ Transformation of time dimensions of multiple data collection points (endpoints) under specific conditions: When time dimensions are aligned, they are converted into the same timestamp type column in the result table;
[0169] The implicit type conversions described above are special cases of ①, ②, and ④.
[0170] Similarly, the conversion from a relational model to a time-series model can be either explicit or implicit. Explicit conversion involves the user specifying how some columns of a wide, multi-column table are transformed into a multi-dimensional structure with an endpoint. Implicit conversion, by default, transforms each column into the endpoint's value dimension, while the timestamp dimension is either specified by the user or uses the real-time data from the conversion. (See attached image.) Figure 2 As shown, the specific rules for converting a relational data model to a time-series data model are as follows:
[0171] ① Convert a table or an intermediate result table of traditional relational algebra operations into a device, i.e., a virtual or exported device;
[0172] ② Each column is converted into a value column (endpoint), while maintaining the data type / length / precision definition, and the column name is used as the name of the data collection point (endpoint);
[0173] ③ Selectively convert one or more columns in the table into values in a single endpoint or its multidimensional structure in the resulting device using custom calculations, and use the data type / length / precision of the calculation results as the type definition of the endpoint or dimension value;
[0174] ④ If the table has a timestamp column, the timestamp column serves as the timestamp dimension for all collection points (endpoints), and the time dimensions of all collection points (endpoints) are aligned.
[0175] This embodiment can determine the direction of the default implicit model transformation based on the computational analysis behavior of the user's computational request.
[0176] As attached Figure 3 As shown, the left side represents the time-series data model, and the right side represents the relational data model. In the model on the left, DEVICE is the device object we discussed earlier. DERIVED DEVICE (also called VIRTUAL DEVICE) is derived from the relational data model's table using CREATE [virtual] DEVICE. As mentioned before, this transformation can be explicit or implicit. In the model on the right, Named Query and Implicit DEVICE TABLE are derived from DEVICE in the time-series data model using CREATE NAMED QUERY. These two objects can be used like tables or subqueries in the relational data model; similarly, this transformation can be explicit or implicit.
[0177] The cross-model calculation and analysis in step S6 of this embodiment is as follows:
[0178] Cross-model computational analysis can be easily performed through extended relational algebra operations. Relational tables can be joined with time-series model data. A join can occur between a column and a dimension of a data collection point; if not specified, it will be on the first value dimension defined by the system at that data collection point. The result set of cross-model join operations is reduced to a relational table (a two-dimensional structure) through implicit model transformation. Of course, if needed, users can also use explicit model transformation to convert the result set or intermediate results into a high-dimensional time-series model and use time-series model operations for further analysis and computation.
[0179] Below is an example of cross-modal analysis calculation. Continuing with the previous vehicle equipment definition, we introduce another typical relational table, CAR_SALES, which contains the following column definitions:
[0180] (sales_date,brand,model,model_year,dealer_id,customer_id,msrp,payment_type)
[0181] This example will retrieve information on gasoline or diesel vehicles that have been on the market for less than one year, have a price of less than $50,000, fuel consumption of less than 15 liters per 100 kilometers at an average speed of 60 to 100 kilometers per hour, a total mileage of less than 20,000 kilometers, and an engine displacement of less than 4 liters.
[0182]
[0183]
[0184] In summary, this embodiment discusses the characteristics of the computational operation units and multidimensional data structures of the new unified computing model for the Internet of Things (IoT), and the resulting multidimensional computation and computational operations on the attribute tags of these object units. The computing model extends and reinterprets the relational algebra of traditional relational database systems, and introduces new syntax and primitive operations. These new computational operations and syntax extensions can help address the needs of new multidimensional data and attribute tag computational analysis in the IoT era, while also providing a theoretical foundation for new multimodal computational analysis. This embodiment also discusses bidirectional conversion between data computational models, including explicit and implicit conversions, thereby breaking down barriers between different computational models. Based on this, it explores the idea of cross-modal data computation of the new computing model. Unlike the current industry practice of only being able to compute independently within different models and performing inefficient data exchange between models, the new computing model empowers systems based on this model to achieve cross-modal computational fusion at the operator level. The new ideas proposed in this invention can make the ever-increasing cross-modal data computation more efficient and save computational resources.
[0185] Example 2:
[0186] This embodiment provides a system for constructing and analyzing theoretical models for heterogeneous data computing in the Internet of Things (IoT). The system includes:
[0187] The building module is used to construct multidimensional data structures based on operation units, enabling more effective and efficient computation, storage, and management of data tailored to the characteristics of time-series data in the Internet of Things.
[0188] Add module one, which is used to add attribute labels and perform dimension calculations;
[0189] The extension module is used to extend and reinterpret relational algebra, providing a theoretical basis for computational analysis on multidimensional data structures based on operational units in new data computation models;
[0190] Add Module 2 to add new syntax and primitive operations, enabling more effective analysis and calculation and dynamic adjustment of the calculation range, especially for the characteristics of new data, particularly IoT time-series data.
[0191] The conversion module is used to convert explicit and implicit data computing models, opening up an efficient channel for free data conversion between different models and providing a theoretical basis for new cross-model data computing and analysis.
[0192] The analysis module is used for cross-model computational analysis, which integrates cross-model data computation at the operator level to achieve higher efficiency in cross-model data computation, while avoiding the waste of computing resources caused by post-computation data exchange between existing models.
[0193] Example 3:
[0194] This invention also provides an electronic device, including: a memory and a processor;
[0195] The memory stores the instructions executed by the computer.
[0196] The processor executes the computer execution instructions stored in the memory, causing the processor to execute the theoretical model construction and analysis method for heterogeneous data computing for the Internet of Things in any embodiment of the present invention.
[0197] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor can be a microprocessor or any conventional processor.
[0198] Memory is used to store computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and by accessing data stored in the memory. Memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, at least one application program required for a function, etc.; the data storage area can store data created based on the use of the terminal, etc. In addition, memory can also include high-speed random access memory, and can also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart memory cards (SMC), secure digital cards (SD cards), flash memory cards, at least one disk storage device, flash memory devices, or other volatile solid-state storage devices.
[0199] Example 4:
[0200] This invention also provides a computer-readable storage medium storing multiple instructions, which are loaded by a processor to cause the processor to execute the method for constructing and analyzing a theoretical model for heterogeneous data computing for the Internet of Things according to any embodiment of this invention. Specifically, a system or device equipped with a storage medium may be provided, on which software program code implementing the functions of any of the above embodiments is stored, and the computer (or CPU or MPU) of the system or device may read and execute the program code stored in the storage medium.
[0201] In this case, the program code read from the storage medium can itself implement the function of any of the above embodiments, and therefore the program code and the storage medium storing the program code constitute part of the present invention.
[0202] Storage media embodiments for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RYM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer via a communication network.
[0203] Furthermore, it should be clear that not only can the program code read by the computer be executed, but also the operating system or other components operating on the computer can be instructed based on the program code to perform some or all of the actual operations, thereby realizing the function of any of the embodiments described above.
[0204] Furthermore, it is understood that the program code read from the storage medium is written to the memory set in the expansion board inserted into the computer or to the memory set in the expansion unit connected to the computer. Then, based on the instructions of the program code, the CPU or other components installed on the expansion board or expansion unit execute some and all of the actual operations, thereby realizing the function of any of the embodiments described above.
[0205] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for constructing and analyzing a theoretical model of Internet of Things (IoT) heterogeneous data computing, characterized in that, The method is specifically as follows: Constructing a multi-dimensional data structure based on an operation unit: effectively and efficiently calculating, storing, and managing data according to the characteristics of time-series data of the Internet of Things; Adding attribute labels and performing dimension calculation; Extending and reinterpreting relational algebra: providing a theoretical basis for the calculation and analysis of new data calculation models based on the multi-dimensional data structure of the operation unit; Adding new syntax and primitive operations: effectively performing analysis and dynamically adjusting the calculation range according to the characteristics of the Internet of Things time-series data calculation in new data; Converting explicit and implicit data calculation models: providing an efficient channel for free data conversion between different models, and providing a theoretical basis for new cross-model data calculation and analysis; Cross-model calculation and analysis: deep cross-model data calculation fusion at the operator level, which makes cross-model data calculation more efficient and avoids the waste of computing resources caused by data exchange between existing models after calculation; Among them, the multi-dimensional data structure based on the operation unit is specifically as follows: Using collection points as basic data calculation operation units, each collection point has a timestamp and one or more values, and is a multi-dimensional data structure, represented as: e1 = <timestamp, v1, v2, v3, …>; This is different from a column in a table in a traditional relational database, which is only a single-dimensional value; each collection point allows to include or associate certain markers or attributes, and the certain markers include data units and manufacturing locations; the certain markers are obtained by selection or customization, and the certain markers or attributes have nothing to do with the actual collection data of the collection point, so they are different from each dimension in the fixed multi-dimensional data structure of the collection point. The certain markers or attributes are dynamic associated labels of the collection point, and the values of the certain markers or attributes are defined as the collection point in the analysis calculation. Logically, the certain markers or attributes are considered as part of the metadata definition of the collection point and / or device; A device is understood as a set of related collection points, represented as: S = {e | e } Where S represents a device, and related collection points on the same device generate data at the same or different time points. For the convenience of time-based calculation, the concept of collection point set is further introduced to group collection points generating data at the same time point into the same collection point set; Each collection point on a device belongs to a separate collection point set, and all collection points on a device belong to the same collection point set; The new syntax and primitive operations are specifically as follows: UNIONFROM: used for union operation, merging the results of different devices that meet the conditions into the same result set. The union in the specific implementation uses different auxiliary options to select to remove duplicates or not to remove duplicates; SATISFYING: used for selecting the object set in the UNIONFROM first, the selection operation determines the actual object set range for the subsequent calculation and analysis at the metadata level, thus filtering out the branch set in the union operation, each branch is for a device within the object set range to further user-defined operations of various types, including selection and projection operations; The conversion of explicit and implicit data calculation models includes the conversion of a time series data model to a relational data model and the conversion of a relational data model to a time series data model; The rules for converting a time series data model to a relational data model are as follows: ① A device or an intermediate result device of an extended relational algebra operation is converted into a result table; ② Each dimension information of each collection point is selectively converted into a column in the result table, and the definition of the data type / length / precision is maintained; ③ Multiple dimension information of each collection point is selectively converted into a column in the result table using custom dimension calculation, and the data type / length / precision of the calculation result is used as the definition of the column; ④ The time dimension of multiple collection points is converted under certain conditions: in the case of time dimension alignment, it is converted into the same timestamp type column in the result table; The rules for converting a relational data model to a time series data model are as follows: ① A table or an intermediate result table of a traditional relational algebra operation is converted into a device, i.e., a virtual or derived device; ② Each column is converted into a value column, and the definition of the data type / length / precision is maintained, and the column name is used as the name of the collection point; ③ One or more columns in the table are selectively converted into a value in the result device using custom calculation, and the data type / length / precision of the calculation result is used as the type definition of the value in the collection point or dimension; ④ If the table has a timestamp column, the timestamp column is used as the timestamp dimension of all collection points, and the time dimensions of all collection points are aligned. 2.The method of claim 1, wherein, Adding attribute labels and performing dimension calculation are as follows: According to the characteristics of the business scenario or the device collection point, one or more different attribute labels are added to a collection point or device; The collection point and the device and collection point set composed of collection points are a multi-dimensional data structure, and multi-dimensional data calculation is performed on the collection point, i.e., calculation is performed on different values or time dimensions of the collection point; When calculating different values or time dimensions of the collection point, the data of a specific dimension on the collection point is targeted, as follows: ① By using special characters such as $ or other specific characters: reference any dimension data, in the form of: speed$timestamp; Where speed is a collection point; timestamp is the timestamp dimension data on speed; ② By custom calculation: database custom functions perform customized calculation and analysis comparison on multi-dimensional data of an endpoint, in the form of: DISTANCE(location1, location2,5s); Where, location1 and location2 are two collection points, respectively containing timestamp and three-dimensional coordinate data; DISTANCE is a custom function to return the distance between the two collection points when the time difference is not more than 5 seconds; the calculation or reference of a collection point defaults to using the value of the first collection dimension except the timestamp of the collection point in the case of not specifying the dimension or not using custom calculation, or the default behavior is agreed in the implementation based on the database system. 3.The method of claim 1, wherein, The extended and reinterpreted relational algebra includes set operations and relational operations, and the objects of the adjusted relational operations and set operations are logically devices, and the results of the operations are also devices; The set operations include union, intersection, difference, and Cartesian product; The relational operations are projection, selection, join, and division; Set , are two devices, , contains endpoints: (pressure, speed, rev, temperature, consumption, mileage, location), each collection point contains a multi-dimensional data structure of timestamp, value, validity; The union operation is specifically: in the case of structural compatibility of S1 and S2, the union operation is performed on S1 and S2, and the result of the union operation is the de-duplicated union set of the tuples of S1 and S2; each endpoint in the result set still retains the original multi-dimensional data structure, and the form is as follows: S1 S2 = { e | e e } S1 The results of S2 are the same as S2 The results of S1 are the same as S1 The difference operation is specifically: in the case of structural compatibility of S1 and S2, the difference operation is performed on S1 and S2, and the result of the difference operation is the set of tuples that are present in S1 but not in S2; each endpoint in the result set still retains the original multi-dimensional data structure, and the form is as follows: S1 - S2 = { e | e e }; The Cartesian product is specifically: the Cartesian product of two sets S1(< , , … >) and S2(< , , … >) is the concatenation of each tuple of S1 with all tuples in S2, denoted as follows: { < , , … , , , … > | < , , … > < , , … > } ; The final result set is also logically a device, and the device of the result set has the sum of the collection point quantities of S1 and S2, and the tuple quantity is the product of the tuple quantities of S1 and S2; each endpoint in the result set still retains the original multi-dimensional data structure; The projection operation is specifically: cutting S1 vertically, eliminating some collection points, and rearranging the order of the projection collection point group according to the input, and the multi-dimensional data structure of each collection point is still retained, obtaining the information of the projection endpoint (speed, rev) in the following form: ; The selection operation is specifically: the S1 is horizontally cut to select the tuple set that meets the input condition, and the selection operation is performed on any one dimension of the multi-dimensional data structure of the collection point or the entire collection point using custom calculation; in the case of not specifying the dimension and not using custom calculation, the first value dimension of the collection point or the definition in the system is used by default; The connection operation is specifically: performing a selection operation on the result set of the Cartesian product, and the collection point in the predicate used by the connection operation is the same as an arbitrary dimension or the whole, and a default dimension determined by the system is used by default, which is usually value; obtaining the speed of the vehicle is greater than the speed of the vehicle at the same time while the rotating speed of the engine is lower than a tuple set in the form of: ; One type of special join is also called natural join, which is specifically to perform the join operation on the collection points that are common to S1 and S2, and the final result set is a set of tuples that meet the condition that the values of the common collection points are equal; The division operation is specifically: assuming that S1 contains n collection points and S2 contains m collection points, and the m collection points of S2 are a proper subset of the n collection points of S1, i.e., m < n; the division operation is performed on S1 and S2, that is, S1 ÷ S2; the final result set is a set of n – m collection point vectors, and the tuples in the result set meet the natural join of S1 and S2 and are only projections on the n – m collection points; each endpoint in the result set still retains the original multi-dimensional data structure, and the form is as follows: S1 ÷ S2= (S1 S2).
4. The method of claim 1 to 3, wherein, The cross-model calculation analysis is specifically as follows: The result set of the cross-model join operation is reduced to a relational table, i.e., a two-dimensional structure, under implicit model conversion; or, The user converts the result set or intermediate result into a high-dimensional time series model through explicit model conversion, and uses time series model operations to make further analysis and calculation.
5. A thing-oriented Internet of Things (IoT) heterogeneous data computing theory model construction and analysis system, characterized in that, The system comprises: A construction module for constructing an operation unit-based multidimensional data structure, which is effective and efficient in calculation, storage and management of time series data of the Internet of Things; An adding module one for adding attribute labels and performing dimension calculation; An extension module for extending and reinterpreting relational algebra, providing a theoretical basis for calculation and analysis of new data calculation models based on the operation unit-based multidimensional data structure; An adding module two for adding new syntax and primitive operations, which is effective in analysis and calculation and dynamically adjusts the calculation range according to the characteristics of new data, especially the Internet of Things time series data calculation; A conversion module for converting explicit and implicit data calculation models, providing an efficient channel for free data conversion between different models, and providing a theoretical basis for new cross-model data calculation and analysis; An analysis module for cross-model calculation and analysis, which fuses cross-model data calculation at the operator level, thereby achieving higher efficiency of cross-model data calculation and avoiding waste of computing resources caused by data exchange between existing models after calculation; The operation unit-based multidimensional data structure is constructed as follows: Use the collection point as the basic data calculation operation unit, each collection point has a timestamp and one or more values, and is a multidimensional data structure, represented as: e1 = <timestamp, v1, v2, v3, …>; This is different from a column in a table in a traditional relational database, which is only a single-dimensional value; each collection point allows to contain or associate certain markers or attributes, and the certain markers include data units and manufacturing places; the certain markers are obtained by selection or self-definition, and the certain markers or attributes have nothing to do with the actual collection data of the collection point, so they are different from the dimensions in the fixed multidimensional data structure of the collection point, the certain markers or attributes are dynamic associated labels of the collection point, and the values of the certain markers or attributes are defined in the same way as the collection point in the analysis and calculation, logically, the certain markers or attributes are regarded as part of the metadata definition of the collection point and / or device; A device is understood as a set of related collection points, represented as: S = {e | e } wherein S represents a device, and the related collection points on the same device generate data at the same or different time points, for the convenience of time-based calculation, the concept of collection point set is further introduced to classify the collection points generating data at the same time point into the same collection point set; Each collection point on a device belongs to a separate collection point set, and all collection points on a device belong to the same collection point set; The new syntax and primitive operation are added as follows: UNIONFROM: used for union operation, which merges the results of different devices that meet the conditions into the same result set, and the union uses different auxiliary options to select to remove duplicates or not to remove duplicates in specific implementation; SATISFYING: used for selecting the object set in the UNIONFROM first, the selection operation determines the actual object set range of subsequent calculation analysis at the metadata level, thereby filtering out the branch set in the union operation, each branch is for a device within the object set range to further user-defined operations of various types, including selection and projection operations; The conversion of explicit and implicit data calculation models includes conversion of a time series data model to a relational data model and conversion of a relational data model to a time series data model; The rules for converting the time series data model to the relational data model are as follows: ① A device or an intermediate result device of an extended relational algebra operation is converted into a result table; ② Each dimension information of each collection point is selectively converted into a column in the result table, and the definition of the data type / length / precision is maintained; ③ Multiple dimension information of each collection point is selectively converted into a column in the result table using a custom dimension calculation, and the data type / length / precision of the calculation result is used as the definition of the column; ④ The time dimension of multiple collection points is converted under certain conditions: the time dimension is aligned, and is converted into the same timestamp type column in the result table. The rules for converting the relational data model to the time series data model are as follows: ① A table or an intermediate result table of a traditional relational algebra operation is converted into a device, i.e., a virtual or derived device; ② Each column is converted into a value column, and the definition of the data type / length / precision is maintained, and the column name is used as the name of the collection point; ③ One or more columns in the table are selectively converted into a value in a result device using a custom calculation, and the data type / length / precision of the calculation result is used as the type definition of the value in the collection point or dimension; ④ If the table has a timestamp column, the timestamp column is used as the timestamp dimension of all collection points, and the time dimensions of all collection points are aligned.
6. An electronic device, comprising: It comprises: a memory and at least one processor; wherein the memory has stored thereon a computer program; the at least one processor executes the computer program stored in the memory, so that the at least one processor executes the Internet of Things-oriented heterogeneous data calculation theory model construction and analysis method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The computer readable storage medium has stored therein a computer program, which can be executed by a processor to implement the Internet of Things-oriented heterogeneous data calculation theory model construction and analysis method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Statistic analysis processing method and device for multi-source heterogeneous data of internet of things
CN104834813A
Data query expression generation method and device, equipment and storage medium
CN116150183A