Data transfer method, device, equipment and computer-readable storage medium

By analyzing the similarity between circulating data and historical data in the Internet of Things platform, determining the associated devices and optimizing the circulation rules, the problem of insufficient device linkage is solved, the device control effect is improved and the platform management cost is reduced.

CN117131097BActive Publication Date: 2025-08-26SF TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210558094.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-19
Publication Date
2025-08-26
Estimated Expiration
2042-05-19

AI Technical Summary

Technical Problem

The existing IoT platforms do not consider the linkage or correlation between devices during data flow, resulting in poor device control results, especially in large-scale IoT deployments, which add platform performance requirements and management costs.

Method used

By obtaining the circulating data in the Internet of Things platform and the historical data of the target device, using similarity analysis to determine the associated data from the preset database, and circulating the circulating data to the associated device, optimizing the data circulation rules.

Benefits of technology

It improves the linkage between devices, optimizes the circulation rules of the Internet of Things platform, reduces platform performance requirements, and reduces management costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117131097B_ABST
    Figure CN117131097B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a data flow method, apparatus, device and computer-readable storage medium, the method comprising: obtaining the flow data in the Internet of Things platform and the target device corresponding to the flow data; extracting the historical data corresponding to the target device from the preset database of the Internet of Things platform; determining the associated data corresponding to the historical data from the remaining data based on the similarity between the historical data and the remaining data in the preset database; and transferring the flow data to the associated device corresponding to the associated data. The data flow method provided in the embodiments of the present application utilizes the similarity between the data to determine the associated devices, and when the flow data related to the target device is transferred to the associated device, the linkage between the devices can be better improved. In addition, the flow rules within the Internet of Things platform can be further optimized, avoiding the problem of increasingly higher performance requirements for the Internet of Things platform due to the expansion of the scale of the Internet of Things.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of Internet of Things technology, and specifically to a data flow method, apparatus, device, and computer-readable storage medium. Background Art

[0002] Currently, IoT technology has been applied across various industries, such as the Industrial Internet of Things (IIoT), the Internet of Vehicles (IoV), and the Home Internet of Things (IoT). As technology advances, the scale of IoT will continue to expand. For example, in the Industrial Internet of Things (IIoT), IoT deployments at large enterprises have rapidly expanded to thousands or even tens of thousands of devices or sensors. In most IoT scenarios, IoT platforms are used to manage these massive numbers of devices and sensors.

[0003] Specifically, IoT platforms configure data flow rules between devices and sensors. When new devices and sensors are connected, users can customize the data flow rules between them on the IoT platform to enable sensor-to-device control. However, this data flow method often ignores the linkages or dependencies between devices, resulting in suboptimal device control. Summary of the Invention

[0004] The embodiments of the present application provide a data flow method, apparatus, device, and computer-readable storage medium, which aim to solve the technical problem that the data flow process of the existing Internet of Things platform does not take into account the linkage or correlation between devices, thereby affecting the device control effect.

[0005] On the one hand, the embodiments of the present application provide a data flow method, which is applied to an Internet of Things platform;

[0006] The method comprises:

[0007] Acquire the flow data in the Internet of Things platform and the target device corresponding to the flow data;

[0008] Extracting historical data corresponding to the target device from a preset database of the Internet of Things platform;

[0009] Determining associated data corresponding to the historical data from the remaining data based on similarity between the historical data and the remaining data in the preset database;

[0010] The flow data is transferred to an associated device corresponding to the associated data.

[0011] As an optional embodiment of the present application, determining the associated data corresponding to the historical data from the remaining data based on the similarity between the historical data and the remaining data in the preset database includes:

[0012] Calculating the cosine similarity between the historical data and the remaining data in the preset database;

[0013] determining trend similarity between the historical data and the remaining data based on a change characteristic of each value in the historical data and a change characteristic of each value in the remaining data;

[0014] Determine associated data corresponding to the historical data from the remaining data according to the cosine similarity and the trend similarity.

[0015] As an optional embodiment of the present application, weighting the cosine similarity and the trend similarity to obtain a comprehensive similarity between the historical data and the remaining data includes:

[0016] Setting weights of the cosine similarity and the trend similarity according to the object model field of the target device;

[0017] weighting the cosine similarity and the trend similarity according to the weight to obtain a comprehensive similarity between the historical data and the remaining data;

[0018] According to the magnitude relationship of the comprehensive similarities, associated data corresponding to the historical data is determined from the remaining data.

[0019] As an optional embodiment of the present application, determining the associated data corresponding to the historical data from the remaining data based on the similarity between the historical data and the remaining data in the preset database includes:

[0020] Determining candidate devices associated with the target device based on similarities between object model fields of various devices on the IoT platform;

[0021] Extracting candidate data corresponding to the candidate device from the preset database;

[0022] According to the similarity between the historical data and the candidate data, associated data corresponding to the historical data is determined from the candidate data.

[0023] As an optional embodiment of the present application, determining the associated data corresponding to the historical data from the remaining data based on the similarity between the historical data and the remaining data in the preset database includes:

[0024] According to the timestamp corresponding to each value in the historical data and the timestamp corresponding to each value in the remaining data in the preset database, the historical data and the remaining data are time-aligned to obtain aligned historical data and remaining data;

[0025] Normalizing the aligned historical data and the remaining data respectively to obtain normalized historical data and the remaining data;

[0026] According to the similarity between the normalized historical data and the remaining data, associated data corresponding to the historical data is determined from the remaining data.

[0027] As an optional embodiment of the present application, extracting historical data corresponding to the target device from a preset database of the Internet of Things platform includes:

[0028] According to a preset time period and sampling period, historical data corresponding to the target device is extracted from the time series database of the Internet of Things platform.

[0029] As an optional embodiment of the present application, after transferring the flow data to an associated device corresponding to the associated data, the method further includes:

[0030] The initial flow rule corresponding to the associated device in the Internet of Things platform is replaced with the flow rule between the target device and the associated device.

[0031] On the other hand, an embodiment of the present application further provides a data flow device, which is provided in an Internet of Things platform;

[0032] The device comprises:

[0033] An acquisition module, configured to acquire the flow data in the IoT platform and the target device corresponding to the flow data;

[0034] An extraction module, configured to extract historical data corresponding to the target device from a preset database of the Internet of Things platform;

[0035] a comparison module, configured to determine, from the remaining data, associated data corresponding to the historical data based on similarities between the historical data and the remaining data in the preset database;

