A data forwarding method, apparatus and system

By utilizing pre-stored configuration information and mapping relationships through edge devices, efficient data interaction between different devices is achieved, solving the problems of low efficiency in device driver development and heavy burden on target devices, thereby improving data access efficiency and reducing costs.

CN116192884BActive Publication Date: 2025-12-23BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211562706.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-07
Publication Date
2025-12-23
Estimated Expiration
2042-12-07

AI Technical Summary

Technical Problem

In IoT scenarios, data interaction between different devices requires the development of device drivers for each device due to different communication protocols and data formats. This is inefficient and costly, and the target device needs to convert the data itself, which increases the burden.

Method used

By pre-storing the configuration information and mapping relationships of data acquisition points, edge devices collect data and map it into object model data that can be recognized by the target device, reducing the need for device-driven development and data conversion of the target device.

Benefits of technology

It improves the efficiency of data access between different devices and reduces the load on target devices and the cost of data conversion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116192884B_ABST
    Figure CN116192884B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data forwarding method, device and system, relates to the technical field of data processing, and particularly relates to the technical field of Internet of Things, edge computing and the like. According to pre-stored configuration information of data collection points, data of a to-be-collected device is collected to obtain collection data of each data collection point, and the configuration information of each data collection point is set in advance according to a communication protocol used by the to-be-collected device; according to a pre-stored mapping relationship between the data collection points and each physical model point, the collection data of each data collection point is mapped to each physical model point to obtain physical model data of each physical model point, and the mapping relationship is set in advance according to a data structure recognizable by a target device; and the physical model data is forwarded to the target device. Therefore, the data access efficiency between different devices is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of data processing, and in particular to the fields of Internet of Things technology, edge computing, etc. BACKGROUND

[0002] In an Internet of Things scenario, data interaction between different devices is often required, and data of one device often needs to be forwarded to another device. SUMMARY

[0003] The present disclosure provides a data forwarding method, device and system, equipment and a storage medium.

[0004] According to a first aspect of the present disclosure, a data forwarding method is provided, the method comprising:

[0005] According to pre-stored configuration information of data collection points, collecting data of the device to be collected to obtain collection data of each data collection point, the configuration information of each data collection point being set in advance according to a communication protocol used by the device to be collected;

[0006] According to a pre-stored mapping relationship between each data collection point and each object model point, mapping the collection data of each data collection point to each object model point to obtain object model data of each object model point, the mapping relationship being set in advance according to a data structure recognizable by the target device;

[0007] Forwarding the object model data to the target device.

[0008] According to a second aspect of the present disclosure, a data receiving method is provided, the method being applied to a target device and comprising:

[0009] Receiving object model data, wherein the object model data is obtained by mapping collection data of each data collection point to each object model point according to a pre-stored mapping relationship between each data collection point and each object model point, the collection data being obtained by collecting data of the device to be collected according to pre-stored configuration information of the data collection points, the configuration information of each data collection point being set in advance according to a communication protocol used by the device to be collected, and the mapping relationship being set in advance according to a data structure recognizable by the target device.

[0010] According to a third aspect of the present disclosure, a data forwarding device is provided, the device comprising:

[0011] The collection module is configured to collect data of the to-be-collected device according to pre-stored configuration information of the data collection points, to obtain collection data of each data collection point, and the configuration information of each data collection point is set in advance according to a communication protocol used by the to-be-collected device.

[0012] The mapping module is configured to map the collection data of each data collection point to each object model point according to a pre-stored mapping relationship between the data collection points and the object model points, to obtain object model data of each object model point, and the mapping relationship is set in advance according to a data structure recognizable by the target device.

[0013] The forwarding module is configured to forward the object model data to the target device.

[0014] According to a fourth aspect of the present disclosure, a data receiving device is provided, which is applied to a target device and includes:

[0015] The receiving module is configured to receive object model data, wherein the object model data is obtained by mapping collection data of each data collection point to each object model point according to a pre-stored mapping relationship between the data collection points and the object model points, the collection data is obtained by collecting data of a to-be-collected device according to pre-stored configuration information of the data collection points, the configuration information of each data collection point is set in advance according to a communication protocol used by the to-be-collected device, and the mapping relationship is set in advance according to a data structure recognizable by the target device.

[0016] According to a fifth aspect of the present disclosure, a data forwarding system is provided, which includes a to-be-collected device, an edge device, and a target device.

[0017] The to-be-collected device is configured to provide collection data to the edge device.

[0018] The edge device is configured to collect data of the to-be-collected device according to pre-stored configuration information of data collection points, to obtain collection data of each data collection point, and the configuration information of each data collection point is set in advance according to a communication protocol used by the to-be-collected device; map the collection data of each data collection point to each object model point according to a pre-stored mapping relationship between the data collection points and the object model points, to obtain object model data of each object model point, and the mapping relationship is set in advance according to a data structure recognizable by the target device; and forward the object model data to the target device.

[0019] The target device is configured to receive object model data sent by the edge device.

[0020] According to a sixth aspect of the present disclosure, an electronic device is provided, comprising:

[0021] at least one processor; and

[0022] a memory connected with the at least one processor in communication; wherein

[0023] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of the first aspect and the second aspect.

[0024] According to a seventh aspect of the present disclosure, a non-transitory computer readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to perform the method of any one of the first aspect and the second aspect.

[0025] According to an eighth aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method of any one of the first aspect and the second aspect.

[0026] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0027] The accompanying drawings are used to better understand the present scheme, and do not constitute a limitation on the present disclosure. Among them:

[0028] Figure 1a is a flowchart of a data forwarding method in related technologies according to an embodiment of the present disclosure;

[0029] Figure 1b is a flowchart of a data forwarding method according to an embodiment of the present disclosure;

[0030] Figure 2 is an encoding diagram of an access template according to an embodiment of the present disclosure;

[0031] Figure 3 is another encoding diagram of an access template according to an embodiment of the present disclosure;

[0032] Figure 4a is a flowchart of a thing model data forwarding method according to an embodiment of the present disclosure;

[0033] Figure 4b is a cleaning diagram of thing model data according to an embodiment of the present disclosure;

[0034] Figure 4c is a flowchart of another forwarding method of object model data according to an embodiment of the present disclosure;

[0035] Figure 4d is a schematic diagram of another cleaning of object model data according to an embodiment of the present disclosure;

[0036] Figure 5a is a flowchart of a computing method of computing data according to an embodiment of the present disclosure;

[0037] Figure 5b is a coding schematic diagram of an object model according to an embodiment of the present disclosure;

[0038] Figure 6a is a visualization diagram of a target ASTNode structure tree according to an embodiment of the present disclosure;

[0039] Figure 6b is a visualization diagram of a target ASTNode structure tree according to an embodiment of the present disclosure; Figure 6a is a visualization diagram of a target ASTNode structure tree according to an embodiment of the present disclosure;

[0040] Figure 7 is a flowchart of a computing method of computing data based on a target ASTNode structure tree according to an embodiment of the present disclosure;

