Gateway controller compatible with multiple communication protocols
By designing a gateway controller compatible with multiple communication protocols, data conversion and regularization are realized, the problem of high pressure on gateways in the Internet of Things architecture is solved, and data transmission efficiency and access end battery life are improved.
Patent Information
- Application Number
- CN202411427599.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-02-14
AI Technical Summary
In the Internet of Things architecture, the gateway needs to process data from multiple access devices, resulting in greater working pressure. How to alleviate the working pressure of the gateway has become a technical challenge.
Design a gateway controller compatible with multiple communication protocols, obtain gateway data in real time through the access terminal, select data conversion models according to the data type space, convert and regularize the data, reduce the amount of data and feedback to the general control terminal. The overall control terminal builds a data type space, selects the data conversion model simultaneously, and reverses the feedback regular data to determine the original data.
Through data conversion and regularization, the amount of data to be uploaded is effectively reduced, the working pressure of the gateway is alleviated, the data transmission process is simplified, and the battery life of the access end is improved.
Smart Images

Figure CN119449901A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of gateway data acquisition, in particular to a gateway controller compatible with multiple communication protocols. Background Art
[0002] Gateway is also called network connector or protocol converter. Gateway realizes network interconnection above the network layer. It is a complex network interconnection device and is only used for interconnection between two networks with different high-level protocols. Gateway can be used for both wide area network interconnection and local area network interconnection. Gateway is a computer system or device that performs the conversion task and is used between two systems with different communication protocols, data formats or languages, or even completely different architectures.
[0003] In the Internet of Things architecture, the gateway can be used to obtain data from different access devices and then feed it back to the main control end. When there are many types of access devices, the working pressure of the gateway is relatively large. How to alleviate the working pressure of the gateway is the technical problem that the technical solution of the present invention wants to solve. Summary of the invention
[0004] The object of the present invention is to provide a gateway controller compatible with multiple communication protocols to solve the problems raised in the above background technology.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A gateway controller compatible with multiple communication protocols, the gateway controller comprising:
[0007] The access terminal is used to receive the data type space of the current access terminal sent by the master control terminal, and select a data conversion model according to the data type space; when the gateway data is acquired in real time, the gateway data is converted according to the data conversion model to obtain conversion data; the conversion data is compared, the reference data is selected, and other conversion data is regularized according to the reference data, and the regularized data is fed back to the master control terminal;
[0008] The master control terminal is used to receive the relative positions of the production lines and each access terminal input by the staff, determine the monitoring data type of each access terminal according to the relative position of each access terminal, construct the data type space, and send it to the corresponding access terminal; when the performance parameter of the access terminal is less than the preset parameter threshold, synchronously select the data conversion model and send it to the corresponding access terminal; receive the regularized data fed back by each access terminal, reverse the regularized data, determine the original data of each access terminal and store it.
[0009] As a further solution of the present invention: the access terminal includes:
[0010] A model selection module, used for receiving the data type space of the current access end sent by the master control end, and selecting a data conversion model according to the data type space;
[0011] The data conversion module is used to convert the gateway data according to the data conversion model to obtain the converted data when the gateway data is acquired in real time;
[0012] The data regularization module is used to compare the conversion data, select benchmark data, regularize other conversion data according to the benchmark data, and feed back the regularized data to the main control end.
[0013] As a further solution of the present invention: the master control terminal includes:
[0014] The type space construction module is used to receive the relative positions of the production lines and each access terminal input by the staff, determine the monitoring data type of each access terminal according to the relative position of each access terminal, construct the data type space, and send it to the corresponding access terminal; when the performance parameter of the access terminal is less than the preset parameter threshold, synchronously select the data conversion model and send it to the corresponding access terminal;
[0015] The data inversion module is used to receive the regularized data fed back by each access terminal, perform inversion on the regularized data, determine the original data of each access terminal and store it.
[0016] As a further solution of the present invention: the model selection module includes:
[0017] A first receiving unit, configured to receive a data type space of a current access terminal sent by a master control terminal;
[0018] A conversion model query unit, used to query each data type space to query a data conversion model in a preset model library;
[0019] The backup selection unit is used to select a backup global conversion model as the data conversion model when the query result is empty, and generate prompt information and feed it back to the main control end; the output of the global conversion model is a numerical value, and the input format is not limited.
[0020] As a further solution of the present invention: the data conversion module includes:
[0021] A data structure query unit, used to obtain gateway data in real time and query the data structure of the gateway data;
[0022] A conversion unit, used to convert the gateway data according to the selected data conversion model to obtain a single value;
[0023] A normalization processing unit, used for normalizing the single value to obtain conversion data within a preset range;
[0024] An amplitude recording unit, used to synchronously record the scaling amplitude of the normalization process as an attribute of the access end;
[0025] The normalization process is to compare the gateway data with the boundary data, determine the proportion, and determine the scaling range according to the difference in the boundary data.
[0026] As a further solution of the present invention: the data regularization module includes:
[0027] A difference rate calculation unit, used for comparing adjacent conversion data and calculating a difference rate between the conversion data and the previous conversion data;
[0028] A reference selection unit, configured to select the next converted data as reference data when the difference rate reaches a preset threshold;
[0029] a ratio calculation unit, for calculating the ratio of all the converted data to the previous reference data for all the converted data between two reference data;
[0030] The feedback unit is retained to retain the reference data and the ratio, obtain the regularized data, and feed the regularized data back to the main control end.
[0031] As a further solution of the present invention: the type space construction module includes:
[0032] The data initialization unit receives the relative positions of the production lines and each access terminal input by the staff;
[0033] A monitoring data acquisition unit, used for querying the monitoring data types of all access devices for any access terminal according to its relative position in the production line;
[0034] The transmission unit is used to count the monitoring data types of all access devices as the data type space of the corresponding access end and send it to the access end.
[0035] As a further solution of the present invention: the data inversion module includes:
[0036] A second receiving unit, configured to receive regularized data fed back by each access terminal;
[0037] The reverse inference unit is used to query the corresponding benchmark data for non-benchmark data, and calculate the data before regularization based on the ratio and the benchmark data;
[0038] A statistical unit is used to obtain the original data after all non-benchmark data are calculated to obtain the data before regularization;
[0039] The storage unit is used to store original data using each access end as a label.
[0040] As a further solution of the present invention: the content of storing the original data with each access terminal as a label includes:
[0041] The raw data is counted with each access point as a label;
[0042] Obtain the connection relationship of each access point in the production line and determine the data relevance;
[0043] Verifying the statistically collected original data according to the data relevance;
[0044] When the verification passes, the original data is stored.
[0045] As a further solution of the present invention: the generation and storage process of the original data adopts at least two databases, one is the main database and the other is the backup database. The data of the same range is intercepted in the main database and the backup database at regular intervals, and logical operations are performed on the intercepted data. The accuracy of the storage process is judged in real time according to the results of the logical operations.
[0046] Compared with the prior art, the beneficial effect of the present invention is that when the access end of the present invention obtains data from different access devices, it will compare adjacent data and determine the difference rate. When the difference rate is large enough, the adjacent data will be marked as benchmark data. Then, with the benchmark data as the core, other data will be simplified, thereby compressing the amount of data to be uploaded and effectively alleviating work pressure. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention.
[0048] Figure 1 The structural block diagram of the gateway controller that is compatible with multiple communication protocols.
[0049] Figure 2 This is a structural block diagram of the model selection module in the access end.
[0050] Figure 3 This is a structural block diagram of the data conversion module in the access end.
[0051] Figure 4 This is a structural block diagram of the data regularization module in the access end.
[0052] Figure 5 This is a structural block diagram of the composition of the type space building module in the master control terminal.
[0053] Figure 6 This is a structural block diagram of the data reverse inference module in the master control end. DETAILED DESCRIPTION
[0054] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0055] Figure 1 The present invention provides a block diagram of a gateway controller compatible with multiple communication protocols. In one embodiment of the present invention, a gateway controller compatible with multiple communication protocols includes:
[0056] The access terminal 10 is used to receive the data type space of the current access terminal sent by the master control terminal, and select a data conversion model according to the data type space; when the gateway data is acquired in real time, the gateway data is converted according to the data conversion model to obtain conversion data; the conversion data is compared, the reference data is selected, and other conversion data is regularized according to the reference data, and the regularized data is fed back to the master control terminal;
[0057] The master control terminal 20 is used to receive the relative positions of the production lines and each access terminal input by the staff, determine the monitoring data type of each access terminal according to the relative position of each access terminal, construct the data type space, and send it to the corresponding access terminal; when the performance parameter of the access terminal is less than the preset parameter threshold, synchronously select the data conversion model and send it to the corresponding access terminal; receive the regularized data fed back by each access terminal, reverse the regularized data, determine the original data of each access terminal and store it.
[0058] The technical solution of the present invention has two parts, one is the data processing center, that is, the master control terminal 20 mentioned above, and the other is the data acquisition port, that is, the access terminal 10 mentioned above. In practical applications, the application scenario is generally an Internet of Things workshop, and the data generated in the Internet of Things workshop is acquired by the access terminal 10. There are more than one access terminals 10, and each access terminal 10 can acquire data in the production process. Moreover, one access terminal 10 may have multiple access devices, and the data formats of multiple access devices may be different. This requires the access terminal 10 to have the ability to process multiple data, that is, to be compatible with multiple communication protocols; in addition, with respect to the master control terminal 20, on the one hand, it is used to acquire and count the data fed back by all access terminals 10, and on the other hand, it also interacts with the staff, receives the input information of the staff or feeds back information to the staff.
[0059] In an example of the technical solution of the present invention, a staff member inputs the relative position of the production line and each access terminal 10 in the master control terminal 20. The relative position indicates the position of the access terminal in the production line and which devices it is connected to. The access device to which each access terminal 10 is connected can be determined based on the relative position of each access terminal 10, and then the data type of the access device is obtained as the monitoring data type. All monitoring data types are counted to obtain the data type space, and the data type space of each access terminal 10 is sent to the corresponding access terminal 10.
[0060] After the access terminal 10 receives the data type space sent by the master control terminal 20, it selects a data conversion model according to the data type space, that is, it selects the corresponding data conversion model according to the data that may appear. When the gateway data is obtained, the gateway data is converted according to the data conversion model to obtain the converted data; the converted data is compared, the benchmark data is selected, and the other converted data is regularized according to the benchmark data, and the regularized data is fed back to the master control terminal 20.
[0061] Finally, the master control terminal 20 receives the regularized data fed back by each access terminal, reverses the regularized data, determines the original data of each access terminal and stores it; this process is the reverse process of the data regularization process; its advantage is that the data regularization process is completed by the input terminal 10, which simplifies the data, thereby simplifying the data transmission pressure and improving the endurance of the access terminal 10; the data recovery process of the master control terminal 20 can be carried out all the time without real-time recovery. For example, when the master control terminal 20 performs other tasks, the recovery can be interrupted and data recovery can be performed when it is idle, which is extremely flexible.
[0062] It should be noted that there is a step in the working process of the access terminal 10, which is to select the corresponding data conversion model based on the possible data. When the performance parameters of the access terminal are small and this process cannot be executed smoothly, the master control terminal 20 needs to select the data conversion model and then send it to the corresponding access terminal 10.
[0063] Specifically, the access terminal 10 and the master control terminal 20 are master ports. By modularizing the access terminal 10 and the master control terminal 20, various tasks can be completed by dedicated modules, as follows:
[0064] The access terminal 10 comprises:
[0065] The model selection module 11 is used to receive the data type space of the current access end sent by the master control end, and select a data conversion model according to the data type space;
[0066] The data conversion module 12 is used to convert the gateway data according to the data conversion model to obtain the converted data when the gateway data is acquired in real time;
[0067] The data regularization module 13 is used to compare the conversion data, select reference data, regularize other conversion data according to the reference data, and feed back the regularized data to the master control end.
[0068] The master control terminal 20 includes:
[0069] The type space construction module 21 is used to receive the relative positions of the production lines and each access terminal input by the staff, determine the monitoring data type of each access terminal according to the relative position of each access terminal, construct the data type space, and send it to the corresponding access terminal; when the performance parameter of the access terminal is less than the preset parameter threshold, synchronously select the data conversion model and send it to the corresponding access terminal;
[0070] The data inverse inference module 22 is used to receive the regularized data fed back by each access terminal, perform inverse inference on the regularized data, determine the original data of each access terminal, and store it.
[0071] Figure 2 The structure diagram of the model selection module in the access terminal is shown in FIG. 1 , wherein the model selection module 11 includes:
[0072] The first receiving unit 111 is used to receive the data type space of the current access end sent by the master control end;
[0073] The conversion model query unit 112 is used to query each data type space to query the data conversion model in the preset model library;
[0074] The backup selection unit 113 is used to select a backup global conversion model as a data conversion model when the query result is empty, and generate prompt information and feed it back to the main control end; the output of the global conversion model is a numerical value, and the input format is not limited.
[0075] The above content makes specific functional limitations on the working process of the model selection module 11 of the access terminal 10, receives the data type space of the current access terminal 10 sent by the main control terminal 20, and then queries the data conversion model in the model library pre-stored locally. One data type corresponds to one data conversion model. After the data conversion model is queried, it can be directly read. When the query result is empty, that is, there is no data conversion model corresponding to the current data type in the model library. At this time, the pre-set global conversion model is used as the data conversion model for the data type. The global conversion model can use an existing model that converts all outputs into numerical values.
[0076] Figure 3 The data conversion module 12 in the access terminal is a structural block diagram of the data conversion module. The data conversion module 12 includes:
[0077] A data structure query unit 121 is used to obtain gateway data in real time and query the data structure of the gateway data;
[0078] The conversion unit 122 is used to convert the gateway data according to the selected data conversion model to obtain a single value;
[0079] A normalization processing unit 123, used to perform normalization processing on the single value to obtain conversion data within a preset range;
[0080] Amplitude recording unit 124, used for synchronously recording the scaling amplitude of the normalization processing as an attribute of the access terminal;
[0081] The normalization process is to compare the gateway data with the boundary data, determine the proportion, and determine the scaling range according to the difference in the boundary data.
[0082] After obtaining the gateway data, the access terminal 10 queries the data structure of the gateway data, and then converts the gateway data according to the selected data conversion model to obtain a single value. The single value is normalized and the change range of the data during the normalization process is recorded as the scaling range, which is an attribute of the access terminal 10.
[0083] Among them, the normalization process is to convert the obtained numerical values into a range, which is equivalent to a scaling process. Therefore, the range of change of the data is called the scaling range.
[0084] Figure 4 The data regularization module 13 in the access terminal is a structural block diagram of the data regularization module. The data regularization module 13 includes:
[0085] The difference rate calculation unit 131 is used to compare adjacent conversion data and calculate the difference rate between the conversion data and the previous conversion data;
[0086] A reference selection unit 132, configured to select the next converted data as reference data when the difference rate reaches a preset threshold;
[0087] The ratio calculation unit 133 is used to calculate the ratio of all the converted data to the previous reference data for all the converted data between two reference data;
[0088] The retention feedback unit 134 is used to retain the reference data and the ratio, obtain the regularized data, and feed back the regularized data to the master control end.
[0089] Comparing adjacent conversion data, the difference between adjacent conversion data is generally small, so the calculated difference rate is also small. Once the difference rate is large, it means that the data has mutated. The mutated data is recorded as the benchmark data, and then, for all conversion data between the two benchmark data, the ratio of all conversion data to the previous benchmark data is calculated. At this time, the remaining data is some benchmark data and some ratios, and these ratios are close to one. The benchmark data and the ratio are retained to obtain the regularized data, and the regularized data is fed back to the main control terminal 20; if the main control terminal 20 needs to restore the data, the benchmark data can be inferred from the ratio to obtain the restored data; if no restoration is performed, the benchmark data is sufficient to reflect the working status of the production line, which is equivalent to expanding the selection space for the staff.
[0090] Figure 5 The structure diagram of the type space construction module in the master control terminal is shown in FIG. 21. The type space construction module 21 includes:
[0091] The data initialization unit 211 receives the relative positions of the production line and each access terminal input by the staff;
[0092] A monitoring data acquisition unit 212 is used to query the monitoring data types of all access devices for any access terminal according to its relative position in the production line;
[0093] The transmission unit 213 is used to count the monitoring data types of all access devices as the data type space corresponding to the access end, and send it to the access end.
[0094] The production line route is input by the staff. After the staff enters the production line, they will enter the relative position of each access terminal. For any access terminal, the monitoring data type can be determined according to its relative position. The monitoring data type of all access devices is counted. The collection of monitoring data types is the data type space.
[0095] Figure 6 The data inversion module 22 in the master control terminal comprises:
[0096] The second receiving unit 221 is used to receive the regularized data fed back by each access terminal;
[0097] The reverse inference unit 222 is used to query the corresponding benchmark data for the non-benchmark data, and calculate the data before regularization according to the ratio and the benchmark data;
[0098] A statistical unit 223 is used to obtain the original data by statistical calculation after all non-reference data are calculated to obtain the data before regularization;
[0099] The storage unit 224 is used to store original data using each access terminal as a label.
[0100] The above content provides a specific data inversion solution, which receives the regularized data fed back by each access terminal, retains the benchmark data, queries the corresponding benchmark data for non-benchmark data, calculates the data before regularization based on the ratio and the benchmark data, and completes the restoration process. When all non-benchmark data are calculated to obtain the data before regularization, retain the data before regularization calculated in sequence as the original data, and then store the original data with each access terminal as a label.
[0101] Furthermore, the content of storing the original data with each access terminal as a label includes:
[0102] The raw data is counted with each access point as a label;
[0103] Obtain the connection relationship of each access point in the production line and determine the data relevance;
[0104] Verifying the statistically collected original data according to the data relevance;
[0105] When the verification passes, the original data is stored.
[0106] The statistical storage stage is not complicated. The original data is counted with each access terminal as a label, and then the connection relationship between the access terminals is obtained to determine the data correlation. Generally, the data correlation of the access terminals connected in series is relatively high, that is, the data correlation represents the relevant situation of the data obtained by the access terminal. Based on the data correlation, it is possible to determine in real time whether there are problems in the statistical original data. Incorrect data will greatly affect the data correlation.
[0107] Specifically, the generation and storage process of the original data uses at least two databases, one is the primary database and the other is the backup database. The same range of data is periodically intercepted from the primary database and the backup database, and logical operations are performed on the intercepted data. The accuracy of the storage process is judged in real time based on the results of the logical operations.
[0108] The logical operation process uses an XOR operation or an AND operation, and these two operations are used to determine whether the data in the two databases are the same, and then verify the stored procedure.
[0109] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A gateway controller compatible with multiple communication protocols, characterized in that: The gateway controller comprises: The access terminal is used to receive the data type space of the current access terminal sent by the master control terminal, and select a data conversion model according to the data type space; when the gateway data is acquired in real time, the gateway data is converted according to the data conversion model to obtain conversion data; the conversion data is compared, the reference data is selected, and other conversion data is regularized according to the reference data, and the regularized data is fed back to the master control terminal; The master control terminal is used to receive the relative positions of the production lines and each access terminal input by the staff, determine the monitoring data type of each access terminal according to the relative position of each access terminal, construct the data type space, and send it to the corresponding access terminal; when the performance parameter of the access terminal is less than the preset parameter threshold, synchronously select the data conversion model and send it to the corresponding access terminal; receive the regularized data fed back by each access terminal, reverse the regularized data, determine the original data of each access terminal and store it.
2. The gateway controller compatible with multiple communication protocols according to claim 1, characterized in that: The access terminal comprises: A model selection module, used for receiving the data type space of the current access end sent by the master control end, and selecting a data conversion model according to the data type space; The data conversion module is used to convert the gateway data according to the data conversion model to obtain the converted data when the gateway data is acquired in real time; The data regularization module is used to compare the conversion data, select benchmark data, regularize other conversion data according to the benchmark data, and feed back the regularized data to the main control end.
3. The gateway controller compatible with multiple communication protocols according to claim 2, characterized in that: The master control terminal comprises: The type space construction module is used to receive the relative positions of the production lines and each access terminal input by the staff, determine the monitoring data type of each access terminal according to the relative position of each access terminal, construct the data type space, and send it to the corresponding access terminal; when the performance parameter of the access terminal is less than the preset parameter threshold, synchronously select the data conversion model and send it to the corresponding access terminal; The data inversion module is used to receive the regularized data fed back by each access terminal, perform inversion on the regularized data, determine the original data of each access terminal and store it.
4. The gateway controller compatible with multiple communication protocols according to claim 2, characterized in that: The model selection module includes: A first receiving unit, configured to receive a data type space of a current access terminal sent by a master control terminal; A conversion model query unit, used to query each data type space to query a data conversion model in a preset model library; The backup selection unit is used to select a backup global conversion model as the data conversion model when the query result is empty, and generate prompt information and feed it back to the main control end; the output of the global conversion model is a numerical value, and the input format is not limited.
5. The gateway controller compatible with multiple communication protocols according to claim 2, characterized in that: The data conversion module comprises: A data structure query unit, used to obtain gateway data in real time and query the data structure of the gateway data; A conversion unit, used to convert the gateway data according to the selected data conversion model to obtain a single value; A normalization processing unit, used for normalizing the single value to obtain conversion data within a preset range; An amplitude recording unit, used to synchronously record the scaling amplitude of the normalization process as an attribute of the access end; The normalization process is to compare the gateway data with the boundary data, determine the proportion, and determine the scaling range according to the difference in the boundary data.
6. The gateway controller compatible with multiple communication protocols according to claim 2, characterized in that: The data regularization module includes: A difference rate calculation unit, used for comparing adjacent conversion data and calculating a difference rate between the conversion data and the previous conversion data; A reference selection unit, configured to select the next converted data as reference data when the difference rate reaches a preset threshold; a ratio calculation unit, for calculating the ratio of all the converted data to the previous reference data for all the converted data between two reference data; The feedback unit is retained to retain the reference data and the ratio, obtain the regularized data, and feed the regularized data back to the main control end.
7. The gateway controller compatible with multiple communication protocols according to claim 3, characterized in that: The type space building module includes: The data initialization unit receives the relative positions of the production lines and each access terminal input by the staff; A monitoring data acquisition unit, used for querying the monitoring data types of all access devices for any access terminal according to its relative position in the production line; The transmission unit is used to count the monitoring data types of all access devices as the data type space of the corresponding access end and send it to the access end.
8. The gateway controller compatible with multiple communication protocols according to claim 3, characterized in that: The data inversion module includes: A second receiving unit, configured to receive regularized data fed back by each access terminal; The reverse inference unit is used to query the corresponding benchmark data for non-benchmark data, and calculate the data before regularization based on the ratio and the benchmark data; A statistical unit is used to obtain the original data after all non-benchmark data are calculated to obtain the data before regularization; The storage unit is used to store original data using each access end as a label.
9. The gateway controller compatible with multiple communication protocols according to claim 8, characterized in that: The content of storing the original data with each access terminal as a tag includes: The raw data is counted with each access point as a label; Obtain the connection relationship of each access point in the production line and determine the data relevance; Verifying the statistically collected original data according to the data relevance; When the verification passes, the original data is stored.
10. The gateway controller compatible with multiple communication protocols according to claim 9, characterized in that: original The data generation and storage process uses at least two databases, one for the primary database and one for the backup database. Regularly intercept the same range of data in the primary database and the standby database, and perform logical operations on the intercepted data. The accuracy of the stored procedure is determined in real time based on the results of logical operations.