[0036] The transfer module is used to transfer the transfer data to the associated device corresponding to the associated data.

[0037] On the other hand, an embodiment of the present application also provides a data flow device, which includes a processor, a memory, and a data flow program stored in the memory and runnable on the processor. The processor executes the data flow program to implement the steps in the above-mentioned data flow method.

[0038] On the other hand, an embodiment of the present application further provides a computer-readable storage medium, on which a data flow program is stored, and the data flow program is executed by a processor to implement the steps in the above-mentioned data flow method.

[0039] The data transfer method provided in the embodiments of the present application extracts historical data of the target device corresponding to the transferred data from a preset database during data transfer. The method then uses the similarity between the historical data and the remaining data to obtain associated data, thereby identifying associated devices that are associated with the target device or have a high degree of similarity. This method can then transfer the transferred data associated with the target device to the associated devices, thereby improving inter-device connectivity. Furthermore, it can further optimize the transfer rules within the IoT platform, avoiding the problem of increasing performance requirements for the IoT platform due to the expansion of the IoT scale. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0041] Figure 1 A schematic diagram of an implementation scenario of a data transfer method provided in an embodiment of the present application;

[0042] Figure 2 A schematic diagram of a data transfer method according to an embodiment of the present invention;

[0043] Figure 3 A schematic diagram of a process flow for determining associated data based on cosine similarity and trend similarity provided in an embodiment of the present application;

[0044] Figure 4 A schematic diagram of a process flow for determining associated data based on object model fields provided in an embodiment of the present application;

[0045] Figure 5 A schematic flow chart of the steps for pre-screening the remaining data to determine the associated data provided in an embodiment of the present application;

[0046] Figure 6 A schematic flow chart of steps for preprocessing data to determine associated data provided in an embodiment of the present application;

[0047] Figure 7 A schematic diagram of the steps of another data transfer method provided in an embodiment of the present application;

[0048] Figure 8 This is a structural diagram of a data transfer device provided in an embodiment of the present application;

[0049] Figure 9A schematic diagram of the structure of a data flow device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of the present invention.

[0051] In the embodiments of the present application, the word "exemplary" is used to mean "serving as an example, illustration or description". Any embodiment described as "exemplary" in the embodiments of the present application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any person skilled in the art to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes are not elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the embodiments of the present application.

[0052] The embodiments of the present application provide a data flow method, apparatus, device, and computer-readable storage medium, which are described in detail below.

[0053] In the embodiment of the present application, the data flow method is deployed on the data flow device in the form of a program, and the data flow device is installed in the data flow equipment in the form of a processor. The data flow device in the data flow equipment executes the following steps by running the program corresponding to the data flow method: obtaining the flow data in the Internet of Things platform and the target device corresponding to the flow data; extracting the historical data corresponding to the target device from the preset database of the Internet of Things platform; determining the associated data corresponding to the historical data from the remaining data based on the similarity between the historical data and the remaining data in the preset database; and transferring the flow data to the associated device corresponding to the associated data.

[0054] like Figure 1 As shown, Figure 1The implementation scenario diagram of a data flow method provided in the embodiment of the present application can also be understood as a structural diagram of an Internet of Things platform. The implementation scenario diagram of the data flow method provided in the embodiment of the present application includes a number of devices 100, and a data flow device 200 that is communicatively connected to the number of devices. The device 100 can be a sensor, such as a temperature sensor, a pressure sensor, a humidity sensor, etc., or a terminal. Specifically, the terminal here can be a mobile phone, a computer, an air conditioner, a refrigerator, a water heater, and other household devices used to build a home Internet of Things, or can be a conveyor belt, a generator, a cutting machine, and other industrial equipment used to build an industrial Internet of Things. The embodiment of the present application does not limit the specific form of the device. The data flow device 200 can be understood as the service end of the Internet of Things platform, for example, it can be a server, a cloud server, a distributed server, etc., which is used to realize the processing of data in the Internet of Things platform.

[0055] Specifically, under normal circumstances, the sensors in the device are mainly used for data collection, and the collected data is transferred to other devices through the data flow device 200 according to the established data flow rules. The device that receives the data here usually refers to a terminal, which is a device that needs to be controlled. For example, taking the most common Internet of Things architecture as an example, after the temperature sensor installed in the home collects the temperature in the home, it will send the temperature to the air conditioner through the terminal data flow device to achieve control of the air conditioner. Of course, the solution provided above is only an example. In fact, under the premise of configuring the corresponding flow rules, the terminal can also transfer its own operating data or processed data to other devices. In other words, by configuring the corresponding data flow rules on the data flow device 200, it is possible to transfer the data collected or processed by any device to any other device.

[0056] However, currently, when a new device is added to the IoT, a new sensor is typically added. Data flow rules between the sensor and the device are then configured within the IoT platform's data flow device to enable data transfer between the sensor and the device, thereby controlling the device. However, this data flow method often overlooks potential linkages between the device and other connected devices in the IoT platform. For example, in a relatively simple home IoT architecture, a temperature sensor can collect temperature data and transmit it to an air conditioner to control the air conditioner. When a humidifier is added to the home IoT architecture, a humidity sensor is also added, and data flow rules between the humidity sensor and the humidifier are configured to control the humidifier. However, there is a linkage between the newly added humidifier and the air conditioner already connected to the IoT. Specifically, when the temperature is high, the air conditioner will run. Usually, when the temperature is high, the indoor humidity will generally be low, and the operation of the air conditioner will also cause the indoor humidity to further decrease to a certain extent. Therefore, under normal circumstances, turning on the air conditioner also means that the humidifier needs to be turned on at the same time, that is, there will be a synchronous linkage relationship between the air conditioner and the humidifier.

[0057] Furthermore, if the potential linkage relationship between the newly connected device and other connected devices in the IoT platform is ignored, as the number of devices connected to the IoT platform gradually increases, the flow rules configured in the data flow devices will become more and more complicated. Especially in large-scale industrial IoT, when thousands of devices are connected, if the configured data flow rules cannot be optimized, the performance requirements of the industrial IoT platform will become higher and higher, increasing the management cost of the platform. This application also proposes a data flow method based on the implementation scenario diagram of the above-mentioned data flow method. For specific embodiments, please refer to the subsequent Figures 2 to 6 .