[0041] Figure 8 is a system structure diagram of a data forwarding system according to an embodiment of the present disclosure;

[0042] Figure 9 is a structure schematic diagram of a data forwarding apparatus according to an embodiment of the present disclosure;

[0043] Figure 10 is a block diagram of an electronic device for implementing the data forwarding method according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0044] Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which include various details of the embodiments of the present disclosure to assist in understanding, which should be considered in a descriptive sense only and not limiting. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Also, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0045] When data is exchanged between different devices, because the communication protocols, data formats, etc. of different devices are different, the data collected by different devices cannot be directly used. In related technologies, for example, when a first device collects data from a second device, the first device needs to know the data format of the second device, and then the first device can collect the data of the second device according to the data format of the second device.Figure 1a As shown, usually different device drivers are developed for different devices to collect data of the devices and send the collected data to the target device for conversion and use, which needs to develop corresponding device drivers for different devices, is low in efficiency and high in cost, and needs the target device to complete the conversion of the data before using the data, so that the target device needs to use different data conversion rules to convert data according to different data sources, thereby causing great pressure on the target device. Based on this, the present disclosure provides a data forwarding method, as shown in Figure 1b The method comprises the following steps.

[0046] In S101, the data of the to-be-collected device is collected according to the pre-stored configuration information of the data collection point, and the collection data of each data collection point is obtained.

[0047] In S102, the collection data of each data collection point is mapped to each object model point according to the pre-stored mapping relationship between the data collection point and each object model point, and the object model data of each object model point is obtained.

[0048] In S103, the object model data is forwarded to the target device.

[0049] According to the embodiment, the data of the to-be-collected device with different communication protocols can be collected according to the pre-stored configuration information of the data collection point, and the collection data is obtained. According to the pre-stored mapping relationship between the data collection point and each object model point, each collection data is mapped to the object model data that can be recognized and processed by the target device. The data collection and data conversion are integrated, the data of different to-be-collected devices can be collected efficiently according to the already set configuration information, and the collection data can be converted to the object model data according to the already set mapping relationship for different target devices. Therefore, it is not necessary to develop corresponding device drivers for different to-be-collected devices, and the to-be-collected device does not need to convert the collection device to the object model data by itself, thereby improving the data access efficiency between different devices.

[0050] The execution subject of the data forwarding method provided by the embodiment of the present disclosure can be an electronic device other than the target device and establishing a communication connection with the to-be-collected device and the target device, such as an edge device or a management device for managing the to-be-collected device. For the convenience of description, the subsequent embodiments of the present disclosure take the edge device as an example of the execution subject for corresponding description. The edge device is a device other than the to-be-collected device and the target device, which is specially used for collecting the data of the to-be-collected device and forwarding the collected data to the target device to realize the data access between the to-be-collected device and the target device. The data collection point is the point of the data that needs to be collected by the to-be-collected device. In one data collection process of the edge device, one data collection point corresponds to one collection data collected by the edge device.

[0051] The configuration information of each data collection point is set in advance according to a communication protocol used by the to-be-collected device.

[0052] The configuration information of the data collection point can include a start bit (start) and an offset bit (offset) corresponding to the collected data. It can be understood that the data length corresponding to the same collected data can be different under different communication protocols because the data formats defined by different communication protocols are different. Therefore, for the same collected data, the start bit and the offset bit can be different according to different communication protocols. As an example, if the start bit corresponding to a collected data is 1 and the offset bit is 1, it indicates that the length of the collected data is 1, and the configuration information can be represented as: visitor:'{'start': 1, 'offset': 1} '. The edge device can pre-acquire the communication protocol of each to-be-collected device, parse the communication protocol, and correspondingly configure the configuration information of each data collection point.

[0053] As an example, the edge device can pre-set multiple access templates, different access templates corresponding to different types of devices. The access template can be used to guide the edge device how to collect data. The configuration information of each data collection point can be pre-written in the access template, so that the edge device collects the data of the to-be-collected device according to the configuration information of the access template. It can be understood that the access template can be adjusted accordingly according to different to-be-collected devices, for example, if the communication protocol used by the to-be-collected device at this time is different from that used by the historical to-be-collected device, the communication protocol of the to-be-collected device at this time can be acquired, and only the configuration information of the data collection point of the screenshot template needs to be adjusted according to the communication protocol.

[0054] As described above, after collecting the data of the to-be-collected device according to the configuration information, the data needs to be converted subsequently, that is, the data needs to be processed and used subsequently. Based on this, in order to facilitate the use of the collected data, in a possible embodiment, the present disclosure also provides a data collection method, which comprises:

[0055] S1011, collecting data of a to-be-collected device according to pre-stored configuration information of a data collection point, to obtain intermediate data.

[0056] S1012, setting the intermediate data according to pre-stored attribute information of each data collection point, to obtain collected data.

[0057] In S1011, this step is similar to S101, except that the intermediate data is collected according to the configuration information in this step. For details, please refer to the related description of S101, which will not be repeated here.

[0058] In S1012, the attribute information can include settings for each attribute of the intermediate data, for example, including the name of the data collection point where the intermediate data is located, the serial number of the data collection point where the intermediate data is located, the data type of the data collection point where the intermediate data is located, the read-write attribute of the data collection point where the intermediate data is located, and the like. The edge device can pre-store these attribute information, and subsequently set the intermediate data according to the pre-stored attribute information after collecting the intermediate data, to obtain the collection data for subsequent use of the collection data. For example, the serial number of the data collection point in the attribute information is set for the intermediate data to obtain the collection data, so that the collection data can be mapped to the physical model data according to the serial number, or the data type information of the data collection point in the attribute information is set for the intermediate data to obtain the collection data, which conforms to the data type of the physical model corresponding to the target device, and the like.

[0059] It can be seen that by using the embodiment, the intermediate data is set by the attribute information, so that the obtained collection data is more convenient for the subsequent mapping process, and the data forwarding efficiency is improved.

[0060] As an example, the above attribute information can also be pre-written into an access template, as shown in the form of Figure 2 The name of the access template is access-template, properties is used to define the configuration of the data collection point, and the object array is below. In the diagram, the name of the data collection point is switch, the serial number of the data collection point is 1, the data type of the data collection point is bool, the read-write attribute of the data collection point is rw, and the configuration information of the data collection point is {‘’start”:1,”offset”:1}. Based on the access template, the edge device can accurately and efficiently collect the related data of the device to be collected.

[0061] In S102, the mapping relationship is set according to the data structure that can be recognized by the target device.

[0062] It can be understood that the physical model data is used for the data to be sent to the target device, and therefore, the mapping relationship from the data collection point to the physical model point is also set according to the target device. Specifically, according to the data structure of the target device, the physical model data obtained by mapping the collection data can be recognized and used by the target device.

[0063] Specifically, the present disclosure provides a data mapping method, the method comprising:

