A data interaction method and system for multiple embedded devices based on a CAT.1 module
By building a data interaction network of embedded devices and confirming the optimal flow direction, the problem that the CAT.1 module cannot meet the data interaction requirements of a large number of devices is solved, and the confirmation of device service priority and the efficiency of data interaction is achieved.
Patent Information
- Application Number
- CN202411110199.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2044-08-14
AI Technical Summary
The CAT.1 module has weak data transmission capabilities and cannot meet the needs of a large number of embedded devices to interact simultaneously, resulting in the CAT.1 module being unable to respond in a timely manner.
By receiving the data interaction instructions of the initiating device, determining the type of the data exchange instructions, obtaining historical data interaction records between the initiating device and other devices, building a data interaction network, confirming the optimal data interaction flow direction, and using the CAT.1 module to realize data interaction.
The optimal data interaction flow between embedded devices is constructed to help the CAT.1 module confirm the service priority of the device, and avoid the problem that the CAT.1 module cannot respond in a timely manner due to a large number of device requirements.
Smart Images

Figure CN118945193B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a data interaction method and system for multiple embedded devices based on a CAT.1 module, belonging to the field of communication transmission technology. Background Art
[0002] With the rapid development of the Internet of Things (IoT) technology, embedded devices are increasingly widely used in fields such as smart cities, industrial automation, and smart homes. Existing embedded devices generally have the capabilities of perception, data processing, and communication, and can collect and exchange data to support complex decision-making and automated processes.
[0003] As a low-cost and low-power solution for 4G LTE communication technology, the CAT.1 module provides stable and efficient data transmission capabilities for embedded devices. Through the CAT.1 module, it can help achieve remote monitoring, real-time data sharing, and rapid response between embedded devices, greatly improving flexibility and efficiency.
[0004] However, there are still technical problems to be solved in providing data interaction for embedded devices based on the CAT.1 module. Due to the relatively weak data transmission capabilities of the CAT.1 module, when it is necessary to provide data interaction services for a large number of embedded devices simultaneously, the limited communication capabilities of the CAT.1 module cannot meet this demand. Therefore, how to use the low-cost and low-power CAT.1 module to achieve data interaction and overcome the disadvantages of the relatively weak communication capabilities of the CAT.1 module to the greatest extent is an urgent technical problem to be solved. Summary of the Invention
[0005] The present invention provides a data interaction method, device, and computer-readable storage medium for multiple embedded devices based on a CAT.1 module. Its main purpose is to construct the optimal data interaction flow direction between embedded devices, help the CAT.1 module confirm the service priorities of embedded devices, so as to avoid the problem that the CAT.1 module cannot respond in a timely manner due to the need to provide data interaction for a large number of embedded devices.
[0006] To achieve the above object, a data interaction method for multiple embedded devices based on a CAT.1 module provided by the present invention includes:
[0007] Receiving a data interaction instruction initiated by an instruction initiating device, and sending the data exchange instruction to the CAT.1 module, wherein the device type of the instruction initiating device is embedded;
[0008] Determining the type of the data exchange instruction in the CAT.1 module to obtain an instruction type, and determining other embedded devices that have the possibility of data interaction with the instruction initiating device according to the instruction type to obtain one or more instruction receiving devices;
[0009] Obtain the data interaction records between the instruction initiating device and each instruction receiving device in the historical time period, and construct a data interaction network centered on the instruction initiating device based on the data interaction records in the historical time period;
[0010] Confirm the optimal data interaction flow direction according to the data interaction network;
[0011] Based on the optimal data interaction flow direction, use the CAT.1 module to implement the data interaction between the instruction initiating device and other instruction receiving devices, and achieve the purpose of data interaction among multiple embedded devices.
[0012] Optionally, the sending the data exchange instruction to the CAT.1 module includes:
[0013] Start the CAT.1 module, where the CAT.1 module includes a wireless transmission unit, a modem, a radio frequency front end, and a controller;
[0014] Confirm the wireless network where the instruction initiating device is located to obtain the available wireless network and the IP address of the instruction initiating device;
[0015] Use the available wireless network to send the data exchange instruction to the CAT.1 module. At the same time, when the CAT.1 module receives the data exchange instruction, use the wireless transmission unit to generate a data test instruction;
[0016] Use the available wireless network to send the data test instruction to the IP address of the instruction initiating device and wait for the test response instruction returned by the instruction initiating device;
[0017] If the CAT.1 module successfully receives the test response instruction, use the wireless transmission unit to receive the data exchange instruction.
[0018] Optionally, the determining the type of the data exchange instruction in the CAT.1 module to obtain the instruction type includes:
[0019] Parse the data exchange instruction in the wireless transmission unit to obtain the data interaction purpose;
[0020] Confirm the instruction type based on the data interaction purpose, where the instruction type includes arithmetic calculation instructions, data transmission instructions, logical calculation instructions, data encryption instructions, and code modification instructions.
[0021] Optionally, the obtaining the data interaction records between the instruction initiating device and each instruction receiving device in the historical time period includes:
[0022] Receive the historical time period set by the operator of the instruction initiating device, where the historical time period consists of a start time point and an end time point;
[0023] Directly send the test response instruction transmitted back by the instruction initiating device to the database that supports the operation of the CAT.1 module;
[0024] Directly forward the test response instruction in the database to the wireless transmission unit in the CAT.1 module for verification. If the verification is passed, when the database responds to the test response instruction, establish a connection channel between the instruction initiating device and the database, and use the connection channel to send the historical time period composed of the start time point and the end time point to the database;
[0025] Search in the database using the start time point and the end time point as search conditions to obtain the data interaction records between the instruction initiating device and other instruction receiving devices, and the structure of the data interaction record is:
[0026] ;
[0027] Among them, represents the data interaction record between the jth instruction initiating device and other instruction receiving devices, represents the number of data interaction times between the jth instruction initiating device and the ith instruction receiving device, and m represents the number of instruction receiving devices.
[0028] Optionally, constructing a data interaction network centered on the instruction initiating device according to the data interaction records in the historical time period includes:
[0029] Determine the data flow directionality of the instruction initiating device when performing data interaction with other instruction receiving devices according to the data interaction instruction initiated by the instruction initiating device, where the data flow directionality is divided into unidirectionality and bidirectionality;
[0030] Optimize the data interaction record according to the data flow directionality to obtain a flow interaction record, where the structure of the flow interaction record is:
[0031] ;
[0032] Among them, represents the flow interaction record between the jth instruction initiating device and other instruction receiving devices, represents the number of data interaction times between the jth instruction initiating device and the 1st instruction receiving device, and the data flow directionality of the data interaction is bidirectional, represents the number of data interaction times between the jth instruction initiating device and the 2nd instruction receiving device, and the data flow directionality of the data interaction is unidirectional, and it is the jth instruction initiating device that flows data to the 2nd instruction receiving device, represents the number of data interactions between the j-th instruction initiating device and the m-th instruction receiving device, and the data flow direction of the data interaction is unidirectional, where the m-th instruction receiving device flows data to the j-th instruction initiating device;
[0033] Construct a data interaction network centered on the instruction initiating device based on the flow interaction record.
[0034] Optionally, the constructing a data interaction network centered on the instruction initiating device according to the flow interaction record includes:
[0035] Take the instruction initiating device as the center point, and calculate the radius value according to the number of instruction receiving devices in the flow interaction record;
[0036] Distribute the instruction receiving devices evenly around the instruction initiating device, and the distance between each instruction receiving device and the instruction initiating device is the radius value;
[0037] Construct a weighted connection line including direction according to the flow interaction record;
[0038] Connect the instruction initiating device and each instruction receiving device with the weighted connection line to obtain the data interaction network, where the connection direction of the weighted connection line is the same as the data flow direction recorded in the flow interaction record.
[0039] Optionally, the calculating the radius value according to the number of instruction receiving devices in the flow interaction record includes:
[0040] Calculate the radius value according to the following formula:
[0041] ;
[0042] where, represents the radius value with the j-th instruction initiating device as the center point, m represents the number of instruction receiving devices, represents the preset maximum radius value, and the maximum radius value needs to be less than or equal to the number of instruction receiving devices.
[0043] Optionally, the formula for calculating the weight of the weighted connection line is:
[0044] ;
[0045] where, represents the weight of the weighted connection line between the j-th instruction initiating device and the i-th instruction receiving device, represents the number of data interactions between the j-th instruction initiating device and the i-th instruction receiving device, k represents the preset slope value, and b represents the preset offset value.
[0046] Optionally, confirming the optimal data interaction flow direction according to the data interaction network includes:
[0047] Calculating a weight judgment value according to the following formula:
[0048] ;
[0049] where represents the weight judgment value of the j-th instruction initiating device, and m is the number of instruction receiving devices;
[0050] Judging the magnitude relationship between the weight of each weight connection line in the data interaction network and the weight judgment value;
[0051] Identifying the instruction receiving devices corresponding to the weights less than or equal to the weight judgment value as low-priority devices, and identifying the instruction receiving devices corresponding to the weights greater than the weight judgment value as high-priority devices, respectively obtaining a low-priority device set and a high-priority device set, where the CAT.1 module preferentially serves the high-priority device set;
[0052] Sorting each instruction receiving device in the low-priority device set and the high-priority device set respectively according to the principle that the CAT.1 module serves bidirectionality first and then unidirectionality to obtain the optimal data interaction flow direction.
[0053] To achieve the above object, the present invention also provides a data interaction system for multiple embedded devices based on a CAT.1 module, including:
[0054] An instruction receiving module, configured to receive a data interaction instruction initiated by an instruction initiating device, and send the data exchange instruction to the CAT.1 module. Among them, the device type of the instruction initiating device is embedded. Determine the type of the data exchange instruction in the CAT.1 module to obtain an instruction type, and determine other embedded devices that have the possibility of data interaction with the instruction initiating device according to the instruction type to obtain one or more instruction receiving devices;
[0055] An interaction network construction module, configured to obtain the data interaction records between the instruction initiating device and each instruction receiving device in the historical time period, and construct a data interaction network centered on the instruction initiating device according to the data interaction records in the historical time period:
[0056] An interaction flow calculation module, configured to confirm the optimal data interaction flow direction according to the data interaction network;
[0057] A CAT.1 module implementation module, configured to implement the data interaction between the instruction initiating device and other instruction receiving devices by using the CAT.1 module based on the optimal data interaction flow direction, and achieve the purpose of data interaction of multiple embedded devices.
[0058] To solve the above problems, the present invention also provides an electronic device, which includes:
[0059] at least one processor; and,
[0060] a memory communicatively connected to the at least one processor; wherein,
[0061] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to implement the above-mentioned data interaction method for multiple embedded devices based on the CAT.1 module.
[0062] To solve the above problems, the present invention also provides a computer-readable storage medium, which stores at least one instruction, and the at least one instruction is executed by a processor in an electronic device to implement the above-mentioned data interaction method for multiple embedded devices based on the CAT.1 module.
[0063] Compared with the problems in the background art, the present invention first receives a data interaction instruction initiated by an instruction initiating device, and sends the data exchange instruction to the CAT.1 module. Among them, the device type of the instruction initiating device is embedded. Receiving an interaction request from the instruction initiating device indicates the need and starting point of data interaction; then, determine the type of the data exchange instruction in the CAT.1 module to obtain the instruction type, and determine other embedded devices that may have data interaction with the instruction initiating device according to the instruction type to obtain one or more instruction receiving devices. It can be seen that according to the instruction type, the CAT.1 module can identify other embedded devices that may need to participate in data interaction, which helps to narrow the interaction scope and only communicate with relevant devices, improving communication efficiency; further, obtain the data interaction records between the instruction initiating device and each instruction receiving device in the historical time period, and construct a data interaction network centered on the instruction initiating device according to the data interaction records in the historical time period. Confirm the optimal data interaction flow direction according to the data interaction network, and use historical data to construct a data interaction network diagram centered on the instruction initiating device. This network diagram can reveal the connection strength and data flow between devices, thereby helping the CAT.1 module to determine which instruction receiving devices need to be served preferentially, that is, based on the optimal data interaction flow direction, use the CAT.1 module to implement data interaction between the instruction initiating device and other instruction receiving devices, and complete the purpose of data interaction among multiple embedded devices. Therefore, the main purpose of the data interaction method and system for multiple embedded devices based on the CAT.1 module proposed by the present invention is to construct the optimal data interaction flow direction between embedded devices, help the CAT.1 module confirm the service priority of embedded devices, so as to avoid the problem that the CAT.1 module cannot respond in time due to the need to provide data interaction for a large number of embedded devices. Brief Description of the Drawings
[0064] Figure 1 It is a schematic flowchart of a data interaction method for multiple embedded devices based on a CAT.1 module provided by an embodiment of the present invention;
[0065] Figure 2 It is a functional module diagram of a data interaction system for multiple embedded devices based on a CAT.1 module provided by an embodiment of the present invention;
[0066] Figure 3 It is a schematic structural diagram of an electronic device for implementing the data interaction method for multiple embedded devices based on the CAT.1 module provided by an embodiment of the present invention.
[0067] The implementation of the object, functional features and advantages of the present invention will be further described with reference to the embodiments and the accompanying drawings. Detailed Embodiment
[0068] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0069] The embodiments of the present application provide a data interaction method for multiple embedded devices based on a CAT.1 module. The execution subject of the data interaction method for multiple embedded devices based on the CAT.1 module includes, but is not limited to, at least one of electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiments of the present application. In other words, the data interaction method for multiple embedded devices based on the CAT.1 module can be executed by software or hardware installed on a terminal device or a server device. The server includes, but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
[0070] Embodiment 1:
[0071] Refer to Figure 1 As shown, it is a schematic flowchart of a data interaction method for multiple embedded devices based on a CAT.1 module provided by an embodiment of the present invention. In this embodiment, the data interaction method for multiple embedded devices based on the CAT.1 module includes:
[0072] S1. Receive a data interaction instruction initiated by an instruction initiating device, and send the data exchange instruction to the CAT.1 module, where the device type of the instruction initiating device is embedded.
[0073] It should be noted that the device type of the instruction initiating device in the embodiments of the present invention is embedded. Exemplarily, Xiao Zhang is an engineer in an automotive parts manufacturing enterprise. There are multiple production lines in this automotive parts manufacturing enterprise. Each production line can independently produce automotive parts, and each production line includes a programmable logic controller (PLC) and a microcontroller (MCU) for controlling the production links of the production line. The network environment where the production line is located includes routers, switches, monitoring devices, etc. Then, the programmable logic controller (PLC), the microcontroller (MCU), routers, switches, monitoring devices, etc. can all be referred to as embedded devices.
[0074] Exemplarily, if Xiao Zhang wants to adjust the device parameters of a certain production link in the production line, he plans to rewrite the logic code through the PLC. Therefore, he first uses the PLC to initiate a data interaction instruction to notify all other embedded devices that have a relevant relationship with the purpose of rewriting the logic code.
[0075] In addition, the CAT.1 module (Category 1 module) is a communication module implemented based on LTE (Long-Term Evolution) technology. The CAT.1 module supports some basic functions in the LTE network, and has a low data transmission rate and low cost. It is generally applied in less complex data interaction environments, especially in the data interaction between the embedded devices described in the embodiments of the present invention. Further, sending the data exchange instruction to the CAT.1 module includes:
[0076] Starting the CAT.1 module, where the CAT.1 module includes a wireless transmission unit, a modem, a radio frequency front end, and a controller;
[0077] Identifying the wireless network where the instruction initiating device is located to obtain the available wireless network and the IP address of the instruction initiating device;
[0078] Sending the data exchange instruction to the CAT.1 module using the available wireless network. At the same time, when the CAT.1 module receives the data exchange instruction, generating a data test instruction using the wireless transmission unit;
[0079] Sending the data test instruction to the IP address of the instruction initiating device using the available wireless network and waiting for the test response instruction returned by the instruction initiating device;
[0080] If the CAT.1 module successfully receives the test response instruction, receiving the data exchange instruction using the wireless transmission unit.
[0081] Exemplarily, Xiao Zhang plans to modify the logic code through the PLC. Therefore, the PLC is used to initiate a data interaction instruction first. In this case, the PLC is the instruction-initiating device. Therefore, before executing the PLC to modify the logic code, the CAT.1 module needs to be started. The role of the CAT.1 module is to assist the PLC in distributing the task of modifying the logic code to other embedded devices that have a relevant relationship with the modified logic code. To ensure the security of the entire process, in the embodiment of the present invention, it is necessary to first confirm the feasibility of the data interaction between the CAT.1 module and the PLC. Therefore, the wireless transmission unit of the CAT.1 module is used to generate a data test instruction, and the data test instruction is used to test whether the PLC can return a test response instruction.
[0082] S2. Determine the type of the data exchange instruction in the CAT.1 module to obtain the instruction type, and determine one or more instruction-receiving devices that have the possibility of data interaction with the instruction-initiating device according to the instruction type.
[0083] It should be explained that different types of data interaction instructions may involve different embedded devices. Therefore, determining the type of the data interaction instruction can achieve a more refined screening of the instruction-receiving devices.
[0084] Specifically, determining the type of the data exchange instruction in the CAT.1 module to obtain the instruction type includes:
[0085] Analyze the data exchange instruction in the wireless transmission unit to obtain the data interaction purpose;
[0086] Based on the data interaction purpose, confirm the instruction type. Among them, the instruction type includes arithmetic calculation instructions, data transmission instructions, logical calculation instructions, data encryption instructions, and code modification instructions.
[0087] Exemplarily, if Xiao Zhang plans to modify the logic code through the PLC, the corresponding data interaction instruction belongs to the code modification type. Arithmetic calculation instructions include addition (ADD), subtraction (SUB), multiplication (MUL), division (DIV), etc. Logical calculation instructions include performing operations such as AND, OR, NOT, XOR, etc., or performing unconditional jumps (JUMP), conditional jumps, and loop controls.
[0088] It should be noted that different embedded devices correspond to different instruction types. For example, if a PLC is used as an instruction-initiating device to plan to modify logic code, then the embedded device that needs to execute the code must be related to the code modification instruction type, such as the PLCs on other production lines. Through the instruction type, the instruction-receiving devices that may have data interaction with the instruction-initiating device can be initially identified. For example, if Xiao Zhang wants to obtain the production status of automotive parts on the production line through a microcontroller (MCU), then a data transmission instruction needs to be executed to obtain the production monitoring diagram of the production line, and the devices related to the data transmission instruction type may include monitoring devices, etc.
[0089] S3. Obtain the data interaction records between the instruction-initiating device and each instruction-receiving device in the historical time period, and construct a data interaction network centered on the instruction-initiating device based on the data interaction records in the historical time period.
[0090] Specifically, the obtaining of the data interaction records between the instruction-initiating device and each instruction-receiving device in the historical time period includes:
[0091] Receive the historical time period set by the operator of the instruction-initiating device, where the historical time period consists of a start time point and an end time point;
[0092] Directly send the test response instruction returned by the instruction-initiating device to the database that supports the operation of the CAT.1 module;
[0093] Directly forward the test response instruction in the database to the wireless transmission unit in the CAT.1 module for verification. If the verification is passed, when the database responds to the test response instruction, establish a connection channel between the instruction-initiating device and the database, and use the connection channel to send the historical time period composed of the start time point and the end time point to the database;
[0094] Search for the data interaction records between the instruction-initiating device and other instruction-receiving devices in the database with the start time point and the end time point as search conditions.
[0095] It should be noted that when the CAT.1 module runs, a large amount of module operation data, network traffic data, device interaction data, etc. will be generated. The database that supports the operation of the CAT.1 module is used to store such data. Since there is a direct correlation between data interaction between the database and the CAT.1 module, in order to maximize the simplification of the process, in the embodiment of the present invention, the test response instruction returned by the instruction initiating device is directly sent to the database. If the database receives the test response instruction, it will forward the test response instruction to the CAT.1 module for execution and confirmation. If the CAT.1 module confirms that the test response instruction has been received by the infinite transmission unit before (i.e., the above verification process), the database will respond to the test response instruction.
[0096] Further, the structure of the data interaction record is:
[0097] ;
[0098] Among them, represents the data interaction record between the j-th instruction initiating device and other instruction receiving devices, represents the number of data interactions between the j-th instruction initiating device and the i-th instruction receiving device, and m represents the number of instruction receiving devices.
[0099] Exemplarily, if Xiao Zhang plans to modify the logic code through the PLC, and there are 5 production lines where Xiao Zhang is located, and there are 3 PLCs on each production line, then in the embodiment of the present invention, it is necessary to obtain the data interaction records between the PLC and the other 14 PLCs, that is, The value of is 14.
[0100] Specifically, constructing a data interaction network centered on the instruction initiating device according to the data interaction records in the historical time period includes:
[0101] Determine the data flow directionality of the instruction initiating device when performing data interaction with other instruction receiving devices according to the data interaction instructions initiated by the instruction initiating device, where the data flow directionality is divided into unidirectionality and bidirectionality;
[0102] Optimize the data interaction record according to the data flow directionality to obtain a flow interaction record, where the structure of the flow interaction record is:
[0103] ;
[0104] Among them, represents the flow interaction record between the j-th instruction initiating device and other instruction receiving devices, represents the number of data interactions between the j-th instruction initiating device and the 1st instruction receiving device, and the data flow directionality of the data interaction is bidirectional, represents the number of data interactions between the j-th instruction initiating device and the second instruction receiving device, and the data flow direction of the data interaction is unidirectional, that is, the j-th instruction initiating device flows data to the second instruction receiving device. represents the number of data interactions between the j-th instruction initiating device and the m-th instruction receiving device, and the data flow direction of the data interaction is unidirectional, that is, the m-th instruction receiving device flows data to the j-th instruction initiating device;
[0105] According to the flow interaction record, a data interaction network centered on the instruction initiating device is constructed.
[0106] Exemplarily, there are 5 production lines in total, and each production line has 3 PLCs. Then, in the embodiment of the present invention, it is necessary to obtain the data interaction records of the PLC with the other 14 PLCs, that is, the value of m is 14. If it is found through the data interaction records in the historical time period that the data interaction between the PLC used by Xiao Zhang and the other 14 PLCs is unidirectional and bidirectional, then it is necessary to sort out the specific data flow directions from the PLC used by Xiao Zhang to the other 14 PLCs, so as to construct the above-mentioned flow interaction record.
[0107] Further, the constructing a data interaction network centered on the instruction initiating device according to the flow interaction record includes:
[0108] Taking the instruction initiating device as the center point, and calculating the radius value according to the number of instruction receiving devices in the flow interaction record;
[0109] Distributing the instruction receiving devices evenly around the instruction initiating device, and the distance between each instruction receiving device and the instruction initiating device is the radius value;
[0110] Constructing a weighted connection line including direction according to the flow interaction record;
[0111] Connecting the instruction initiating device and each instruction receiving device with the weighted connection line to obtain the data interaction network, wherein the connection direction of the weighted connection line is the same as the data flow direction recorded in the flow interaction record.
[0112] Specifically, the calculating the radius value according to the number of instruction receiving devices in the flow interaction record includes:
[0113] Calculating the radius value according to the following formula:
[0114] ;
[0115] wherein, represents the radius value with the j-th instruction initiating device as the center point, and m represents the number of instruction receiving devices. It represents a pre-set maximum radius value, and the maximum radius value needs to be less than or equal to the number of instruction receiving devices.
[0116] Exemplarily, after taking the PLC used by the above-mentioned Xiaozhang as the origin point, the PLC used by Xiaozhang is the instruction initiating device. Assuming that there are 30 instruction receiving devices for the PLC used by Xiaozhang, then according to the above formula, the radius value of the PLC used by Xiaozhang can be calculated. It can be understood that the larger the number of instruction receiving devices, the larger the corresponding radius value.
[0117] Furthermore, the weighted connection line described in the embodiment of the present invention includes two important parameters. The first is the direction, and the second is the weight. The direction mainly depends on the upward arrow symbol in the above-mentioned flow interaction record. For example, If it represents that the data flow direction of data interaction is bidirectional, then both ends of the weighted connection line between the j-th instruction initiating device and the first instruction receiving device have arrows, indicating bidirectionality. For example, If it represents that the j-th instruction initiating device flows data to the second instruction receiving device, then for the weighted connection line between the j-th instruction initiating device and the second instruction receiving device, only the port of the second instruction receiving device has an arrow, which means that the j-th instruction initiating device flows data to the second instruction receiving device.
[0118] In addition, the second important parameter of the weighted connection line is the weight, and the size of the weight is positively correlated with the number of data interactions. That is, the larger the number of data interactions, the larger the weight of the weighted connection line. Then, in the performance of the data interaction network, the weighted connection line is thicker. On the contrary, the smaller the number of data interactions, the thinner the weighted connection line. Specifically, the calculation formula for the weight of the weighted connection line is:
[0119] ;
[0120] Wherein, represents the weight of the weighted connection line between the j-th instruction initiating device and the i-th instruction receiving device. represents the number of data interactions between the j-th instruction initiating device and the i-th instruction receiving device, k represents a pre-set slope value, and b represents a pre-set offset value.
[0121] According to the above description, each instruction receiving device and the instruction initiating device have a corresponding weighted connection line. And because the weighted connection line has distinctions in direction and thickness, by connecting the instruction initiating device and each instruction receiving device with different weighted connection lines, a data interaction network can be obtained with the instruction initiating device as the center and the instruction receiving devices dispersed around the instruction initiating device.
[0122] S4. Confirm the optimal data interaction flow direction according to the data interaction network.
[0123] It should be noted that since the communication ability of the CAT.1 module is relatively weak, if it responds to the requirements of a large number of instruction initiating devices in a short period of time, the CAT.1 module needs to bear a greater communication burden. Therefore, confirming the optimal data interaction flow direction of each instruction initiating device can reduce the communication burden of the CAT.1 module. Specifically, the step of confirming the optimal data interaction flow direction according to the data interaction network includes:
[0124] Calculate the weight judgment value according to the following formula:
[0125] ;
[0126] where represents the weight judgment value of the j-th instruction initiating device, and m is the number of instruction receiving devices;
[0127] Judge the magnitude relationship between the weight of each weight connection line in the data interaction network and the weight judgment value;
[0128] Identify the instruction receiving devices corresponding to the weights less than or equal to the weight judgment value as low-priority devices, and identify the instruction receiving devices corresponding to the weights greater than the weight judgment value as high-priority devices, respectively obtaining a low-priority device set and a high-priority device set. Among them, the CAT.1 module preferentially serves the high-priority device set;
[0129] According to the principle that the CAT.1 module serves bidirectionality first and then unidirectionality, sort each instruction receiving device in the low-priority device set and the high-priority device set respectively to obtain the optimal data interaction flow direction.
[0130] Exemplarily, if the value calculated through the above weight judgment value is 0.5, it means that it is necessary to further judge the magnitude relationship between 0.5 and , that is, sequentially judge the magnitude relationship between 0.5 and the weight of each weight connection line, so as to identify the corresponding instruction receiving device as a low-priority device or a high-priority device.
[0131] Exemplarily, assume that there are 10 low-priority devices in the low-priority device set and 5 high-priority devices in the high-priority device set. Then, among the 10 low-priority devices and 5 high-priority devices, serve each instruction receiving device in turn according to the principle of serving bidirectionality first and then unidirectionality, so as to obtain the optimal data interaction flow direction.
[0132] S5. Based on the optimal data interaction flow direction, use the CAT.1 module to implement data interaction between the instruction initiating device and other instruction receiving devices, so as to achieve the purpose of data interaction among multiple embedded devices.
[0133] It should be explained that the CAT.1 module includes a wireless transmission unit, a modem, a radio frequency front end, and a controller. Among them, the wireless transmission unit is responsible for testing the connectivity of the instruction initiating device, and at the same time is responsible for converting the signal between the instruction initiating device and the instruction receiving device into a wireless signal for transmission. The modem is responsible for modulating and demodulating the wireless signal. The radio frequency front end is responsible for amplifying and filtering the wireless signal. The controller is responsible for executing data interaction between the instruction initiating device and other instruction receiving devices according to the optimal data interaction flow direction. In other words, in the embodiment of the present invention, the optimal data interaction flow direction is transmitted to the controller, and the controller controls the wireless transmission unit, the modem, and the radio frequency front end based on the optimal data interaction flow direction to implement data interaction between the instruction initiating device and other instruction receiving devices, so as to achieve the purpose of data interaction.
[0134] Compared with the problems described in the background technology, the present invention first receives a data interaction instruction initiated by an instruction initiating device and sends the data exchange instruction to the CAT.1 module. Among them, the device type of the instruction initiating device is embedded. Receiving an interaction request from the instruction initiating device indicates the need and starting point of data interaction. Then, determine the type of the data exchange instruction in the CAT.1 module to obtain the instruction type, and determine other embedded devices that may have data interaction with the instruction initiating device according to the instruction type to obtain one or more instruction receiving devices. It can be seen that according to the instruction type, the CAT.1 module can identify other embedded devices that may need to participate in data interaction, which helps to narrow the interaction range and only communicate with relevant devices, improving communication efficiency. Further, obtain the data interaction records between the instruction initiating device and each instruction receiving device in the historical time period, and construct a data interaction network centered on the instruction initiating device according to the data interaction records in the historical time period. Confirm the optimal data interaction flow direction according to the data interaction network, and construct a data interaction network diagram centered on the instruction initiating device using historical data. This network diagram can reveal the connection strength and data flow direction between devices, so as to help the CAT.1 module determine which instruction receiving devices need to be served preferentially, that is, based on the optimal data interaction flow direction, use the CAT.1 module to implement data interaction between the instruction initiating device and other instruction receiving devices, so as to achieve the purpose of data interaction among multiple embedded devices. Therefore, the main purpose of the data interaction method and system for multiple embedded devices based on the CAT.1 module proposed by the present invention is to construct the optimal data interaction flow direction between embedded devices, help the CAT.1 module confirm the service priority of embedded devices, so as to avoid the problem that the CAT.1 module cannot respond in time due to the need to provide data interaction for a large number of embedded devices.
[0135] Example 2:
[0136] As Figure 2 shown, it is a functional block diagram of a data interaction system for multiple embedded devices based on a CAT.1 module provided by an embodiment of the present invention.
[0137] The data interaction system 100 for multiple embedded devices based on a CAT.1 module according to the present invention can be installed in an electronic device. According to the functions implemented, the data interaction system 100 for multiple embedded devices based on a CAT.1 module can include an instruction receiving module 101, an interaction network construction module 102, an interaction flow calculation module 103, and a CAT.1 module implementation module 104. The modules in the present invention can also be referred to as units, which refer to a series of computer program segments that can be executed by a processor of an electronic device and can complete fixed functions, and are stored in the memory of the electronic device.
[0138] The instruction receiving module 101 is used to receive a data interaction instruction initiated by an instruction initiating device, send the data exchange instruction to the CAT.1 module. Among them, the device type of the instruction initiating device is embedded. Determine the type of the data exchange instruction in the CAT.1 module to obtain an instruction type, and determine other embedded devices that have the possibility of data interaction with the instruction initiating device according to the instruction type to obtain one or more instruction receiving devices;
[0139] The interaction network construction module 102 is used to obtain the data interaction records between the instruction initiating device and each instruction receiving device in a historical time period, and construct a data interaction network centered on the instruction initiating device according to the data interaction records in the historical time period;
[0140] The interaction flow calculation module 103 is used to confirm the optimal data interaction flow according to the data interaction network;
[0141] The CAT.1 module implementation module 104 is used to implement the data interaction between the instruction initiating device and other instruction receiving devices based on the optimal data interaction flow by using the CAT.1 module, so as to achieve the purpose of data interaction among multiple embedded devices.
[0142] Specifically, each module in the data interaction system 100 for multiple embedded devices based on a CAT.1 module in the embodiment of the present invention adopts the same technical means as those in the Figure 1 data interaction method for multiple embedded devices based on a CAT.1 module described above, and can produce the same technical effects, which will not be elaborated here.
[0143] Example 3:
[0144] As shown Figure 3 in the figure, it is a schematic structural diagram of an electronic device for implementing a data interaction method for multiple embedded devices based on a CAT.1 module provided by an embodiment of the present invention.
[0145] The electronic device 1 may include a processor 10, a memory 11, a bus 12, and a communication interface 13, and may further include a computer program stored in the memory 11 and executable on the processor 10, such as a data interaction program for multiple embedded devices based on a CAT.1 module.
[0146] Among them, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as the mobile hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the electronic device 1. Further, the memory 11 may include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 can be used not only to store application software installed on the electronic device 1 and various types of data, such as the code of a data interaction program for multiple embedded devices based on a CAT.1 module, but also to temporarily store data that has been output or will be output.
[0147] The processor 10 may be composed of integrated circuits in some embodiments. For example, it may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same or different functions packaged together, including a combination of one or more Central Processing Units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control core (Control Unit) of the electronic device, connecting various components of the entire electronic device through various interfaces and circuits, and by running or executing programs or modules stored in the memory 11 (such as a data interaction program for multiple embedded devices based on a CAT.1 module, etc.), and calling data stored in the memory 11, to execute various functions of the electronic device 1 and process data.
[0148] The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to implement connection communication between the memory 11 and at least one processor 10, etc.
[0149] Figure 3 Only the electronic device with components is shown. Those skilled in the art can understand that Figure 2 the shown structure does not constitute a limitation on the electronic device 1, and it may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0150] For example, although not shown, the electronic device 1 may further include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so as to implement functions such as charging management, discharging management, and power consumption management through the power management device. The power source may also include any components such as one or more DC or AC power sources, a recharge device, a power failure detection circuit, a power converter or inverter, a power status indicator, etc. The electronic device 1 may also include various sensors, a Bluetooth module, a Wi-Fi module, etc., which will not be elaborated here.
[0151] Furthermore, the electronic device 1 may further include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.
[0152] Optionally, the electronic device 1 may further include a user interface. The user interface may be a display, an input unit (such as a keyboard), and optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) toucher, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display the information processed in the electronic device 1 and to display a visual user interface.
[0153] It should be understood that the above embodiments are only for illustration purposes and are not limited by this structure in the scope of the patent application.
[0154] The data interaction program of multiple embedded devices based on the CAT.1 module stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve the following:
[0155] Receive a data interaction instruction initiated by an instruction initiating device, and send the data exchange instruction to the CAT.1 module, where the device type of the instruction initiating device is embedded;
[0156] Determine the type of the data exchange instruction in the CAT.1 module to obtain the instruction type, and determine other embedded devices that have the possibility of data interaction with the instruction initiating device according to the instruction type to obtain one or more instruction receiving devices;
[0157] Obtain the data interaction records between the instruction initiating device and each instruction receiving device in the historical time period, and construct a data interaction network centered on the instruction initiating device according to the data interaction records in the historical time period;
[0158] Confirm the optimal data interaction flow direction according to the data interaction network;
[0159] Based on the optimal data interaction flow direction, use the CAT.1 module to implement the data interaction between the instruction initiating device and other instruction receiving devices, and achieve the purpose of data interaction of multiple embedded devices.
[0160] Specifically, for the specific implementation method of the above instructions by the processor 10, reference can be made to Figures 1 to 2 the description of the relevant steps in the corresponding embodiment, which will not be elaborated here.
[0161] Further, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory).
[0162] The present invention also provides a computer-readable storage medium. The readable storage medium stores a computer program, and when the computer program is executed by the processor of an electronic device, it can achieve the following:
[0163] Receive a data interaction instruction initiated by an instruction initiating device, and send the data exchange instruction to the CAT.1 module, where the device type of the instruction initiating device is embedded;
[0164] Determine the type of the data exchange instruction in the CAT.1 module to obtain the instruction type, and determine other embedded devices that have the possibility of data interaction with the instruction initiating device according to the instruction type, so as to obtain one or more instruction receiving devices;
[0165] Obtain the data interaction records between the instruction initiating device and each instruction receiving device in the historical time period, and construct a data interaction network centered on the instruction initiating device according to the data interaction records in the historical time period;
[0166] Confirm the optimal data interaction flow direction according to the data interaction network;
[0167] Based on the optimal data interaction flow direction, use the CAT.1 module to implement the data interaction between the instruction initiating device and other instruction receiving devices, so as to achieve the purpose of data interaction among multiple embedded devices.
[0168] The module described as a separate component may or may not be physically separated. The component shown as a module may or may not be a physical unit, that is, it may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0169] In addition, each functional module in various embodiments of the present invention may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit. The above integrated unit may be implemented in the form of hardware, or in the form of a combination of hardware and software functional modules.
[0170] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention.
[0171] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A data interaction method for multiple embedded devices based on CAT.1 module, characterized in that: The method comprises: Receive a data exchange instruction initiated by an instruction initiating device, and send the data exchange instruction to the CAT.1 module, wherein the device type of the instruction initiating device is embedded; Determine the type of data exchange instruction in the CAT.1 module, obtain the instruction type, determine other embedded devices that have data exchange possibilities with the instruction initiating device according to the instruction type, and obtain one or more instruction receiving devices; Acquire the data interaction records between the instruction initiating device and each instruction receiving device in the historical time period, and construct a data interaction network centered on the instruction initiating device according to the data interaction records in the historical time period; Determining an optimal data interaction flow direction according to the data interaction network; Based on the optimal data interaction flow, the CAT.1 module is used to realize the data interaction between the command initiating device and other command receiving devices, thus completing the data interaction of multiple embedded devices; The step of sending the data exchange instruction to the CAT.1 module includes: Start the CAT.1 module, wherein the CAT.1 module includes a wireless transmission unit, a modem, a radio frequency front end and a controller; Confirm the wireless network where the command initiating device is located, obtain the available wireless network, and the IP address of the command initiating device; The data exchange instruction is sent to the CAT.1 module using the available wireless network, and when the CAT.1 module receives the data exchange instruction, the wireless transmission unit is used to generate a data test instruction; Use the available wireless network to send the data test command to the IP address of the command initiating device, and wait for the test response command sent back by the command initiating device; If the CAT.1 module successfully receives the test response command, it uses the wireless transmission unit to receive the data exchange command; Wherein, determining the type of the data exchange instruction in the CAT.1 module to obtain the instruction type includes: Parsing the data exchange instruction in the wireless transmission unit to obtain the data interaction purpose; Determine the instruction type based on the data interaction purpose, wherein the instruction type includes arithmetic calculation instructions, data transmission instructions, logic calculation instructions, data encryption instructions and code modification instructions; The step of acquiring the data interaction record between the instruction initiating device and each instruction receiving device in the historical time period includes: Receiving a historical time period set by an operator of a command initiating device, wherein the historical time period consists of a start time point and an end time point; Send the test response command returned by the command initiating device directly to the database supporting the operation of the CAT.1 module; The test response instruction in the database is directly forwarded to the wireless transmission unit in the CAT.1 module for verification. If the verification passes, when the database is used to respond to the test response instruction, a connection channel between the instruction initiating device and the database is established, and the historical time period consisting of the starting time point and the ending time point is sent to the database using the connection channel; The data interaction record between the instruction initiating device and other instruction receiving devices is obtained by searching the database using the start time point and the end time point as search conditions, and the structure of the data interaction record is: ; in, Indicates the data interaction record between the jth instruction initiating device and other instruction receiving devices. represents the number of data interactions between the j-th instruction initiating device and the ith instruction receiving device, and m represents the number of instruction receiving devices.
2. The data interaction method for multiple embedded devices based on CAT.1 module as claimed in claim 1, characterized in that: The data interaction network centered on the instruction initiating device is constructed based on the data interaction records of the historical time period, including: According to the data interaction instruction initiated by the instruction initiating device, determine the data flow direction of the instruction initiating device in performing data interaction with other instruction receiving devices, wherein the data flow direction is divided into unidirectional and bidirectional; According to the data flow directionality, the data interaction record is optimized to obtain the flow interaction record, wherein the structure of the flow interaction record is: ; in, It represents the flow interaction record between the jth instruction initiating device and other instruction receiving devices. Indicates the number of data interactions between the jth instruction initiator and the first instruction receiver, and the data flow direction of the data interaction is bidirectional. Indicates the number of data interactions between the jth instruction initiating device and the second instruction receiving device, and the data flow direction of the data interaction is unidirectional, that is, the jth instruction initiating device flows data to the second instruction receiving device. Indicates the number of data interactions between the jth instruction initiating device and the mth instruction receiving device, and the data flow direction of the data interaction is unidirectional, that is, the mth instruction receiving device flows data to the jth instruction initiating device; According to the flow interaction records, a data interaction network centered on the instruction initiating device is constructed.
3. The data interaction method of multiple embedded devices based on CAT.1 module as claimed in claim 2, characterized in that: The data interaction network centered on the instruction initiating device is constructed according to the flow interaction record, including: The command initiating device is taken as the dot, and the radius value is calculated according to the number of command receiving devices in the flow interaction record; The instruction receiving devices are evenly distributed around the instruction issuing device, and the distance between each instruction receiving device and the instruction issuing device is the radius value; According to the flow interaction records, weighted connection lines including directions are constructed; The instruction initiating device and each instruction receiving device are connected by weighted connection lines to obtain the data interaction network, wherein the connection direction of the weighted connection lines is the same as the data flow direction recorded in the flow interaction record.
4. The data interaction method for multiple embedded devices based on CAT.1 modules as claimed in claim 3, characterized in that: The step of calculating the radius value according to the number of instruction receiving devices in the flow interaction record includes: The radius value is calculated according to the following formula: ; in, represents the radius value of the jth instruction initiating device as a dot, m represents the number of instruction receiving devices, Indicates the preset maximum radius value, and the maximum radius value must be less than or equal to the number of command receiving devices.
5. The data interaction method for multiple embedded devices based on CAT.1 module as claimed in claim 3, characterized in that: The calculation formula of the weight of the weighted connecting line is: ; in, represents the weight of the weighted connection line between the jth instruction initiator and the ith instruction receiver, represents the number of data interactions between the j-th instruction initiating device and the ith instruction receiving device, k represents a preset slope value, and b represents a preset bias value.
6. The data interaction method of multiple embedded devices based on CAT.1 module as claimed in claim 5, characterized in that: Determining the optimal data interaction flow direction according to the data interaction network includes: The weight judgment value is calculated according to the following formula: ; in, represents the weight judgment value of the jth instruction initiating device, and m is the number of the instruction receiving devices; Determine the relationship between the weight of each weight connection line in the data interaction network and the weight judgment value; The command receiving device corresponding to the weight less than or equal to the weight judgment value is confirmed as a low priority device, and the command receiving device corresponding to the weight greater than the weight judgment value is confirmed as a high priority device, and a low priority device set and a high priority device set are obtained respectively, wherein the CAT.1 module gives priority to serving the high priority device set; According to the principle of CAT.1 module serving bidirectionality first and unidirectionality later, each instruction receiving device is sorted in the low-priority device set and the high-priority device set respectively to obtain the optimal data interaction flow.
7. A data interaction system for multiple embedded devices based on CAT.1 modules, characterized in that: A data interaction method for multiple embedded devices based on a CAT.1 module according to any one of claims 1 to 6, the system comprising: The instruction receiving module is used to receive the data exchange instruction initiated by the instruction initiating device, and send the data exchange instruction to the CAT.1 module, wherein the device type of the instruction initiating device is embedded, the type of the data exchange instruction is determined in the CAT.1 module, the instruction type is obtained, and other embedded devices with the possibility of data exchange with the instruction initiating device are determined according to the instruction type, and one or more instruction receiving devices are obtained; The interactive network construction module is used to obtain the data interaction records between the instruction initiating device and each instruction receiving device in the historical time period, and construct a data interaction network centered on the instruction initiating device based on the data interaction records in the historical time period: An interaction flow direction calculation module, used to determine the optimal data interaction flow direction according to the data interaction network; The CAT.1 module implementation module is used to implement data interaction between the instruction initiating device and other instruction receiving devices based on the optimal data interaction flow, using the CAT.1 module to complete the purpose of data interaction between multiple embedded devices.
Citation Information
Patent Citations
Transmission link analysis method, device and equipment and readable storage medium
CN116248509A
Method and system for realizing data interaction of network communication equipment based on edge communication
CN118488062A