[0058] It should be noted that Figure 1 The implementation scenario diagram of the data flow method shown is only an example. The scenario of the data flow method described in the embodiment of the present application is to more clearly illustrate the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided in the embodiment of the present application.

[0059] like Figure 2 As shown, Figure 2 A schematic flow chart of a data transfer method provided in an embodiment of the present application. The data transfer method in an embodiment of the present application includes steps 201 to 204:

[0060] 201. Obtain the flow data in the Internet of Things platform and the target device corresponding to the flow data.

[0061] In the embodiment of the present application, the flow data refers to a string of data received in real time by the data flow device in the Internet of Things platform, and the target device corresponding to the flow data refers to the target device to which the flow data needs to be transferred based on the data flow rules configured in the data flow device. Figure 1 Taking the IoT architecture provided in as an example, the flow data can be the temperature data collected by the temperature sensor, and the corresponding target device is the terminal device to which the temperature data flows, that is, the air conditioner.

[0062] In an embodiment of the present application, after determining the flow data and the target device, the associated devices that may be linked with the target device will be screened out based on the similarity between the historical data stored in the preset database. The specific process is shown in subsequent steps 202 to 203.

[0063] 202. Extract historical data corresponding to the target device from a preset database of the Internet of Things platform.

[0064] In an embodiment of the present application, the Internet of Things platform will associate the data collected and processed by each device with a timestamp, device identification information, and data type identification information and store them in a preset database. Among them, the device identification information is uniquely related to the device, and under normal circumstances, the device unique identification code can be directly used as the device identification information. The data type identification information is usually related to the data received or output by the device, for example, the temperature data of the temperature sensor received by the air conditioner, the operating data of the air conditioner during operation, such as the operating frequency, etc. At this time, the temperature data and the operating data will be marked with different data type identification information. In other words, each data in the preset database is a data string distinguished by different device identification information and different data type identification information. For example, these data transmissions may include the temperature data received by device A, the temperature data received by device B, the humidity data received by device B, etc., and each string of data is arranged based on the timestamp.

[0065] In an embodiment of the present application, the historical data corresponding to the target device can be understood as the data received by the target device in the past period. Therefore, based on the device identification information and data type identification information marked on each data string, the historical data corresponding to the target device can be extracted from the preset database. The historical data exists in the form of a data string arranged according to timestamps, and the embodiment of the present application will not be repeated here.

[0066] Furthermore, considering that the data in the IoT platform has a strong time attribute, in order to improve the efficiency of the data flow method of the embodiment of the present application, the preset database here usually refers to a time series database. Specifically, after receiving the data uploaded by each sensor and cleaning the data, the IoT platform will write the data into a time series database specially designed and optimized for the time dimension for storage to support high concurrency and high throughput data writing. Since the data flow method provided by the present application involves the reading, writing and processing of large quantities of data, although conventional relational databases can also process IoT data, when the data scale increases sharply, the performance of the relational database drops sharply, and the storage method based on the time series database can handle the reading and writing of large quantities of data, providing more stable reading and writing data performance, such as data retention, continuous query, streaming computing, time-based aggregation, etc.

[0067] Specifically, extracting historical data corresponding to the target device from the preset database of the IoT platform can be done by extracting historical data corresponding to the target device from the time series database according to a preset time period and sampling period. The time period and sampling period can be set based on user needs. Specifically, it can be understood that the longer the time period and the shorter the sampling period, the more historical data can be extracted, and the more accurately this data can be used to analyze the linkage between devices, but the corresponding data calculation amount increases. For example, as a feasible implementation solution, data can be collected every hour for the past month.

[0068] 203 : Determine associated data corresponding to the historical data from the remaining data based on similarity between the historical data and the remaining data in the preset database.

[0069] In an embodiment of the present application, after extracting the historical data, the data flow device will compare the historical data with the remaining data in the preset database for similarity, and determine the associated data corresponding to the historical data based on the similarity. Among them, the remaining data here can refer to all other data in the Internet of Things except this historical data, and specifically can include historical data of other data types corresponding to the target device, as well as historical data corresponding to other devices. Of course, considering that this application is mainly for analyzing the correlation between the data of different devices and thus determining the linkage between different devices, the remaining data here can also only include the historical data corresponding to other devices, that is, the remaining data can be obtained by filtering from the preset database using the device identification information in the historical data of the target device.

[0070] Furthermore, the similarity between the historical data and the remaining data in the preset database refers to the similarity between the historical data and each data point in the remaining data. Therefore, similar to the method for extracting historical data described above, each data point in the remaining data must be processed according to the same time period and sampling period. The resulting multiple data strings can then be used to calculate similarity. The resulting remaining data can be understood as multiple sets of reference data strings.

[0071] To facilitate understanding of the historical data and remaining data provided by the embodiment of the present application, a feasible embodiment is given below. For example, the historical data is the historical temperature data received by the air conditioner, which contains the temperature values ​​at each hour of the past day. In this case, the historical data is a 24-dimensional data string (a1, a2, ..., a 24 ), each value in the data string represents the temperature value at an hour, and correspondingly, the remaining data can be multiple 24-dimensional data strings, representing different types of data, such as the humidity values ​​at each hour in the past day (b1, b2, ..., b 24 ), the electricity consumption at each hour in the past day (c1, c2, ..., c 24 ), the operating status of a device at each hour in the past day (d1, d2, ..., d 24 ) and so on. Each value in each data string in the remaining data represents information associated with other devices at an hour.

[0072] Furthermore, the similarity here is not simply determined by judging whether each value in the historical data is equal to each value in the remaining data, but is determined based on the data statistics method in big data from different dimensions to comprehensively determine the similarity between the historical data and the remaining data, for example, involving the overall characteristics and trend characteristics of the data, etc. For specific implementation solutions, please refer to the subsequent Figure 3 and its explanatory contents.

[0073] It can be understood that determining the associated data corresponding to the historical data from the remaining data based on the similarity between the historical data and the remaining data can essentially be understood as determining whether there is an association between devices based on the similarity between the data received historically by different devices. Specifically, if the similarity between the data received historically by the first device and the data received historically by the second device is high, it can be considered that there is a relatively high correlation between the first device and the second device. For example, still taking the aforementioned home Internet of Things structure as an example, through comparison, it can be found that the historical temperature data received by the air conditioner and the historical humidity data received by the humidifier have a high similarity in the change trend. The rise in temperature is often accompanied by a decrease in humidity. At this time, it can be considered that there is a possibility of linkage between the air conditioner and the humidifier.