[0064] S1021, calculate the collection data according to a mapping formula in the mapping relationship between the pre-stored data collection point and the attribute of the object model, to obtain calculation data.

[0065] S1022, map the calculation data to the object model data corresponding to the target device according to the attribute of the object model corresponding to the target device in the mapping relationship.

[0066] In S1021, the mapping relationship between the pre-stored data collection point and the attribute of the object model of the edge device can include a mapping formula. It can be understood that some data collected from the device to be collected needs to be processed and calculated before it can be used by the target device. For example, the target device needs to obtain the detected Celsius temperature of the device to be collected, but the temperature collected by the device to be collected is in Fahrenheit. Therefore, when mapping the collection data of the collection point to the object model data of the object model point of the target device, the collection data of the collection point needs to be calculated according to the mapping formula of converting Fahrenheit to Celsius. As an example, the mapping formula can be directly stored in the edge device in the form of a mathematical formula, for example, the mapping formula can be: x1+2*2, where x1 and x2 both correspond to collection data, and the labels 1 and 2 can correspond to the serial numbers of the data collection points of the collection data. As another example, the mapping formula can also refer to the processing method of the collection data, such as rounding the collection data, or taking the absolute value of the collection data, etc., and it does not necessarily have to be calculated by other data.

[0067] After the edge device obtains the collection data, the collection data is substituted into the mapping formula, and the result of the mapping formula, i.e. the calculation data, can be calculated. It can be understood that the calculation data is the data required by the target device.

[0068] In S1022, the mapping relationship not only includes the mapping formula, but also includes the attribute of the object model corresponding to the target device. It can be understood that after obtaining the calculation data according to the mapping formula, the calculation data needs to be mapped to the object model that the target device can recognize and process. Therefore, the calculation data needs to be mapped to the object model data according to the attribute of the object model corresponding to the target device.

[0069] As an example, the mapping relationship can also be pre-stored in the access template of the edge device. The mappings are used to define the mapping relationship from the data collection point to the attribute of the object model, and the data under it is as follows: Figure 3As shown in the figure, where attribute is the name of the object model point, in this figure, the object model point to which the calculation data needs to be mapped is prop2, expression is the mapping formula, in this figure, the mapping formula is x2*10+x3. Specifically, the mapping relationship of the access template can also include the precision of the object model data, in this example, the precision of the object model data is limited to 4, therefore, when the calculation data is mapped to the object model point in the future, the precision of the calculation data also needs to be determined to 4 bits, so as to obtain the object model data. As an example, the mapping relationship of the access template can also include the mapping type type, specifically, the type can include: calculate and value, calculate means that the collected data needs to be calculated to obtain the object model data, and value means that the collected data does not need to be calculated, only the corresponding value (such as the original value, absolute value, etc.) of the collected data is needed to obtain the object model data.

[0070] By selecting this embodiment, the collected data can be pre-processed according to the mapping formula in the mapping relationship and the object model point, and then mapped to the object model data required by the target device, thereby reducing the step of calculating again by the target device after obtaining the object model data, and further reducing the load pressure of the target device.

[0071] In S103, after obtaining the object model data, the object model data can be forwarded to the target device, so that the target device accesses the related data of the to-be-collected device.

[0072] The data of the to-be-collected device in the actual scene often does not jump too much, in this case, if all the object model data is still directly forwarded to the target device, not only these object model data is not meaningful to the target device, but also the data flow forwarded to the target device is wasted, and the data receiving burden of the target device is increased, based on this, the present disclosure also provides a forwarding method of object model data, as shown in the figure. Figure 4a The method comprises:

[0073] S401a, according to the pre-stored configuration information of the data collection point, collecting the data of the to-be-collected device to obtain the collected data of each data collection point.

[0074] S402a, according to the pre-stored mapping relationship between the data collection point and each object model point, mapping the collected data of each data collection point to each object model point to obtain the object model data of each object model point.

[0075] S403a, if the deviation of the object model data from the historical object model data is greater than the pre-stored deviation range of the object model data, the object model data is forwarded to the target device.

[0076] S404a, if the deviation of the object model data from the historical object model data is not greater than the pre-stored deviation range of the object model data, the object model data is not forwarded to the target device.

[0077] The deviation range of the object model data can be set by a person skilled in the art according to needs or experience. For example, the deviation range can be ±10%, representing the percentage of the deviation of the object model data. It can be understood that the deviation range refers to the deviation range of the object model data of the same object model point. As an example, the deviation range can also be stored in the access template, for example, in the form of deviation: 10, where 10 is the specific size of the deviation range of the object model data defined by the access template.

[0078] In S401a, this step is the same as S101, and the related description of S101 can be referred to.

[0079] In S402a, this step is the same as S102, and the related description of S102 can be referred to.

[0080] In S403a, the historical object model data is the data at the same object model point as the object model data and has been forwarded to the target device.

[0081] One object model data corresponds to one object model point. If the object model point corresponding to one object model data is A, the historical object model data corresponding to the object model data can be the object model data at the object model point A sent to the target device in the previous round. If the deviation of the object model data from the historical object model data is greater than the deviation range, it means that the object model data collected this time is not repeated with the historical object model data, which is meaningful, and then the object model data should be forwarded to the target device for use by the target device.

[0082] It can be understood that the historical object model data is used as a standard to compare the object model data this time. If the deviation of the object model data from the historical object model data is greater than the deviation range, the forwarding condition is met, and the subsequent object model data is still measured by the original historical object model data as a standard. The standard is too old and may not accurately determine the repeated object model data. Therefore, if the deviation of the object model data from the historical object model data is greater than the pre-stored deviation range of the object model data, the object model data is forwarded to the target device, and the object model data is used as the new historical object model data.

[0083] It is evident that when the deviation between the current object model data and the historical object model data exceeds the deviation range, the current object model data can be used as new historical object model data to measure whether subsequent object model data can be forwarded to the target device. In this way, the evaluation criteria for object model data can be updated based on the data changes of the device under test.

[0084] By using this embodiment, historical object model data can be updated in a timely manner, that is, the standard for updating object model data can be updated in a timely manner, avoiding meaningless data from being forwarded to the target device and reducing the burden on the target device.

[0085] In S404a, if the deviation between the object model data and the historical object model data is not greater than the deviation range, it indicates that the object model data and the historical object model data may be duplicated. Therefore, it is meaningless to the target device that has already acquired the historical object model data. Thus, the object model data can be filtered out and not forwarded to the target device.

[0086] like Figure 4b As shown, 1, 2, 3, 4, 5, 6, and 7 are all data points of the same object model. At the initial time, 1 is considered historical object model data, while the object model data at times 2 and 3 are considered historical data points. Figure 4b The deviations of the point values ​​shown from the historical object model data are all within the deviation range. Therefore, 2 and 3 do not need to be forwarded to the target device. However, the deviation of 4 from 1 is greater than the deviation range. Therefore, 4 is forwarded to the target device and used as new historical object model data to evaluate subsequent 5, 6, and 7.

[0087] By using this embodiment, duplicate object model data can be filtered out based on the deviation range, and meaningful object model data can be forwarded to the target device, thus avoiding the waste of data traffic and reducing the data cleaning burden on the target device.

[0088] In another possible embodiment, this disclosure also provides a method for forwarding object model data, such as... Figure 4c As shown, the method includes:

[0089] S401c collects data from the device to be collected based on the pre-stored configuration information of the data collection points, and obtains the collected data from each data collection point.

[0090] S402c, based on the pre-stored mapping relationship between data acquisition points and object model points, maps the acquired data from each data acquisition point to each object model point, thereby obtaining the object model data for each object model point.

[0091] S403c, if the interval time between the acquisition time of the object model data and the forwarding time of the historical object model data is greater than the time window of the pre-stored object model data, the object model data is forwarded to the target device.

[0092] S404c, if the interval time between the acquisition time of the object model data and the forwarding time of the historical object model data is not greater than the time window of the pre-stored object model data, the object model data is not forwarded to the target device.

[0093] The time window of the object model data can be set by a person skilled in the art according to requirements or experience, and for example, the deviation range can be 10s. It can be understood that the time window refers to the time window of the object model data of the same object model point. As an example, the time window can also be stored in the access template, and for example, it can be expressed as silentWin: 10, where 10 is the length of the specific time window of the object model data defined by the access template.

[0094] In S401c, this step is the same as S101, and for details, please refer to the related description of S101, which will not be repeated here.

[0095] In S402c, this step is the same as S102, and for details, please refer to the related description of S102, which will not be repeated here.

[0096] In S404c, the historical object model data is the data located at the same object model point as the object model data and has been uploaded to the target device.

[0097] The historical object model data has been explained in the foregoing S403a, and for details, please refer to the related description of S403a, which will not be repeated here.

[0098] The historical object model data is the data that has been forwarded to the target device, which will have a specific forwarding time. If the acquisition time of the object model data and the forwarding time of the historical object model data are greater than the time window, it means that the object model data of the same object model point may not have been forwarded to the target device for a period of time. Therefore, the object model data is forwarded to the target device. Wherein, the interval time greater than the time window means that the time interval between the acquisition time of the object model data and the forwarding time of the historical object model data is longer than the time window.

[0099] Understandably, if the acquisition time of the initial historical object model data is always used as the standard to determine whether subsequent object model data should be forwarded to the target device, then the longer the interval between the acquisition time of the most recently acquired object model data and the acquisition time of the historical object model data, the more likely it will be forwarded to the target device. This would negate the purpose of filtering object model data. Therefore, if the interval between the acquisition time of the object model data and the forwarding time of the historical object model data is greater than the time window of the pre-stored object model data, then the object model data is forwarded to the target device and treated as new historical object model data.

[0100] It is evident that when the time interval between the acquisition time of the current object model data and the forwarding time of historical object model data is greater than the time window, the current object model data can be considered as new historical object model data. Therefore, the forwarding time of the current object model data can be used as the new forwarding time to measure the time interval between the acquisition time and forwarding time of subsequent object model data, thereby determining whether subsequent object model data can be forwarded to the target device. Thus, the evaluation criteria for object model data are updated based on changes in the forwarding of object model data. It is understandable that the data from the device to be collected may not change much over a period of time; therefore, frequent forwarding of object model data within a short timeframe is not very meaningful to the target device. Therefore, data with a short time interval between the acquisition time and the forwarding time of historical object model data can be filtered out.

[0101] By using this embodiment, the criteria for whether to forward object model data can be updated in real time based on the forwarding status of object model data, avoiding frequent forwarding of duplicate data to the target device and reducing the data receiving burden on the target device.

[0102] In S404c, it can be understood that if the interval between the acquisition time of the object model data and the forwarding time of the historical object model data is not greater than the time window, it means that the acquisition time of the object model data and the historical object model data are similar, and they are likely duplicate data. Therefore, it is not necessary to forward the current object model data to the target device.

[0103] like Figure 4d As shown, 1, 2, 3, 4, 5, 6, and 7 are all data from the same object model location. At the initial moment, 1 is considered historical object model data. The time interval between the acquisition time of object model data at moments 2 and 3 and the forwarding time of historical object model data is not greater than the time window. Therefore, 2 and 3 do not need to be forwarded to the target device. The time interval between the acquisition time of 4 and the forwarding time of 1 is greater than the time window. Therefore, 4 is forwarded to the target device and is considered as new historical object model data. The subsequent 5, 6, and 7 are evaluated based on their forwarding time.

[0104] According to the embodiment, the repeated object model data in the similar time can be filtered out according to the time window, and the meaningful object model data is forwarded to the target device, so that the waste of data flow is avoided, and the data cleaning burden of the target device is reduced.

[0105] In a possible embodiment, the deviation range and the time window can also be set at the same time. If the interval time between the acquisition time of the object model data and the forwarding time of the historical object model data is greater than the time window, the object model data is forwarded to the target device, and the object model data is taken as new historical object model data. If the interval time between the acquisition time of the object model data and the forwarding time of the historical object model data is not greater than the time window, it is determined whether the deviation between the object model data and the historical object model data is greater than the deviation range. If yes, the object model data is forwarded to the target device, and the object model data is taken as new historical object model data. If the deviation between the object model data and the historical object model data and the interval time do not satisfy the forwarding condition of the set deviation range and the time window, the object model data is not forwarded to the target device.

[0106] According to the embodiment, on the basis of screening the object model data, the case that the object model data and the historical object model data have a long time deviation but the object model data is not forwarded to the target device for a long time is avoided, so that the quality of the object model data forwarded to the target device is improved.

[0107] As the mapping formula x1+2*2 described above, the mapping formula not only includes the constant 2 but also includes the variable parameters x1 and x2, and then the edge device needs to determine the values of the variable parameters when calculating the calculation data according to the mapping formula. Based on this, the disclosure also provides a calculation method of calculation data, as shown in Figure 5a The method comprises the following steps.

[0108] S501, a mapping formula in a mapping relationship between a pre-stored data acquisition point and each object model point is acquired.

[0109] S502, the mapping formula is parsed to obtain a variable parameter and an identifier of the variable parameter.

[0110] S503, the acquisition data corresponding to the variable parameter is determined as to-be-calculated data according to the identifier of the variable parameter.

[0111] S504, the to-be-calculated data is substituted into the mapping formula to obtain calculation data.

[0112] In S501, as described in S1021, the mapping relationship can include the mapping formula. For example, the mapping formula can be saved in the mappings of the access template in the form of expression.

[0113] In S502, the value of the variable parameter in the mapping formula corresponds to the collected data, and the identification of the variable parameter corresponds to the serial number of the collection point of the collected data. Still taking the mapping formula x1+2*2 as an example, x1 and x2 are variable parameters of the mapping formula, and their values should correspond to the collected data. Specifically, to determine which collected data they correspond to, their serial numbers should be determined. The identification of x1 is 1, and the identification of x2 is 2.