[0074] Of course, considering that there may be no linkage between the device and other devices, that is, the similarity between the historical data of the device and the historical data of other devices is low, therefore, here the first several data in the remaining data with a similarity higher than a preset threshold are usually used as associated data of the historical data.

[0075] Furthermore, considering that the computational complexity of comparing all historical data with the remaining data in the preset database is too high, the data can be pre-screened to filter out related devices that may be linked. Specifically, as an optional embodiment of the present application, a method for filtering data based on the physical model fields of each device in the Internet of Things platform is proposed. For specific implementation solutions, please refer to the subsequent Figure 5 and its explanatory contents.

[0076] Furthermore, considering that the data stored in the database represent different meanings, such as humidity, temperature, speed, etc., and the dimensions of these data may be quite different, it is often difficult to analyze and obtain a more accurate similarity by directly comparing these data with different dimensions. Therefore, the differences in dimensions and time of these data can be eliminated first. Specifically, as an optional embodiment of the present application, a method for preprocessing the data is proposed. For specific implementation schemes, please refer to the subsequent Figure 6 and its explanatory contents.

[0077] 204. Flow the flow data to an associated device corresponding to the associated data.

[0078] In the embodiment of the present application, the associated device corresponding to the associated data refers to the device determined based on the device identification information in the associated data. In combination with the above description, it can be seen that the higher the similarity between the associated data and the historical data, the more likely it is that there is linkage between the associated device corresponding to the associated data and the target device corresponding to the historical data. Therefore, in order to better achieve the linkage between the devices, the flow data transferred to the target device can be transferred to the associated device. For example, taking the home Internet of Things scenario provided above as an example, the initial data flow rule is to control the air conditioner through the temperature sensor and the humidifier through the humidity sensor. After determining that there is linkage between the two devices, the air conditioner and the humidifier, the humidifier can be controlled simultaneously based on the temperature, or the operating data of the air conditioner and the temperature sensor.

[0079] Furthermore, as an optional embodiment of the present application, after determining that there is linkage between the target device and the associated device, the flow rules of the associated device can be further optimized. Specifically, the flow rules between the target device and the associated device can be configured in the data flow device on the Internet of Things platform to replace the original flow rules of the associated device. For specific implementation solutions, please refer to the subsequent Figure 7 and its explanatory contents.

[0080] It should be noted that when configuring the flow rules between the target device and its associated devices, to avoid generating incorrect flow rules, the data flow device will also display relevant information about the target device and its associated devices on a preset page, so that the user can determine whether to configure the flow rules between the target device and its associated devices. In other words, the data flow method provided in this application recommends devices that may have a linkage relationship to the user based on the similarity between the data historically received by each device, thereby optimizing the flow rules within the IoT platform.

[0081] The data transfer method provided in the embodiments of the present application extracts historical data of the target device corresponding to the transferred data from a preset database during data transfer. The method then uses the similarity between the historical data and the remaining data to obtain associated data, thereby identifying associated devices that are associated with the target device or have a high degree of similarity. This method can then transfer the transferred data associated with the target device to the associated devices, thereby improving inter-device connectivity. Furthermore, it can further optimize the transfer rules within the IoT platform, avoiding the problem of increasing performance requirements for the IoT platform due to the expansion of the IoT scale.

[0082] like Figure 3 As shown, Figure 3 A flowchart of steps for determining associated data based on cosine similarity and trend similarity is provided in an embodiment of the present application, as detailed below.

[0083] In an embodiment of the present application, a solution is provided for determining related data from two dimensions: cosine similarity and change trend. Specifically, the solution includes steps 301 to 303:

[0084] 301 : Calculate the cosine similarity between the historical data and the remaining data in the preset database.

[0085] In the embodiment of the present application, combined with the above description, it can be seen that the historical data and the remaining data are data strings extracted according to the preset time period and sampling period, and these data strings are composed of a number of numerical values, that is, these data can be represented by a vector. Therefore, the cosine similarity that describes the similarity of vectors can be used to determine the similarity between the historical data and the remaining data. Furthermore, considering that the remaining data contains a number of reference data strings, calculating the cosine similarity between the historical data and the remaining data means calculating the similarity between the data string of the historical data and each reference data string in the remaining data.

[0086] Specifically, cosine similarity evaluates the similarity of two vectors by calculating the cosine value of the angle between them. The specific formula for calculating cosine similarity is not described in the embodiment of the present application. Among them, if the cosine similarity is 1, it indicates that the two vectors have exactly the same direction, and if the cosine similarity is -1, it indicates that the two vectors have completely opposite directions. Both cases indicate that the correlation between the two vectors is relatively high. Conversely, if the cosine similarity is 0, it indicates that the angle between the two vectors is 90°, which means that there is almost no correlation between the two vectors. In other words, the greater the absolute value of the cosine similarity, the greater the similarity between the data, and the smaller the absolute value of the cosine similarity, the smaller the similarity between the data.

[0087] In the embodiments of the present application, compared to other similarity calculation methods, such as determining the similarity between data using Euclidean distance, cosine similarity can focus more on the similarity of the data in the overall direction. Methods such as Euclidean distance focus more on the similarity of the data itself, and the similarity of the data in the overall direction can better reflect the linkage between devices. Therefore, the embodiments of the present application use cosine similarity to describe the similarity between historical data and remaining data.

[0088] 302 : Determine trend similarity between the historical data and the remaining data based on a change characteristic of each value in the historical data and a change characteristic of each value in the remaining data.

[0089] In the embodiments of the present application, in combination with the above-mentioned relevant explanations, it can be seen that both historical data and remaining data can be understood as a data string composed of several numerical values. Therefore, for each data string in the remaining data, the trend similarity between the historical data and the remaining data can be determined based on the change of each numerical value in the data string and the change of the numerical value in the data string of the historical data. Specifically, the change characteristics of each numerical value in the historical data and the remaining data can be determined by first-order difference, second-order difference, etc. For example, the most common is that since these data exist in the form of data strings, that is, sequences, the difference between adjacent numbers in the sequence can be calculated, or the size relationship of a number in the sequence relative to the previous number can be described by 0 and 1 to obtain a new data string, and the new data string can be understood as the change characteristics of each numerical value in the data. Of course, the method of determining the change characteristics is not limited to the above method. Any feature that can describe the change trend of each numerical value in the data can be regarded as a change characteristic, and the embodiments of the present application will not be repeated here.