[0114] In S503, as described in S502, the identification of the variable parameter corresponds to the serial number of the collection point of the collected data. As can be seen from the mapping formula in S502, the serial number of the data collection point of the collected data corresponding to x1 is 1, and the serial number of the data collection point of the collected data corresponding to x2 is 2. Based on this, the value of the variable parameter, i.e., the collected data corresponding to the variable parameter, can be determined, and the collected data is taken as the to-be-calculated data. It can be understood that the to-be-calculated data is the data that needs to be replaced by the variable parameter in the mapping formula for subsequent calculation.

[0115] For example, if an access template access-template is as follows:

[0116]

[0117] According to the identification of the variable parameter, the collected data corresponding to the variable parameter can be determined in the above access template. The identification of the variable parameters x1 and x2 in the mapping formula x1+2*2 in the mapping relationship mappings of the access template is determined to be 1 and 2, respectively. Based on this, the collected data with the ids of the data collection points in the configuration of the properties data collection point determined to be 1 and 2, respectively, is taken as the to-be-calculated data. It can be understood that the names of the data collection points corresponding to the above determined to-be-calculated data are switch and temperature 1, respectively, and their data types are both bool. The mapping physical model corresponding to the above access model can be as shown in Figure 5b , wherein the physical model point is prop1, the physical model data type of the physical model point is bool, and the read-write mode is rw.

[0118] In S504, after the to-be-calculated data is determined, the variable parameter in the mapping formula is replaced by the corresponding to-be-calculated data, so that a calculation formula represented by a numerical value is obtained. The edge device can calculate the calculation data according to the calculation formula.

[0119] By selecting this embodiment, the variable parameter in the mapping formula can be accurately determined from the collected data, and the mapping formula can be associated with the collected data. The mapping of the collected data to the calculated data is efficiently and accurately realized according to the mapping formula, and the efficiency of the data forwarding method is improved.

[0120] Specifically, when the edge device performs calculation according to the mapping formula, even if the data to be calculated is substituted into the mapping formula such as "x1+2*2", such a mapping formula does not conform to the language logic of the computer, so the edge device cannot recognize and understand the mapping formula as a person skilled in the art, and further needs to convert the mapping formula into a form that the edge device can recognize, and then calculate the calculation data. Based on this, the disclosure also provides a calculation method for calculating data, the method comprising:

[0121] S5041, traversing the mapping formula to obtain each operator of the mapping formula and the operation parameter corresponding to each operator.

[0122] S5042, combining the operator and the operation parameter corresponding to the operator to obtain each operation expression;

[0123] S5043, determining the operation order of each operation expression according to the priority of each operator and the position of each operator in the mapping formula.

[0124] S5044, constructing a target abstract syntax tree comprising all operation expressions according to the operation order of the operation expression.

[0125] S5045, replacing the variable parameter in the target abstract syntax tree with the data to be calculated to perform calculation and obtain the calculation data.

[0126] In S5041, the operation parameter comprises a variable parameter.

[0127] From the beginning of the mapping formula, the mapping formula is traversed to determine each operator (such as addition, subtraction, multiplication, division, etc.) and the operation parameter corresponding to each operator. It can be understood that the operation parameter corresponding to the operator is the operation parameter of the related operation represented by the operator, and the mapping formula is composed of operators and operation parameters. For example, in the mapping formula x1+2*2, + and * are operators, and 2 and x2 are operation parameters corresponding to the * operator, and x1 and 2*2 are operation parameters corresponding to +. It can be understood that since the mapping formula is a formula for mapping the collected data to the model data, and the mapping formula necessarily contains a variable parameter as described above, the operation parameters obtained by analyzing the mapping formula also necessarily include a variable parameter, such as x1 and x2 in x1+2*2.

[0128] In S5042, taking x1+2*2 as an example again, combining one operator and its corresponding operation parameter can be combining * with 2 and x2, and the obtained operation expression is 2*2.

[0129] In S5043, it can be understood that the operators themselves have certain priority, for example, the priority of * is higher than that of + and -. The position of the operator in the mapping formula can also be used to determine the priority of the operator, for example, the priority of + located at the front of the mapping formula is higher than that of - located at the rear of the mapping formula. Based on the above rules, the priority of each operator corresponding to the operation expression is determined. Taking x1+2*2 as an example, the priority of 2*2 is higher than that of x1+2*2.

[0130] In S5044, the abstract syntax tree is also an ASTNode (abstract syntax code node) structure tree used to describe various AST nodes. The target abstract syntax tree constructed according to the operation order of the operation expression includes each disassembled operation expression in the mapping formula, and the order of each operation expression can be sorted according to the operation order of the operation expression, so that the subsequent edge device can identify the calculation process of the mapping formula according to the target abstract syntax tree.

[0131] Specifically, the target abstract syntax tree can be constructed in the following way:

[0132] S5044a, the operation parameters in each operation expression are arranged in the root node to the leaf node of the initial abstract syntax tree in the order from low to high according to the operation order of each operation expression.

[0133] S5044b, the operators in the operation expression are associated with the nodes of the operation parameters corresponding to the operators in the initial abstract syntax tree, to obtain the target abstract syntax tree.

[0134] In S5044a, the initial abstract syntax tree can be a blank, node-unfilled abstract syntax tree. The operation parameters of the operation expression with the lowest operation order are taken as the root node of the initial abstract syntax tree, and the operation parameters of the operation expression with gradually increasing operation order are taken as the child nodes of the root node. According to this arrangement, the operation parameters of the operation expression with the highest operation order will finally be taken as the leaf node of the initial abstract syntax tree, that is, the node without other child nodes.

[0135] In S5044b, the operators of each operation expression are associated with the nodes in the initial abstract syntax tree where the corresponding operation parameters are located, to obtain the target abstract syntax tree.

[0136] Referring to Figure 6a , Figure 6a is a visual diagram of a target abstract syntax tree, Figure 6b is Figure 6aThe serialization data of the corresponding target abstract syntax tree, the mapping formula corresponding to the target abstract syntax tree is x2*10-3+1+10, specifically, since the operation order of the operation formula x2*10 is the highest, the operation parameters x2 and 10 in the operation formula are taken as leaf nodes of the target abstract syntax tree, and the operation formula x2*10-x3+1+10 has the lowest priority, so the operation parameter 10 corresponding to the operation formula is taken as the root node of the target abstract syntax tree. The connection lines of each child node to its parent node are associated with the corresponding operators of each operation formula, for example, the operator associated with the connection lines of the two child nodes x2 and 10 to the parent node in the operation formula x2*10 is *.

[0137] In this embodiment, the mapping formula is expressed in the form of a target abstract syntax tree, which facilitates the identification and processing of edge devices and improves the data mapping efficiency of edge devices.

[0138] In S5045, after obtaining the target abstract syntax tree constructed according to the operation formula, the edge device can identify the calculation process represented by the mapping formula, substitute the to-be-calculated data into the target abstract syntax tree for calculation, and obtain the calculation data.