[0090] In the embodiments of the present application, after obtaining the change characteristics of each value in the data, since the change characteristics also exist in the form of data strings, that is, they can also be regarded as vectors, the similarity between the change characteristics of each data can also be calculated based on the cosine similarity method, thereby obtaining the trend similarity between the historical data and the remaining data. Specifically, the higher the trend similarity, the more similar the change trends of the values ​​in the data are.

[0091] 303 : Determine associated data corresponding to the historical data from the remaining data according to the cosine similarity and the trend similarity.

[0092] In the embodiment of the present application, cosine similarity and trend similarity respectively describe the similarity between data from two different dimensions, and the data flow device will eventually comprehensively filter out related data based on the similarity of these two dimensions. Specifically, as a feasible embodiment of the present application, the cosine similarity and trend similarity can be weighted to obtain a comprehensive similarity, and then the related data can be determined from the remaining data based on the size relationship of the comprehensive similarity. Furthermore, in the process of weighting cosine similarity and trend similarity, it can be set based on the properties of the target device. For specific implementation solutions, please refer to the subsequent Figure 4 and its explanatory contents.

[0093] Of course, in addition to determining related data based on cosine similarity and trend similarity, related data can also be determined by integrating similarities calculated using other methods. It is understood that the more methods there are for calculating similarity, the better the related data ultimately screened out will be, but the corresponding amount of computation required for the data flow device will also be higher, and the efficiency of data flow will be lower. The embodiments of the present application do not limit other methods for calculating similarity.

[0094] In an embodiment of the present application, two dimensions are proposed, namely, trend similarity determined based on the change characteristics of the data and trend similarity describing the overall direction similarity of the data, to comprehensively screen out the associated data that is most similar to the historical data, thereby ensuring the possibility of linkage between the device corresponding to the screened associated data and the target device.

[0095] like Figure 4 As shown, Figure 4 A flowchart of the steps for determining associated data based on object model fields provided in an embodiment of the present application is described in detail as follows.

[0096] In the embodiment of the present application, a method is proposed to set weights based on the object model field of the target device, thereby weighting the cosine similarity and trend similarity to determine the implementation method of associated data. Specifically, the method includes steps 401 to 403:

[0097] 401 : Set the weights of the cosine similarity and the trend similarity according to the object model field of the target device.

[0098] In the embodiment of the present application, the object model field of the target device can be understood as a digital representation that describes what the target device is, what it can do, and what information it can provide to the outside world from the three dimensions of attributes, services, and events in the Internet of Things platform. It can also be understood as the definition of the target device in the Internet of Things platform. Specifically, attributes are used to describe the specific information and status of the device during operation, and services describe the instructions or methods that the device can call externally. Input and output parameters can be set in the service call. Input parameters are parameters when the service is executed, output parameters are the results after the service is executed, and events describe the information that the device needs to report to the server during operation, that is, the information of the data flow device, which generally contains information that needs to be perceived and processed externally. In other words, the object model field of the target device in the Internet of Things platform can fully describe the properties of the target device in the physical space. Specifically, to facilitate understanding of the object model field, taking the object model field of a forklift as an example, it mainly includes the following fields: model identifier, device identifier (ID), power on / off state (Power_State), longitude (Longitude), latitude (Latitude), speed (Speed), mileage (Distance), remaining power (Batt_SoC), battery voltage (Batt_Volt), etc.

[0099] In an embodiment of the present application, after obtaining the object model field of the target device, the data flow device will set the weights of cosine similarity and trend similarity based on the object model field. Specifically, for target devices that rely on the data itself for control, for example, for devices that are controlled by determining whether the received data meets certain requirements, such as whether it is greater than a certain value or whether it is within a certain interval, the cosine similarity between the device's historical data and other data will be given more consideration, that is, the weight of cosine similarity will be set higher. On the other hand, for devices that determine whether the change in the received data meets certain requirements, such as whether the rate of decline is greater than a certain value, the trend similarity between the device's historical data and other data will be given more consideration, and the weight of trend similarity will be set higher. Specifically, the weights of cosine similarity and trend similarity can be stored in a preset data table in association with the object model field, so that the data flow device can directly query the preset data table based on the object model field of the target device to obtain the corresponding cosine similarity and trend similarity weights.

[0100] 402 : Weight the cosine similarity and the trend similarity according to the weight to obtain a comprehensive similarity between the historical data and the remaining data.

[0101] In an embodiment of the present application, after setting the weights of cosine similarity and trend similarity based on the object model field of the target device, the data flow device will weight the cosine similarity and trend similarity based on the set weights to obtain a comprehensive similarity, and the comprehensive similarity takes into account the properties of the target device itself, so that the associated data can be better determined subsequently.

[0102] 403 : Determine associated data corresponding to the historical data from the remaining data based on the magnitude relationship of the comprehensive similarities.

[0103] In the embodiment of the present application, after obtaining the comprehensive similarity between the historical data and other data, the higher the comprehensive similarity, the more likely it is that there is a linkage between the devices corresponding to the two sets of data. Therefore, the data with the highest comprehensive similarity among the remaining data can be determined as the associated data corresponding to the historical data. Of course, considering that there may not be any linkage between the device and other devices, the associated data set here needs to have a comprehensive similarity with the historical data greater than a set threshold. In other words, only when the comprehensive similarity is high enough will it be considered that there is an associated device associated with the target device.

[0104] like Figure 5 As shown, Figure 5 A flowchart of the steps for pre-screening the remaining data to determine the associated data provided in an embodiment of the present application is described in detail as follows.

[0105] In an embodiment of the present application, a technical solution for pre-screening based on the similarity between object model fields of IoT platform devices is provided, specifically, including steps 501 to 503:

[0106] 501. Determine candidate devices associated with the target device based on similarities between object model fields of various devices on the Internet of Things platform.

[0107] In this embodiment of the present application, the object model field of each device in the IoT platform describes the properties of the target device in the physical space. This embodiment of the present application does not repeat the explanation of the object model field here. For the definition of the object model field, please refer to step 401 and its explanation.

[0108] In the embodiment of the present application, since the object model field can be understood as a description of the digital form of the device, the similarity between the device properties can be analyzed based on the similarity between the object model fields of each device on the Internet of Things platform. Figure 1In the implementation scenario provided, each device in the IoT platform here refers to all devices 100 connected to the IoT platform. Of course, considering that the embodiment of the present application is to determine the associated devices that may have a linkage relationship with the target device, the main thing here is to calculate the similarity between the object model field of the target device and the object model field of other devices. Specifically, devices whose object model field has a high similarity with the object model field of the target device can be used as candidate devices associated with the target device. Taking into account that under normal circumstances, there may be multiple candidate devices screened out, therefore, devices whose object model field has a similarity with the object model field of the target device that is higher than a preset threshold can be used as candidate devices, so that the similarity between the object model field and the object model field of the target device can be further used to screen out the associated devices that are most likely to be linked to the target device.

[0109] Furthermore, in the embodiment of the present application, considering that the definition rules of the object model fields of different devices are the same under the same Internet of Things platform, the similarity between the object model fields can be determined by counting the proportion of the same object model fields contained in the two object models. The embodiment of the present application will not be repeated here.

[0110] Furthermore, in addition to screening out candidate devices that may be associated with the target device through the object model field during the data flow process, so as to facilitate subsequent pre-screening of the corresponding candidate data from the remaining data, the embodiment of the present application proposes to determine the candidate devices associated with the target device based on the similarity between the object model fields of each device on the Internet of Things platform. It can also be used when a new device is first connected to the Internet of Things platform. Based on the similarity between the object model field of the new device and the object model field of other devices, the device that may be associated with the new device is screened from the Internet of Things platform, and the data flow rules configured for these devices are recommended to the user, so as to facilitate the user to configure the flow rules for the newly connected device.

[0111] 502. Extract candidate data corresponding to the candidate device from the preset database.

[0112] In this embodiment of the present application, after candidate devices are identified, data flow rules are applied based on a pre-set database. The device identification information of the remaining data is used to extract the candidate data corresponding to each candidate device. This extracts a portion of the remaining data for subsequent similarity calculations. Specifically, the method for extracting candidate data is also based on the same time period and sampling period, and this implementation will not be further described here.

[0113] 503 : Determine associated data corresponding to the historical data from the candidate data based on the similarity between the historical data and the candidate data.

[0114] Compared to Figure 2The technical solution provided in the embodiment of the present application is to determine the associated data corresponding to the historical data from the candidate data by comparing the similarity between the historical data and the candidate data. Figure 3 、 Figure 4 The provided solution is similar, that is, by using the cosine similarity and trend similarity between the historical data and the candidate data, and setting the corresponding weights using the object model field of the target device, and weighting the cosine similarity and trend similarity to determine the associated data. The embodiments of this application will not be repeated here.

[0115] In an embodiment of the present application, by pre-screening the data in the database using the object model fields between the devices in the Internet of Things platform, the data of devices that are more likely to interact with the target device are screened out, which can effectively reduce the amount of calculation required to determine the associated data through subsequent similarity comparison, thereby further improving the efficiency of data flow in the embodiment of the present application.

[0116] like Figure 6 As shown, Figure 6 A flowchart of the steps of preprocessing data to determine related data provided in an embodiment of the present application is described in detail as follows.

[0117] In an embodiment of the present application, a solution is provided for preprocessing data to eliminate differences in data dimensions and time, thereby facilitating better calculation of similarity. Specifically, the solution includes steps 601 to 603:

[0118] 601 , according to the timestamp corresponding to each value in the historical data and the timestamp corresponding to each value in the remaining data in the preset database, align the historical data with the remaining data to obtain aligned historical data and remaining data.

[0119] In the embodiment of the present application, combined with the above description, it can be seen that the historical data and the remaining data can be understood as a data string composed of several numerical values, and each data in the data string is associated with time based on a timestamp. In order to eliminate the temporal differences of the data, the time of each data can be aligned according to the timestamp corresponding to each numerical value, that is, to ensure that the data at the same position in the sequence is extracted at the same time, thereby facilitating better subsequent calculation of similarity.

[0120] 602 , normalize the aligned historical data and the remaining data respectively to obtain normalized historical data and the remaining data.

[0121] In the embodiment of the present application, after aligning the data in the database, the dimensional influence of each data will be further eliminated. Specifically, eliminating the dimensional influence of the data can be understood as eliminating the unit difference of the data in the database. For example, for temperature data, its numerical value range is usually between 0 and 30 degrees, and for humidity data, its numerical value range is usually 40% to 80%. For other data, the difference in the numerical value range may be greater. Therefore, the historical data and the remaining data can be normalized, and the numerical values ​​in each string can be mapped to the same dimension, that is, between [0,1], so that the normalized data no longer carries information related to its own attributes. The specific normalization method is not specifically described in the embodiment of the present application.

[0122] 603 : Determine associated data corresponding to the historical data from the remaining data based on the similarity between the normalized historical data and the remaining data.

[0123] In an embodiment of the present application, after the data is time-aligned and normalized, the similarity between the normalized historical data and the remaining data can be further utilized to more accurately determine the associated data corresponding to the historical data from the remaining data.

[0124] Of course, it should be noted that the above solution can also be used with Figure 5 The provided solution is integrated, that is, after obtaining the historical data and candidate data, the historical data and candidate data are time-aligned and normalized, so as to facilitate the subsequent calculation of cosine similarity and trend similarity based on the time-aligned and normalized historical data and candidate data. The embodiments of this application will not be repeated here.

[0125] In the embodiment of the present application, by performing time alignment and normalization processing on the data, the dimensional and temporal differences between different data in the database can be effectively eliminated, thereby avoiding the problem of inaccurate similarity calculation results caused by dimensional and temporal differences.

[0126] like Figure 7 As shown, Figure 7 A flowchart of the steps of another data flow method provided in an embodiment of the present application is detailed as follows.

[0127] In an embodiment of the present application, a technical solution is proposed for further configuring data flow rules after determining the associated devices of the target device. Specifically, the solution includes steps 701 to 705:

[0128] 701. Obtain the flow data in the Internet of Things platform and the target device corresponding to the flow data.

[0129] In the embodiment of the present application, the description of the flow data and the target device can refer to the aforementioned step 201 and its explanation, and the embodiment of the present application will not be repeated here.

[0130] 702. Extract historical data corresponding to the target device from a preset database of the Internet of Things platform.

[0131] In the embodiment of the present application, regarding extracting historical data corresponding to the target device from the preset database, reference can also be made to the aforementioned step 202 and its explanation, which will not be repeated here in the embodiment of the present application.