[0139] In this embodiment, the operation formula is obtained according to the mapping formula, the target abstract syntax tree is constructed according to the operation order of the operation formula and the operation formula, the mapping formula is calculated according to the obtained target abstract syntax tree, and the calculation data is obtained. The mapping formula that cannot be understood by the edge device is converted into the target abstract syntax tree for calculation, thereby improving the data mapping efficiency.

[0140] Specifically, the present disclosure also provides a calculation method of calculation data based on a target abstract syntax tree, as shown in Figure 7 The method comprises the following steps:

[0141] S701, replacing the variable parameter in the node of the target abstract syntax tree with the to-be-calculated data.

[0142] S702, traversing the target abstract syntax tree to determine the to-be-calculated nodes in the target abstract syntax tree.

[0143] S703, calculating each to-be-calculated node according to the operator associated with the to-be-calculated node, until the root node of the target abstract syntax tree is calculated, and obtaining the calculation data.

[0144] In S701, in the foregoing S5041, it has been explained that the operation parameters include variable parameters, and the operation parameters are nodes of the target abstract syntax tree. Therefore, the target abstract syntax tree also includes variable parameters, and the to-be-calculated data is the value corresponding to the variable parameters. Therefore, when the target abstract syntax tree is calculated, the to-be-calculated data is substituted for the variable parameters in the target abstract syntax tree.

[0145] In S702, the to-be-calculated node is a node in the target abstract syntax tree whose corresponding operation parameter of the same operator is a numerical value.

[0146] It can be understood that the target abstract syntax tree includes multiple nodes, and each node has a calculation order in the calculation process. The to-be-calculated node is a node in the target abstract syntax tree that needs to be calculated with the highest priority. In the present disclosure, if each node associated with an operator is represented by a numerical value, each node associated with the operator can be calculated with the highest priority, and each node is regarded as a to-be-calculated node.

[0147] As shown in Figure 6a , if the variable parameters x1, x2, and x3 are replaced by to-be-calculated data, x1, x2, and x3 are represented by numerical values. Among them, x2 and 10 associated with the operator are represented by numerical values. Therefore, x2 and 10 are determined as to-be-calculated nodes, and are calculated with the highest priority. Correspondingly, if the data obtained by calculating x2*10 is used as the numerical value of the node associated with the operator, and the other node associated with the operator is also in numerical form, the nodes associated with the operator are regarded as to-be-calculated nodes at this moment. It can be seen that the setting of the to-be-calculated node in the present disclosure enables the target abstract syntax tree to be calculated in the direction from the leaf node to the root node, which conforms to the calculation order of each operation in the mapping formula.

[0148] In S703, when each node of the target abstract syntax tree is calculated until the root node is reached, it means that each node in the target abstract syntax tree has been calculated, that is, the mapping formula has been calculated, and the data obtained by the last calculation is obtained as the calculation data.

[0149] In the example shown in Figure 6a , if the to-be-calculated data corresponding to x1 is 1, the to-be-calculated data corresponding to x2 is 2, and the to-be-calculated data corresponding to x3 is 3, the first calculation should be 2*10 to obtain 20, the second calculation should be 20-3 to obtain 17, the third calculation should be 1+17 to obtain 18, the fourth calculation should be 10+18 to obtain 28, and the calculation data obtained is 28.

[0150] By selecting this embodiment, a specific calculation method of the target abstract syntax tree is provided, so that the target abstract syntax tree obtained according to the mapping formula can efficiently and accurately calculate the calculation data, so as to subsequently map the calculation data into the object model data, and the efficiency of the data forwarding method is improved.

[0151] Corresponding to the above data forwarding method, the present disclosure also provides a data receiving method applied to a target device, and the method comprises:

[0152] The system receives object model data, which is obtained by mapping the collected data from each data collection point to the object model point according to the pre-stored mapping relationship between the data collection points and each object model point. The collected data is obtained by collecting data from the device to be collected according to the pre-stored configuration information of the data collection points. The configuration information of each data collection point is set in advance according to the communication protocol used by the device to be collected, and the mapping relationship is set in advance according to the data structure that the target device can recognize.

[0153] Specifically, the edge device forwards the object model data, collected and converted from the device to be collected, to the target device. The target device then receives this object model data to complete the collection of relevant data from the device to be collected, and performs subsequent processing. The specific process of acquiring object model data has been explained above and will not be repeated here.

[0154] According to embodiments of this disclosure, this disclosure also provides a data forwarding system, wherein the system includes: a device to be collected, an edge device, and a target device;

[0155] The device to be collected is used to provide collected data to edge devices;

[0156] Edge devices are used to collect data from the device under test based on pre-stored configuration information of data collection points, obtaining the collected data from each data collection point. The configuration information of each data collection point is pre-set according to the communication protocol used by the device under test. Based on the pre-stored mapping relationship between the data collection points and each object model point, the collected data from each data collection point is mapped to each object model point, obtaining the object model data for each object model point. The mapping relationship is pre-set according to the data structure that the target device can recognize. The object model data is then forwarded to the target device.

[0157] The target device is used to receive object model data sent by the edge device.

[0158] Specifically, such as Figure 8 As shown in this disclosure, there can be multiple devices 801 to be collected. The edge device 802 collects data from the devices to be collected according to the access template, obtains the collected data, maps the collected data to object model data according to the access template, cleans the object model data according to the access template, and forwards the meaningful object model data to the target device 803, thereby completing the data forwarding from the device to be collected to the target device.

[0159] According to embodiments of this disclosure, this disclosure also provides a data forwarding apparatus, such as... Figure 9 As shown, it includes:

[0160] The collection module 901 is configured to collect data of the to-be-collected device according to configuration information of a data collection point position pre-stored, to obtain collection data of each data collection point position, and the configuration information of each data collection point position is set in advance according to a communication protocol used by the to-be-collected device.

[0161] The mapping module 902 is configured to map the collection data of each data collection point position to each object model point position according to a mapping relationship between the data collection point position and each object model point position pre-stored, to obtain object model data of each object model point position, and the mapping relationship is set in advance according to a data structure that can be recognized by the target device.

[0162] The forwarding module 903 is configured to forward the object model data to the target device.

[0163] In a possible embodiment, the mapping module 902 includes:

[0164] The calculation sub-module is configured to calculate the collection data according to a mapping formula in the mapping relationship between the data collection point position and each object model point position pre-stored, to obtain calculation data.

[0165] The mapping sub-module is configured to map the calculation data to object model data corresponding to the target device according to the object model point position corresponding to the target device in the mapping relationship.

[0166] In a possible embodiment, the calculation sub-module includes:

[0167] The mapping formula acquisition unit is configured to acquire a mapping formula in the mapping relationship between the data collection point position and each object model point position pre-stored.

[0168] The analysis unit is configured to analyze the mapping formula, to obtain a variable parameter and an identifier of the variable parameter.