[0132] 703 : Determine associated data corresponding to the historical data from the remaining data based on similarity between the historical data and the remaining data in the preset database.

[0133] In the embodiment of the present application, the implementation scheme for determining the associated data based on the similarity between the data can refer to the aforementioned step 203 and its explanation, which will not be repeated here in the embodiment of the present application.

[0134] 704 , transferring the flow data to an associated device corresponding to the associated data.

[0135] In the embodiment of the present application, the implementation scheme for transferring the flow data to the associated device corresponding to the associated data can refer to the aforementioned step 204 and its explanation, and the embodiment of the present application will not be repeated here.

[0136] 705 : Replace the initial transfer rule corresponding to the associated device in the IoT platform with the transfer rule between the target device and the associated device.

[0137] In an embodiment of the present application, the initial flow rules of the associated devices are replaced with the flow rules between the target device and the associated devices, and then the target device can be used to control the associated devices, thereby simplifying the flow rules configured in the Internet of Things platform. For example, taking the aforementioned home Internet of Things scenario as an example, after determining that there is a linkage between the two devices, the air conditioner and the humidifier, the operation of the air conditioner can be controlled based on the temperature sensor, and then the humidifier can be further controlled based on the operation of the air conditioner. In this way, the humidity data collected by the humidity sensor can be released. Especially in the industrial Internet of Things, when the number of connected devices and sensors is large, the above method can effectively simplify the flow rules configured in the data flow device, thereby effectively reducing the management cost of the Internet of Things platform. In addition, the linkage between devices can make the effectiveness of the device reach seconds or even shorter.

[0138] In order to more clearly understand the complete implementation process of the data flow method provided in the embodiment of the present application, the following will be combined with the above Figures 1 to 7The content provides a complete implementation process of a data flow method, which is detailed as follows.

[0139] (1) When a new device is connected to the IoT platform, the flow rules for similar devices are recommended based on the object model fields of the new device, so that the user can select the target flow rule from the recommended flow rules, or manually configure the flow rules for the newly connected device;

[0140] (2) If you choose to manually configure the flow rules for the newly connected device, after the IoT platform runs for a period of time according to the configured flow rules, the data flow device in the IoT platform will extract the data received by the new device in the recent period as historical data;

[0141] (3) The data transfer device will screen out devices with similarity higher than a preset threshold as candidate devices based on the similarity between the object model fields of other devices and the object model fields of the new device, and extract the data received by these candidate devices in the recent period from the database as candidate data;

[0142] (4) Performing time alignment and normalization on the historical data and candidate data to eliminate the differences in the time and dimension of the data, thereby obtaining the preprocessed historical data and candidate data;

[0143] (5) Calculate the cosine similarity between historical data and candidate data, and determine the trend similarity based on the change characteristics of the values ​​in the historical data and candidate data;

[0144] (6) Based on the object model field of the IoT platform, the weights of cosine similarity and trend similarity are set, and the cosine similarity and trend similarity are weighted to obtain the comprehensive similarity;

[0145] (7) Based on the magnitude relationship between the comprehensive similarity between the historical data and each candidate data, the previous one or more candidate data with a higher comprehensive similarity and higher than a preset similarity threshold are used as the associated data corresponding to the historical data, thereby completing the determination of the device similarity. At this time, the device corresponding to the associated data can be understood as an associated device that may be linked with the target device, that is, the newly connected device;

[0146] (8) The data transfer device displays the target device and the determined associated devices so that the user can determine whether the target device has a potential linkage relationship with the displayed associated devices, and configures the flow rules between the devices based on the device selected by the user, and re-updates the data flow rules of the access device;

[0147] (9) Complete the data flow based on the updated data flow rules.

[0148] In order to better implement the data transfer method in the embodiment of the present application, based on the data transfer method, the embodiment of the present application also provides a data transfer device. Figure 8 As shown, Figure 8 : This is a structural diagram of a data transfer device provided in an embodiment of the present application. Specifically, the data transfer device is set in the Internet of Things platform and includes:

[0149] An acquisition module 801 is configured to acquire the flow data in the IoT platform and the target device corresponding to the flow data;

[0150] An extraction module 802 is configured to extract historical data corresponding to the target device from a preset database of the Internet of Things platform;

[0151] A comparison module 803 is configured to determine, from the remaining data, associated data corresponding to the historical data based on similarities between the historical data and the remaining data in the preset database;

[0152] The transfer module 804 is configured to transfer the transfer data to an associated device corresponding to the associated data.

[0153] In some embodiments of the present application, the comparison module includes:

[0154] A cosine similarity calculation submodule, configured to calculate the cosine similarity between the historical data and the remaining data in the preset database;

[0155] a trend similarity calculation submodule, configured to determine the trend similarity between the historical data and the remaining data based on the variation characteristics of each value in the historical data and the variation characteristics of each value in the remaining data;

[0156] The first associated data determination submodule is configured to determine, from the remaining data, associated data corresponding to the historical data based on the cosine similarity and the trend similarity.

[0157] In some embodiments of the present application, the associated data determination submodule includes:

[0158] a weight setting unit, configured to set weights of the cosine similarity and the trend similarity according to a physical model field of the target device;

[0159] a weighting unit, configured to weight the cosine similarity and the trend similarity according to the weight to obtain a comprehensive similarity between the historical data and the remaining data;

[0160] The associated data determining unit is configured to determine the associated data corresponding to the historical data from the remaining data according to the magnitude relationship of the comprehensive similarities.

[0161] In some embodiments of the present application, the comparison module includes:

[0162] A screening module, configured to determine candidate devices associated with the target device based on similarities between object model fields of various devices on the IoT platform;

[0163] An extraction submodule, configured to extract candidate data corresponding to the candidate device from the preset database;

[0164] The second associated data determination submodule is configured to determine associated data corresponding to the historical data from the candidate data according to the similarity between the historical data and the candidate data.

[0165] In some embodiments of the present application, the comparison module includes:

[0166] an alignment submodule, configured to time-align the historical data with the remaining data based on the timestamps corresponding to the values ​​in the historical data and the timestamps corresponding to the values ​​in the remaining data in the preset database, to obtain aligned historical data and remaining data;

[0167] The normalization submodule is used to normalize the aligned historical data and the remaining data respectively to obtain normalized historical data and remaining data;

[0168] The third associated data determination submodule is configured to determine associated data corresponding to the historical data from the remaining data according to the similarity between the normalized historical data and the remaining data.

[0169] In some embodiments of the present application, the data transfer device further includes:

[0170] A replacement module is used to replace the initial flow rules corresponding to the associated device in the Internet of Things platform with the flow rules between the target device and the associated device

[0171] The present application also provides a data transfer device, such as Figure 9 As shown, Figure 9 A schematic diagram of the structure of a data flow device provided in an embodiment of the present application.

[0172] The data flow device includes a memory, a processor, and a data flow program stored in the memory and runnable on the processor. When the processor executes the data flow program, the steps in the data flow method provided in any embodiment of the present application are implemented.

[0173] Specifically, the data transfer device may include one or more processing core processors 901, one or more storage media memories 902, a power supply 903, an input unit 904 and other components. Those skilled in the art will understand that Figure 9 The data transfer device structure shown in the figure does not constitute a limitation on the data transfer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0174] The processor 901 is the control center of the data flow device. It uses various interfaces and lines to connect the various parts of the entire data flow device. By running or executing software programs and / or modules stored in the memory 902 and calling data stored in the memory 902, it performs various functions of the data flow device and processes data, thereby monitoring the data flow device as a whole. Optionally, the processor 901 may include one or more processing cores; preferably, the processor 901 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 901.

[0175] The memory 902 can be used to store software programs and modules. The processor 901 executes various functional applications and data processing by running the software programs and modules stored in the memory 902. The memory 902 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created based on the use of a data flow device, etc. In addition, the memory 902 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 902 may also include a memory controller to provide the processor 901 with access to the memory 902.

[0176] The data transfer device also includes a power supply 903 for supplying power to various components. Preferably, the power supply 903 can be logically connected to the processor 901 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 903 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.

[0177] The data flow device may further include an input unit 904, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0178] Although not shown, the data flow device may further include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 901 in the data flow device will load the executable files corresponding to the processes of one or more application programs into the memory 902 according to the following instructions, and the processor 901 will run the application programs stored in the memory 902, thereby implementing the steps of the data flow method provided in any embodiment of the present application.

[0179] To this end, embodiments of the present application provide a computer-readable storage medium, which may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. A data transfer program is stored on the computer-readable storage medium, and when executed by a processor, the data transfer program implements the steps of the data transfer method provided in any embodiment of the present application.

[0180] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above and will not be repeated here.

[0181] In specific implementation, the above units or structures can be implemented as independent entities, or can be arbitrarily combined to implement as the same or several entities. The specific implementation of the above units or structures can refer to the previous method embodiments and will not be repeated here.

[0182] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0183] The above is a detailed introduction to a data flow method provided in an embodiment of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A data transfer method, characterized in that: Applied to IoT platforms; The method comprises: Acquire the flow data in the Internet of Things platform and the target device corresponding to the flow data; Extracting historical data corresponding to the target device from a preset database of the Internet of Things platform; Determining associated data corresponding to the historical data from the remaining data based on similarity between the historical data and the remaining data in the preset database; The flow data is transferred to an associated device corresponding to the associated data.

2. The data transfer method according to claim 1, wherein: The determining, from the remaining data according to the similarity between the historical data and the remaining data in the preset database, the associated data corresponding to the historical data includes: Calculating the cosine similarity between the historical data and the remaining data in the preset database; determining trend similarity between the historical data and the remaining data based on a change characteristic of each value in the historical data and a change characteristic of each value in the remaining data; Determine associated data corresponding to the historical data from the remaining data according to the cosine similarity and the trend similarity.

3. The data transfer method according to claim 2, wherein: The determining, from the remaining data according to the cosine similarity and the trend similarity, associated data corresponding to the historical data includes: Setting weights of the cosine similarity and the trend similarity according to the object model field of the target device; weighting the cosine similarity and the trend similarity according to the weight to obtain a comprehensive similarity between the historical data and the remaining data; According to the magnitude relationship of the comprehensive similarities, associated data corresponding to the historical data is determined from the remaining data.

4. The data transfer method according to claim 1, wherein: The determining, from the remaining data according to the similarity between the historical data and the remaining data in the preset database, the associated data corresponding to the historical data includes: Determining candidate devices associated with the target device based on similarities between object model fields of various devices on the IoT platform; Extracting candidate data corresponding to the candidate device from the preset database; According to the similarity between the historical data and the candidate data, associated data corresponding to the historical data is determined from the candidate data.

5. The data transfer method according to claim 1, wherein: The determining, from the remaining data according to the similarity between the historical data and the remaining data in the preset database, the associated data corresponding to the historical data includes: According to the timestamp corresponding to each value in the historical data and the timestamp corresponding to each value in the remaining data in the preset database, the historical data and the remaining data are time-aligned to obtain aligned historical data and remaining data; Normalizing the aligned historical data and the remaining data respectively to obtain normalized historical data and the remaining data; According to the similarity between the normalized historical data and the remaining data, the associated data corresponding to the historical data is determined from the remaining data.

6. The data transfer method according to claim 1, wherein: The extracting the historical data corresponding to the target device from the preset database of the Internet of Things platform includes: According to a preset time period and sampling period, historical data corresponding to the target device is extracted from the time series database of the Internet of Things platform.

7. The data transfer method according to any one of claims 1 to 6, characterized in that: After transferring the flow data to the associated device corresponding to the associated data, the method further includes: The initial flow rule corresponding to the associated device in the Internet of Things platform is replaced with the flow rule between the target device and the associated device.

8. A data transfer device, characterized in that: Set up in the Internet of Things platform; The device comprises: An acquisition module, configured to acquire the flow data in the IoT platform and the target device corresponding to the flow data; An extraction module, configured to extract historical data corresponding to the target device from a preset database of the Internet of Things platform; a comparison module, configured to determine, from the remaining data, associated data corresponding to the historical data based on similarities between the historical data and the remaining data in the preset database; The transfer module is used to transfer the transfer data to the associated device corresponding to the associated data.

9. A data transfer device, characterized in that: The data flow device includes a processor, a memory, and a data flow program stored in the memory and runnable on the processor. The processor executes the data flow program to implement the steps in the data flow method described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that A data flow program is stored on the computer-readable storage medium, and the data flow program is executed by a processor to implement the steps in the data flow method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Smart home control method and system based on Internet of Things

    CN113485144A

  • Terminal control method and device based on Internet of Things rule engine, equipment and medium

    CN113918361A