[0169] The data determination unit is configured to determine, as to-be-calculated data, collection data corresponding to the variable parameter in the collection data according to the identifier of the variable parameter.

[0170] The calculation unit is configured to substitute the to-be-calculated data into the mapping formula to replace the variable parameter, to obtain calculation data.

[0171] In a possible embodiment, the calculation unit includes:

[0172] The variable acquisition sub-unit is configured to traverse the mapping formula, to obtain each operator of the mapping formula and an operation parameter corresponding to each operator, and the operation parameter includes a variable parameter.

[0173] An operation expression unit is configured to combine the operators and the operation parameters corresponding to the operators to obtain each operation expression;

[0174] An operation sequence subunit is configured to determine the operation sequence of each operation expression according to the priority of each operator and the position of each operator in the mapping formula;

[0175] A structure tree subunit is configured to construct a target abstract syntax tree including all operation expressions according to the operation sequence of the operation expressions;

[0176] A calculation data subunit is configured to replace the variable parameters in the target abstract syntax tree with the to-be-calculated data to obtain calculation data.

[0177] In a possible embodiment, the structure tree subunit is specifically configured to:

[0178] arrange the operation parameters in each operation expression in the initial abstract syntax tree from the root node to the leaf node in the order from low to high according to the operation sequence of each operation expression;

[0179] associate the operators in the operation expressions with the nodes of the operation parameters corresponding to the operators in the initial abstract syntax tree to obtain the target abstract syntax tree.

[0180] In a possible embodiment, the calculation data subunit is specifically configured to:

[0181] replace the variable parameters in the nodes of the target abstract syntax tree with the to-be-calculated data;

[0182] traverse the target abstract syntax tree to determine to-be-calculated nodes in the target abstract syntax tree, the to-be-calculated nodes being nodes in which the operation parameters corresponding to each node associated with the same operator in the target abstract syntax tree are numerical values;

[0183] calculate each to-be-calculated node according to the operator associated with the to-be-calculated node, until the root node of the target abstract syntax tree is calculated, to obtain the calculation data.

[0184] In a possible embodiment, the forwarding module 903 is specifically configured to: if the deviation of the object model data from historical object model data is greater than a pre-stored deviation range of object model data, the object model data is forwarded to a target device, the historical object model data being data that is located at the same object model point as the object model data and has been forwarded to the target device; and if the deviation of the object model data from the historical object model data is not greater than the pre-stored deviation range of object model data, the object model data is not forwarded to the target device.

[0185] In a possible embodiment, the forwarding module 903 is specifically configured to forward the object model data to the target device if the deviation of the object model data from the historical object model data is greater than a pre-stored deviation range of the object model data, and take the object model data as new historical object model data.

[0186] In a possible embodiment, the forwarding module 903 is specifically configured to forward the object model data to the target device if the interval time between the acquisition time of the object model data and the forwarding time of the historical object model data is greater than a pre-stored deviation range of the object model data, the historical object model data being data at the same object model point as the object model data and having been uploaded to the target device, and not forward the object model data to the target device if the interval time between the acquisition time of the object model data and the forwarding time of the historical object model data is not greater than the time window.

[0187] In a possible embodiment, the forwarding module 903 is specifically configured to forward the object model data to the target device if the interval time between the acquisition time of the object model data and the forwarding time of the historical object model data is greater than a pre-stored deviation range of the object model data, and take the object model data as new historical object model data.

[0188] In a possible embodiment, the collection module 901 includes:

[0189] an intermediate sub-module configured to collect data of the device to be collected according to pre-stored configuration information of the data collection point, to obtain intermediate data;

[0190] a collection sub-module configured to set the intermediate data according to the pre-stored configuration information of the data collection point, to obtain collection data.

[0191] According to embodiments of the present disclosure, the present disclosure further provides a data receiving apparatus, which is applied to a target device and includes:

[0192] a receiving module configured to receive object model data, wherein the object model data is obtained by mapping collection data of each data collection point to each object model point according to a pre-stored mapping relationship between the data collection points and the object model points, the collection data is obtained by collecting data of the device to be collected according to pre-stored configuration information of the data collection points, the configuration information of each data collection point is set in advance according to a communication protocol used by the device to be collected, and the mapping relationship is set in advance according to a data structure recognizable by the target device.

[0193] In the technical solutions of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information comply with relevant laws and regulations and do not violate public order and good customs.

[0194] According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0195] Figure 10 A schematic block diagram of an example electronic device 1000 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present disclosure described and / or claimed in this document.

[0196] As shown in Figure 10 The electronic device 1000 includes a computing unit 1001 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 1002 or a computer program loaded from a storage unit 1008 into a random access memory (RAM) 1003. Various programs and data required for the operation of the electronic device 1000 can also be stored in the RAM 1003. The computing unit 1001, the ROM 1002, and the RAM 1003 are connected to each other through a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0197] Various components in the electronic device 1000 are connected to the I / O interface 1005, including an input unit 1006, such as a keyboard, a mouse, etc.; an output unit 1007, such as various types of displays, speakers, etc.; the storage unit 1008, such as a magnetic disk, an optical disk, etc.; and a communication unit 1009, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1009 allows the electronic device 1000 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0198] The computing unit 1001 can be various general purpose and / or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1001 performs various methods and processes described above, such as the data forwarding method. For example, in some embodiments, the data forwarding method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 1008. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 1000 via the ROM 1002 and / or the communication unit 1009. When the computer program is loaded onto the RAM 1003 and executed by the computing unit 1001, one or more steps of the data forwarding method described above can be performed. Alternatively, in other embodiments, the computing unit 1001 can be configured to perform the data forwarding method by any other suitable means, such as by means of firmware.

[0199] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a complex programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0200] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces a means for implementing the functions / acts specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.

[0201] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0202] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0203] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0204] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server can arise by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0205] It should be understood that the various forms of flow shown above can be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure can be performed in parallel, in series, or in a different order, without limitation herein, so long as the desired results of the technology disclosed in the present disclosure are achieved.

[0206] The specific implementation described above does not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A data forwarding method, wherein, The method comprises: According to the configuration information of the pre-stored data collection points, the data of the to-be-collected device is collected to obtain the collection data of each data collection point, and the configuration information of each data collection point is set in advance according to the communication protocol used by the to-be-collected device; Obtain the mapping formula in the mapping relationship between the pre-stored data collection points and each object model point; analyze the mapping formula to obtain a variable parameter and an identifier of the variable parameter; determine the collection data corresponding to the variable parameter in the collection data as the to-be-calculated data according to the identifier of the variable parameter; substitute the to-be-calculated data into the mapping formula to obtain the calculation data by replacing the variable parameter; According to the object model point corresponding to the target device in the mapping relationship, the calculation data is mapped to the object model data corresponding to the target device; the mapping relationship is set in advance according to the data structure that can be recognized by the target device; Forward the object model data to the target device.

2. The method of claim 1, wherein, The method comprises: Traverse the mapping formula to obtain each operator of the mapping formula and each operator corresponding operation parameter, and the operation parameter comprises a variable parameter; Combine the operator and the operation parameter corresponding to the operator to obtain each operation formula; Determine the operation order of each operation formula according to the priority of each operator and the position of each operator in the mapping formula; Construct a target abstract syntax tree comprising all operation formulas according to the operation order of the operation formula; Substitute the to-be-calculated data into the variable parameter in the target abstract syntax tree to obtain the calculation data.

3. The method of claim 2, wherein, The method comprises: Arrange the operation parameters in each operation formula from the root node to the leaf node of the initial abstract syntax tree in the order from low to high according to the operation order of each operation formula; Associate the operator in the operation formula to the node of the operation parameter corresponding to the operator in the initial abstract syntax tree to obtain the target abstract syntax tree.

4. The method of claim 3, wherein, The method comprises: Substitute the to-be-calculated data into the variable parameter in the node of the target abstract syntax tree; Traverse the target abstract syntax tree to determine the to-be-calculated node in the target abstract syntax tree, and the to-be-calculated node is a node whose operation parameters corresponding to each node associated with the same operator in the target abstract syntax tree are numerical values; Calculate each to-be-calculated node according to the operator associated with the to-be-calculated node until the root node of the target abstract syntax tree is calculated to obtain the calculation data.

5. The method of claim 1, wherein, The method comprises: If the deviation of the object model data from the historical object model data is greater than the pre-stored deviation range of the object model data, the object model data is forwarded to the target device, and the historical object model data is data located at the same object model point as the object model data and has been forwarded to the target device; If the deviation of the object model data from the historical object model data is not greater than a pre-stored deviation range of object model data, the object model data is not forwarded to the target device.

6. The method of claim 5, wherein, If the deviation of the object model data from the historical object model data is greater than a pre-stored deviation range of object model data, the object model data is forwarded to the target device, including: If the deviation of the object model data from the historical object model data is greater than a pre-stored deviation range of object model data, the object model data is forwarded to the target device, and the object model data is taken as new historical object model data.

7. The method of claim 1, wherein, The forwarding of the object model data to the target device includes: If the interval time between the acquisition time of the object model data and the forwarding time of historical object model data is greater than a pre-stored time window of object model data, the object model data is forwarded to the target device, the historical object model data being data at the same object model point as the object model data and having been uploaded to the target device; If the interval time between the acquisition time of the object model data and the forwarding time of historical object model data is not greater than a pre-stored time window of object model data, the object model data is not forwarded to the target device.

8. The method of claim 7, wherein, If the interval time between the acquisition time of the object model data and the forwarding time of historical object model data is greater than a pre-stored time window of object model data, the object model data is forwarded to the target device, including: If the interval time between the acquisition time of the object model data and the forwarding time of historical object model data is greater than a pre-stored time window of object model data, the object model data is forwarded to the target device, and the object model data is taken as new historical object model data.

9. The method of claim 1, wherein, The method for collecting data of the to-be-collected device according to pre-stored configuration information of data collection points includes: According to pre-stored configuration information of data collection points, data of the to-be-collected device is collected to obtain intermediate data; According to pre-stored attribute information of each data collection point, the intermediate data is set to obtain collection data.

10. A data receiving method, wherein, The method is applied to a target device, including: Receiving object model data, wherein the object model data is obtained by: obtaining a mapping formula in a mapping relationship between pre-stored data collection points and each object model point; analyzing the mapping formula to obtain a variable parameter and an identifier of the variable parameter; determining, according to the identifier of the variable parameter, collection data corresponding to the variable parameter in the collection data as to-be-calculated data; substituting the to-be-calculated data for the variable parameter into the mapping formula to obtain calculation data; and mapping the calculation data to object model data corresponding to the target device according to an object model point corresponding to the target device in the mapping relationship; The collection data is obtained according to pre-stored configuration information of data collection points, and the configuration information of each data collection point is set according to a communication protocol used by the to-be-collected device.

11. A data forwarding device, wherein, The device comprises: The collection module is configured to collect data of a to-be-collected device according to pre-stored configuration information of data collection points, and obtain collection data of each data collection point, wherein the configuration information of each data collection point is set according to a communication protocol used by the to-be-collected device; The mapping module is configured to obtain a mapping formula in a mapping relationship between the data collection points and the object model points; analyze the mapping formula to obtain a variable parameter and an identifier of the variable parameter; determine, according to the identifier of the variable parameter, collection data corresponding to the variable parameter in the collection data as to-be-calculated data; substitute the to-be-calculated data into the mapping formula to obtain calculation data; and map the calculation data to object model data corresponding to the target device according to an object model point corresponding to the target device in the mapping relationship, wherein the mapping relationship is set according to a data structure recognizable by the target device. The forwarding module is configured to forward the object model data to the target device.

12. A data receiving apparatus, wherein, The device is applied to a target device and comprises: The receiving module is configured to receive object model data, wherein the object model data is obtained by: obtaining a mapping formula in a mapping relationship between data collection points and object model points; analyzing the mapping formula to obtain a variable parameter and an identifier of the variable parameter; determining, according to the identifier of the variable parameter, collection data corresponding to the variable parameter in the collection data as to-be-calculated data; substituting the to-be-calculated data into the mapping formula to obtain calculation data; and mapping the calculation data to object model data corresponding to the target device according to an object model point corresponding to the target device in the mapping relationship. The collection data is obtained according to pre-stored configuration information of data collection points, and the configuration information of each data collection point is set according to a communication protocol used by the to-be-collected device, and the mapping relationship is set according to a data structure recognizable by the target device.

13. A data forwarding system, wherein, The system comprises a to-be-collected device, an edge device, and a target device. The to-be-collected device is configured to provide collection data to the edge device. The edge device is configured to collect data of the to-be-collected device according to pre-stored configuration information of the data collection point, to obtain collection data of each data collection point, and the configuration information of each data collection point is set in advance according to a communication protocol used by the to-be-collected device; obtain a mapping formula in a mapping relationship between the pre-stored data collection point and each object model point; analyze the mapping formula to obtain a variable parameter and an identifier of the variable parameter; determine, according to the identifier of the variable parameter, collection data corresponding to the variable parameter in the collection data as to-be-calculated data; substitute the to-be-calculated data into the mapping formula to obtain calculation data; map the calculation data to object model data corresponding to the target device according to the object model point corresponding to the target device in the mapping relationship; the mapping relationship is set in advance according to a data structure that can be recognized by the target device; and forward the object model data to the target device. The target device is configured to receive the object model data sent by the edge device.

14. An electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9 or 10.

15. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the method of any one of claims 1-9 or 10.

16. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-9 or 10.

Citation Information

Patent Citations

  • Automatic formula recognition method and device as well as electronic equipment and storage medium

    CN108537183A

  • Integrated control method and device, building control system, storage medium and processor

    CN111930496A