Data transmission method, system and computer device for Internet of Things devices
By obtaining the importance and weight of the transmission path of IoT devices, dynamically adjusting the data transmission storage space capacity, solving the problem of unreasonable setting of data transmission storage space capacity of IoT devices, and improving transmission efficiency and stability.
Patent Information
- Application Number
- CN202411570875.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-11-06
AI Technical Summary
In the prior art, the data transmission storage space capacity setting of IoT devices is unreasonable, resulting in low data transmission efficiency and waste of resources, and cannot be reasonably adjusted according to actual conditions.
By obtaining the transmission importance and transmission weight of each transmission path, the target transmission storage space capacity of each type of data is calculated, and the storage space capacity is dynamically adjusted according to the transmission path location distribution and data transmission situation.
It improves the efficiency and stability of data transmission, avoids data transmission chaos and resource waste, and ensures accurate and efficient transmission of data in the LAN.
Smart Images

Figure CN119109862B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network data transmission, and in particular to a data transmission method and system for Internet of Things devices and computer equipment. Background Art
[0002] The data transmission method of IoT devices is not only low-power, but also highly reliable, and is widely used in fields that require real-time monitoring and rapid response. There are usually multiple IoT devices in a local area network. The data of IoT devices is transmitted to the control center through the transmission hub in the local area network. The control center generates feedback data based on the data of each IoT device, and the feedback data can be transmitted to the IoT device through the transmission hub. The distribution of transmission paths in the local area network is complex. In order to ensure the accuracy and efficiency of data transmission in the local area network, it is necessary to reasonably set the transmission storage space capacity of each type of data transmitted in the local area network.
[0003] In the existing method, the transmission storage space capacity of different types of data in the local area network is the same and fixed. For example, the minimum transmission storage space capacity of each type of data is set to the transmission storage space capacity of each type of data in the local area network. This may cause the data transmission storage space capacity to be too small, affecting the efficiency of data transmission in the local area network, and thus causing data transmission chaos; or the maximum transmission storage space capacity of each type of data is set to the transmission storage space capacity of each type of data in the local area network. This may cause the data transmission storage space capacity to be too large, resulting in a waste of resources; making it impossible to reasonably set the corresponding data transmission storage space capacity according to the actual situation of the various data to be transmitted, which is not conducive to the stable and efficient transmission of data in the local area network. Summary of the invention
[0004] In order to solve the technical problem of unreasonable data transmission storage space capacity setting of IoT devices, the purpose of the present invention is to provide a data transmission method, system and computer device for IoT devices. The technical solutions adopted are as follows:
[0005] In a first aspect, an embodiment of the present invention provides a data transmission method for an Internet of Things device, the method comprising the following steps:
[0006] Obtain each transmission path for data transmission within the local area network;
[0007] According to the position distribution of each transmission path in the local area network and the data transmission situation of each transmission path in the first preset time period, the transmission importance of each transmission path is obtained;
[0008] According to the transmission importance of the transmission path connected to each transmission hub and the transmission duration of each type of data transmitted by each transmission hub within the second preset time period, the transmission weight of each type of data transmitted by each transmission hub is obtained;
[0009] According to the transmission weight of each data in different transmission hubs and the preset minimum transmission storage space capacity of each data, the target transmission storage space capacity of each data is obtained.
[0010] Furthermore, the method for obtaining the transmission importance is:
[0011] According to the location distribution of each transmission path in the local area network, the structural influence degree of each transmission path is obtained;
[0012] According to the data transmission situation of each transmission path within the first preset time period, the transmission stability of each transmission path is obtained;
[0013] According to the structural influence degree and transmission stability degree of each transmission path, the transmission importance degree of each transmission path is obtained; wherein the structural influence degree and the transmission stability degree are both positively correlated with the transmission importance degree;
[0014] The transmission importance is specifically quantified as the transmission importance value, and the calculation formula of the transmission importance value is: ; In the formula, is the transmission importance value of the i-th transmission path; is the structural influence value of the i-th transmission path; is the transmission stability of the i-th transmission path.
[0015] Furthermore, the method for obtaining the structural influence degree is:
[0016] For any transmission path, obtain the local path corresponding to the IoT device to the transmission path, and use the local path that does not include the control center as a reference path;
[0017] Obtaining a maximum number of transmission paths based on the number of transmission paths traversed by each reference path;
[0018] The number of transmission paths corresponding to the shortest path between the transmission path and the control center is taken as the second number;
[0019] According to the maximum number and the second number, the structural influence degree of the transmission path is obtained; wherein the maximum number and the structural influence degree are positively correlated; and the second number and the structural influence degree are negatively correlated;
[0020] The structural impact degree is specifically quantified as the structural impact degree value, and the calculation formula of the structural impact degree value is: ; In the formula, is the structural influence value of the i-th transmission path; is the maximum number corresponding to the i-th transmission path; is the second quantity corresponding to the i-th transmission path; is the first preset positive integer.
[0021] Furthermore, the method for obtaining the transmission stability is:
[0022] Determine a time at each preset time interval within the first preset time period, and use it as the target time;
[0023] For any transmission path, the data volume of each type of data transmitted by the transmission path at each target time is obtained, and a vector is constructed as the data transmission vector of the transmission path at the corresponding target time;
[0024] Obtain the cosine similarity of the data transmission vectors at any two adjacent target moments, and use them as the transmission data similarity value;
[0025] The average of all transmission data similarity values is taken as the transmission stability of the transmission path.
[0026] Furthermore, the method for obtaining the transmission weight is:
[0027] According to the transmission importance of the transmission path connected to each transmission hub, the transmission demand degree of each transmission hub is obtained;
[0028] According to the transmission duration of each type of data transmitted by each transmission hub within the second preset time period, the transmission duration ratio of each type of data transmitted by each transmission hub is obtained;
[0029] According to the transmission time ratio of each type of data transmitted by each transmission hub and the transmission demand degree of each transmission hub, the transmission weight of each type of data transmitted by each transmission hub is obtained; wherein the transmission time ratio and the transmission demand degree are both positively correlated with the transmission weight;
[0030] The calculation formula of transmission weight is: ; In the formula, is the transmission weight of the a-th type of data transmitted by the x-th transmission hub; is the transmission demand level of the xth transmission hub; is the transmission time ratio of the ath type of data transmitted by the xth transmission hub; norm is the normalization function.
[0031] Furthermore, the method for obtaining the transmission requirement degree is:
[0032] For any transmission hub, the transmission importance of all transmission paths connected to the transmission hub is accumulated and normalized to obtain the result, which serves as the transmission demand level of the transmission hub.
[0033] Furthermore, the method for obtaining the transmission duration ratio is:
[0034] For any transmission hub and any type of data transmitted by the transmission hub within the second preset time period, the total duration of the transmission hub transmitting the type of data within the second preset time period is obtained as the target duration of the transmission hub transmitting the type of data;
[0035] The ratio of the target duration to the total duration of the second preset time period is used as the transmission duration ratio of the data transmitted by the transmission hub.
[0036] Furthermore, the method for obtaining the target transmission storage space capacity is:
[0037] For any type of data being transmitted, obtain the average value of the transmission weight of the data in each transmission hub as the adjustment weight of the data;
[0038] The product of the adjustment weight of the data and the preset minimum transmission storage space capacity is used as the transmission storage space capacity adjustment value of the data;
[0039] The sum of the preset minimum transmission storage space capacity of the data and the transmission storage space capacity adjustment value is used as the target transmission storage space capacity of the data.
[0040] In a second aspect, another embodiment of the present invention provides a data transmission system for an Internet of Things device, the system comprising:
[0041] A transmission path acquisition module is used to acquire each transmission path for data transmission in the local area network;
[0042] A transmission importance acquisition module, used to acquire the transmission importance of each transmission path according to the location distribution of each transmission path in the local area network and the data transmission situation of each transmission path within a first preset time period;
[0043] A transmission weight acquisition module, used to acquire the transmission weight of each type of data transmitted by each transmission hub according to the transmission importance of the transmission path connected to each transmission hub and the transmission duration of each type of data transmitted by each transmission hub within the second preset time period;
[0044] The target transmission storage space capacity acquisition module is used to obtain the target transmission storage space capacity of each data according to the transmission weight of each data in different transmission hubs and the preset minimum transmission storage space capacity of each data.
[0045] In a third aspect, another embodiment of the present invention provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of any one of the above methods are implemented.
[0046] The present invention has the following beneficial effects:
[0047] The present invention obtains the transmission importance of each transmission path according to the position distribution of each transmission path in the local area network and the data transmission situation of each transmission path within the first preset time period, accurately reflects the importance of each transmission path, and indirectly reflects the importance of the data transmitted by each transmission path; in order to analyze the transmission situation of each type of data, the transmission weight of each type of data transmitted by each transmission hub is obtained according to the transmission importance of the transmission path connected to each transmission hub and the transmission duration of each type of data transmitted by each transmission hub within the second preset time period, accurately reflects the transmission situation of each type of data in each transmission hub, which is conducive to the subsequent accurate adjustment of the transmission storage space capacity of each type of data and improves the data transmission efficiency; and the target transmission storage space capacity of each type of data is obtained according to the transmission weight of each type of data in different transmission hubs and the preset minimum transmission storage space capacity of each type of data, so that each type of data can be transmitted stably and efficiently in the local area network, avoiding the situation where data confusion occurs during the transmission process due to slow data transmission, and making the data transmission efficiency in the local area network faster, more stable and safer. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0049] Figure 1 A schematic flow chart of a data transmission method for an Internet of Things device provided by an embodiment of the present invention;
[0050] Figure 2 A flow chart of a method for obtaining transmission importance provided by an embodiment of the present invention;
[0051] Figure 3 A flow chart of a method for obtaining transmission weights provided by an embodiment of the present invention;
[0052] Figure 4A flow chart of a data transmission system for an Internet of Things device provided by an embodiment of the present invention;
[0053] Figure 5 A schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the data transmission method, system and computer device of an Internet of Things device proposed by the present invention, its specific implementation method, structure, features and effects in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0055] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0056] The following is a detailed description of a data transmission method, system and computer device for an Internet of Things device provided by the present invention in conjunction with the accompanying drawings.
[0057] Embodiment 1:
[0058] The specific scenario of this embodiment is as follows: For better description, this embodiment assumes that there are only three types of devices in a local area network, namely, IoT devices, transmission hubs, and control hubs. Among them, there is only one control hub, and the number of IoT devices and transmission hubs is unlimited. IoT devices and control hubs can be directly connected, or the IoT devices and control hubs can be indirectly connected through the transmission hub. In this embodiment, the connection between the IoT device and the transmission hub, the connection between the IoT device and the control hub, the connection between the transmission hub and the transmission hub, and the connection between the transmission hub and the control hub are all used as transmission paths. All transmission paths and all devices in the local area network are jointly constructed to form the overall structure of the local area network. In order to ensure the stability of the network environment of the local area network, all devices in the local area network are synchronized through the NTP (Network Time Protocol) server, and then parameters are configured according to the needs of different devices, such as data transmission frequency, data format, transmission protocol and other parameters.
[0059] The purpose of this embodiment is: in order to accurately and efficiently transmit various data in the local area network, this embodiment obtains the transmission importance of each transmission path according to the location distribution of the transmission path in the local area network and the data transmitted by the transmission path, and then determines the importance of each transmission hub in the local area network for data transmission according to the transmission importance of the transmission path connected to each transmission hub. In order to analyze the transmission of each type of data in the local area network and ensure the stable and efficient transmission of each type of data in the local area network, this embodiment further analyzes the duration of each type of data transmitted by each transmission hub to determine the importance of each type of data in each transmission hub. The transmission weight of each data transmitted by each transmission hub is obtained according to the transmission importance of the transmission path connected to each transmission hub and the transmission duration of each data transmitted by each transmission hub within the second preset time period, and the transmission status of each data in each transmission hub is determined. Then, according to the transmission weight of each data in different transmission hubs, the preset minimum transmission storage space capacity of each data is accurately adjusted to obtain the target transmission storage space capacity of each data, thereby improving the efficiency of data transmission in the local area network, avoiding the situation where a large amount of data is not transmitted in time and causing data transmission chaos, and ensuring accurate and efficient transmission of data in the local area network.
[0060] This embodiment proposes a data transmission method for an IoT device. Figure 1 , which shows a schematic flow chart of a data transmission method of an Internet of Things device provided by an embodiment of the present invention, the method comprising the following steps:
[0061] Step S1: Acquire each transmission path for data transmission in the local area network.
[0062] Specifically, in order to ensure that each type of data in the LAN is transmitted stably and efficiently, it is necessary to analyze the transmission status of each type of data in the LAN, and then reasonably adjust the transmission storage space capacity of each type of data. In order to accurately analyze the transmission status of each type of data in the LAN, it is necessary to first obtain each transmission path for data transmission in the LAN. By analyzing each transmission path, it is conducive to the subsequent accurate analysis of data transmission status.
[0063] Step S2: according to the position distribution of each transmission path in the local area network and the data transmission situation of each transmission path in the first preset time period, the transmission importance of each transmission path is obtained.
[0064] It is known that the distribution of transmission paths in a local area network is intricate. When a certain transmission path is farther away from the IoT device in the transmission structure, it means that the data passing through the transmission path may be more, which indirectly means that the transmission path has a greater impact on the overall structure of the local area network, and the transmission path is more important in the data transmission process. At the same time, when the transmission path is closer to the control center in the transmission structure, it indirectly means that the transmission path is in an important position in the overall structure of the local area network, ensuring that the data transmission in the local area network is not interrupted, which also means that the transmission path is more important in the data transmission process. On the other hand, when the data transmitted by a certain transmission path is more stable, it means that the result analyzed by the transmission path is more accurate. Furthermore, this embodiment obtains the transmission importance of each transmission path according to the position distribution of each transmission path in the local area network and the situation of each transmission path transmitting data within the first preset time period. The greater the transmission importance, the greater the role of the corresponding transmission path in transmitting data in the local area network, and the more important the corresponding transmission path is in the data transmission process.
[0065] Preferably, in one possible implementation of this embodiment, the method for obtaining the transmission importance is as follows: Figure 2 , which shows a flow chart of a method for obtaining transmission importance provided by this embodiment, the method comprising the following steps:
[0066] Step S201: Acquire the structural influence degree of each transmission path according to the position distribution of each transmission path in the local area network.
[0067] The more transmission paths a transmission path has with IoT devices in the overall structure of a local area network, the more important the transmission path is in the data transmission process, and the more important the transmission path is in the overall structure of the local area network. At the same time, the closer the transmission path is to the control center, that is, the fewer transmission paths there are between the transmission path and the control center, it indirectly reflects that the transmission path is more important in the overall structure of the local area network. Furthermore, this embodiment obtains the structural influence of each transmission path based on the position distribution of each transmission path in the local area network.
[0068] Preferably, in a method that can be implemented in this embodiment, the method for obtaining the degree of structural influence is: for any transmission path, obtain the local path corresponding to the Internet of Things device to the transmission path, and use the local path that does not include the control center as the reference path; wherein, the reference path includes the transmission path; it should be noted that there are some Internet of Things devices whose data is not transmitted through the transmission path, and this embodiment defaults that there is no reference path between these Internet of Things devices and the transmission path. In order to analyze the position distribution of the transmission path in the local area network, the maximum number of them is obtained based on the number of transmission paths passed by each reference path, wherein the reference path corresponding to the maximum number is the longest reference path. The larger the maximum number, the more important the position of the transmission path in the local area network structure, and the more important the transmission path is in the process of transmitting data; in order to more accurately analyze the structural influence of the local area network of the transmission path, the number of transmission paths corresponding to the shortest path between the transmission path and the control center is further obtained as the second number; the smaller the second number, the more core the position of the transmission path in the local area network, and the more important the transmission path is in the process of transmitting data. Then, according to the maximum number and the second number, the structural influence degree of the transmission path is obtained; wherein the maximum number and the structural influence degree are positively correlated; and the second number and the structural influence degree are negatively correlated.
[0069] In order to accurately represent the importance of each transmission path in the overall structure of the local area network, this embodiment specifically quantifies the structural influence degree as a structural influence degree value. The larger the structural influence degree value, the more important the corresponding transmission path is in the process of transmitting data. The calculation formula of the structural influence degree value is: ; In the formula, is the structural influence value of the i-th transmission path; is the maximum number corresponding to the i-th transmission path; is the second quantity corresponding to the i-th transmission path; is the first preset positive integer.
[0070] This embodiment will Set to 1 to avoid the denominator being 0. Implementers can set it according to actual conditions. The size is not limited here.
[0071] At this point, the structural influence value of each transmission path is obtained.
[0072] Step S202: Acquire the transmission stability of each transmission path according to the data transmission condition of each transmission path within the first preset time period.
[0073] The more stable the data transmitted in a certain transmission path is, the more accurate the analysis result of the transmission data corresponding to the transmission path is. Therefore, this embodiment obtains the transmission stability of each transmission path according to the data transmission situation of each transmission path in the first preset time period, and corrects the structural influence of each transmission path according to the transmission stability, so as to accurately analyze the importance of each transmission path in the data transmission process. The greater the transmission stability, the more stable the data transmitted by the corresponding transmission path, and the more accurate the analysis result of the corresponding transmission path. This embodiment sets the first preset time period to 8 hours. The implementer can set the size of the first preset time period according to the actual situation, which is not limited here. Among them, the purpose of setting the first preset time period is to more accurately and efficiently analyze the changes in the data transmitted by each transmission path.
[0074] Preferably, in a method that can be implemented in this embodiment, the method for obtaining the transmission stability is: determine a moment at each interval of a preset time length within the first preset time period, and all of them are used as the target moment; in this embodiment, the preset time length is set to 10 minutes, and the implementer can set the size of the preset time length according to the actual situation, which is not limited here. Among them, the purpose of setting the target moment is to more efficiently analyze the situation of the data transmitted by each transmission path within the first preset time period. For any transmission path, the amount of data of each type of data transmitted by the transmission path at each target moment is obtained, and a vector is constructed as the data transmission vector of the transmission path at the corresponding target moment, accurately reflecting the situation of the data transmission of the transmission path at each target moment; in order to analyze the stability of the data transmitted by the transmission path within the first preset time period, the cosine similarity of the data transmission vectors at any two adjacent target moments is obtained, and all are used as the transmission data similarity value; the larger the transmission data similarity value, the more similar the data transmitted by the transmission path between the corresponding two adjacent target moments; in order to reflect the stability of the data transmitted by the transmission path, the average of all transmission data similarity values is used as the transmission stability of the transmission path. The greater the transmission stability, the more stable the data transmitted by the transmission path.
[0075] At this point, the transmission stability of each transmission path is obtained.
[0076] Step S203: acquiring the transmission importance of each transmission path according to the structural influence degree and the transmission stability degree of each transmission path; wherein the structural influence degree and the transmission stability degree are both positively correlated with the transmission importance degree.
[0077] It is known that the greater the degree of structural influence, the more important the corresponding transmission path is in the entire local area network; the greater the degree of transmission stability, the more stable the data transmitted by the corresponding transmission path, which indirectly reflects that the data transmission situation reflected by the corresponding transmission path is more accurate, and the result of the analysis of the transmission path is accurate. Furthermore, this embodiment accurately obtains the transmission importance of each transmission path according to the degree of structural influence and the degree of transmission stability of each transmission path; wherein the degree of structural influence and the degree of transmission stability are both positively correlated with the degree of transmission importance. The greater the degree of transmission importance, the more important the data transmitted by the corresponding transmission path is.
[0078] In order to accurately indicate the importance of data transmission on each transmission path, this embodiment specifically quantifies the transmission importance as a transmission importance value. The larger the transmission importance value, the more important the data transmission on the corresponding transmission path is. The calculation formula of the transmission importance value is: ; In the formula, is the transmission importance value of the i-th transmission path; is the structural influence value of the i-th transmission path; is the transmission stability of the i-th transmission path. right Make corrections so that It more accurately reflects the importance of the i-th transmission path in the local area network.
[0079] At this point, the transmission importance value of each transmission path is obtained.
[0080] Step S3: Obtain the transmission weight of each data transmitted by each transmission hub according to the transmission importance of the transmission path connected to each transmission hub and the transmission duration of each data transmitted by each transmission hub within the second preset time period.
[0081] Specifically, after the data of the IoT device is transmitted to the transmission hub through the transmission path, it is then transmitted from the transmission hub to the next transmission hub or control hub to ensure that the data of the IoT device eventually reaches the control hub. In order to ensure that each type of data can be transmitted stably and efficiently in different transmission hubs, it is necessary to reasonably set the size of the transmission storage space of each type of data during the transmission process. It can be seen from step S2 that the transmission importance of each transmission path can indirectly reflect the importance of the data transmitted by each transmission path, wherein the data transmitted by the transmission path connected to each transmission hub will pass through the corresponding transmission hub. In order to determine the situation of the data transmitted by each transmission hub, firstly according to the transmission importance of the transmission path connected to each transmission hub, the importance of the data transmitted by each transmission hub is analyzed. In order to further analyze the transmission situation of each type of data transmitted by each transmission hub, then according to the duration of each transmission hub transmitting each type of data, the proportion of each type of data transmitted by each transmission hub is determined, and the transmission situation of each type of data in each transmission hub is determined. Furthermore, this embodiment obtains the transmission weight of each type of data transmitted by each transmission hub according to the transmission importance of the transmission path connected to each transmission hub and the transmission duration of each type of data transmitted by each transmission hub within the second preset time period, accurately reflecting the transmission of the corresponding type of data in the corresponding transmission hub. Among them, the greater the transmission weight, the greater the proportion of the corresponding type of data transmitted in the corresponding transmission hub. In order to ensure the stable and efficient transmission of the corresponding type of data, the transmission storage space capacity of the corresponding type of data should be larger.
[0082] Preferably, in one possible implementation of this embodiment, the method for obtaining the transmission weight is as follows: Figure 3 , which shows a flow chart of a method for obtaining a transmission weight provided in this embodiment, the method comprising the following steps:
[0083] Step S301: Obtain the transmission demand level of each transmission hub according to the transmission importance of the transmission path connected to each transmission hub.
[0084] When the transmission importance of the transmission paths connected to a certain transmission hub is greater, the more important the transmission hub is in the local area network, and the greater the transmission demand of the transmission hub. Therefore, this embodiment obtains the transmission demand of each transmission hub according to the transmission importance of the transmission paths connected to each transmission hub. The greater the transmission demand, the more important the corresponding transmission hub is in the process of data transmission.
[0085] In one possible implementation of this embodiment, the method for obtaining the transmission demand degree is: for any transmission hub, the transmission importance values of all transmission paths connected to the transmission hub are accumulated and normalized, and the result is used as the transmission demand degree of the transmission hub. Among them, this embodiment uses the norm normalization function to normalize the result of accumulating the transmission importance values of all transmission paths connected to the transmission hub.
[0086] At this point, the transmission demand level of each transmission hub is obtained.
[0087] Step S302: According to the transmission duration of each type of data transmitted by each transmission hub within the second preset time period, obtain the transmission duration ratio of each type of data transmitted by each transmission hub.
[0088] For any transmission hub, all data transmitted by the transmission paths connected to the transmission hub will pass through the transmission hub. In order to ensure that different types of data are transmitted stably and efficiently in the transmission hub, it is necessary to analyze the transmission status of each type of data transmitted by the transmission hub in the transmission hub. The longer the time it takes for a certain type of data transmitted by the transmission hub to be transmitted in the transmission hub, the greater the proportion of the data transmitted in the transmission hub. In order to improve the efficiency of the transmission hub in transmitting the data, the transmission storage space capacity of the data should be larger. Furthermore, this embodiment obtains the transmission time ratio of each type of data transmitted by each transmission hub according to the transmission time of each type of data transmitted by each transmission hub within the second preset time period. The greater the transmission time ratio, the greater the proportion of the corresponding type of data transmitted in the corresponding transmission hub.
[0089] In one way that can be implemented in this embodiment, the method for obtaining the transmission time ratio is: for any transmission hub and any type of data transmitted by the transmission hub within the second preset time period, obtain the total time for the transmission hub to transmit the data within the second preset time period as the target time for the transmission hub to transmit the data; the larger the target time, the larger the transmission time ratio of the data in the transmission hub. The ratio of the target time to the total time of the second preset time period is used as the transmission time ratio of the data transmitted by the transmission hub. In this embodiment, the second preset time period is set to 6 hours. The implementer can set the size of the second preset time period according to actual conditions, and it is not limited here. The purpose of setting the second preset time period is to accurately and efficiently reflect the transmission ratio of each type of data in each transmission hub.
[0090] At this point, the transmission time ratio of each type of data transmitted by each transmission hub is obtained.
[0091] Step S303: According to the transmission time ratio of each data transmitted by each transmission hub and the transmission demand degree of each transmission hub, obtain the transmission weight of each data transmitted by each transmission hub; wherein, the transmission time ratio and the transmission demand degree are both positively correlated with the transmission weight.
[0092] It is known that the transmission time ratio accurately reflects the transmission status of each type of data in each transmission hub, and the transmission demand degree reflects the importance of the data transmitted by each transmission hub. Therefore, this embodiment obtains the transmission weight of each type of data transmitted by each transmission hub according to the transmission time ratio of each type of data transmitted by each transmission hub and the transmission demand degree of each transmission hub, accurately reflecting the transmission importance of each type of data in each transmission hub, wherein the larger the transmission weight, the more important the corresponding type of data is in the corresponding transmission hub.
[0093] The calculation formula of transmission weight is: ; In the formula, is the transmission weight of the a-th type of data transmitted by the x-th transmission hub; is the transmission demand level of the xth transmission hub; is the transmission time ratio of the ath type of data transmitted by the xth transmission hub; norm is a normalization function. Get , which is not limited here.
[0094] At this point, the transmission weight of each type of data transmitted by each transmission hub is obtained.
[0095] Step S4: Obtain the target transmission storage space capacity of each type of data according to the transmission weight of each type of data in different transmission hubs and the preset minimum transmission storage space capacity of each type of data.
[0096] Specifically, in actual situations, the transmission conditions of each type of data in different transmission hubs are different. In order to ensure that each type of data can be transmitted stably and efficiently in different transmission hubs, it is necessary to keep the transmission storage space capacity of each type of data consistent during the transmission process. In the existing method, the minimum transmission storage space of each type of data is preset according to the data type of each type of data as the transmission storage space of each type of data. When the transmission amount of a certain type of data is larger, the transmission storage space set by the existing method is more likely to affect the transmission efficiency of this type of data, and because the transmission of this type of data is not timely, it is easy to cause confusion in the transmission of this type of data, affecting the security and stability of the local area network. In order to accurately obtain the transmission storage space capacity of each type of data in the local area network, this embodiment corrects the preset minimum transmission storage space capacity of each type of data according to the transmission weight of each type of data in different transmission hubs, and then accurately obtains the target transmission storage space capacity of each type of data, so that each type of data can be stably and efficiently transmitted in the local area network.
[0097] Preferably, in a method that can be implemented in this embodiment, the method for obtaining the target transmission storage space capacity is: for any type of data being transmitted, obtain the average of the transmission weights of the data in each transmission hub as the adjustment weight of the data; it should be noted that if the data does not pass through a certain transmission hub, the default transmission weight of the data in the transmission hub is 0. Among them, the larger the adjustment weight, the more important the data is in the local area network, and the greater the degree to which the transmission storage space capacity of the data needs to be adjusted in order to ensure stable and efficient transmission of the data. Therefore, this embodiment uses the product of the adjustment weight of the data and the preset minimum transmission storage space capacity as the transmission storage space capacity adjustment value of the data; then obtain the sum of the preset minimum transmission storage space capacity of the data and the transmission storage space capacity adjustment value as the target transmission storage space capacity of the data, so as to improve the transmission efficiency of the data in the local area network.
[0098] At this point, the target transmission storage space capacity of each type of data is accurately obtained.
[0099] Set a command code for each type of data, where the command code is used to distinguish different types of data in the transmission protocol. Then the command code of each type of data, the target transmission storage space capacity, and the header file required by the transmission protocol together constitute the optimal transmission structure, which is used for data transmission, processing and storage processes within the local area network to ensure the security and stability of the local area network.
[0100] In summary, this embodiment obtains a transmission path for data transmission in a local area network; obtains the transmission importance of the transmission path according to the position of the transmission path in the local area network and the situation of data transmission by the transmission path in a first preset time period; obtains the transmission weight of each data transmitted by the transmission hub according to the transmission importance of the transmission path connected to the transmission hub and the transmission duration of each data transmitted by the transmission hub in a second preset time period; obtains the target transmission storage space capacity of each data according to the transmission weight of each data in different transmission hubs and the preset minimum transmission storage space capacity of each data. The present invention effectively improves the stability and efficiency of data transmission in a local area network by obtaining the target transmission storage space capacity of each data.
[0101] Embodiment 2:
[0102] The present invention also proposes a data transmission system for IoT devices, see Figure 4 , which shows a flow chart of a data transmission system of an Internet of Things device provided by an embodiment of the present invention, the system includes: a transmission path acquisition module 10, a transmission importance acquisition module 20, a transmission weight acquisition module 30 and a target transmission storage space capacity acquisition module 40.
[0103] The transmission path acquisition module 10 is used to acquire each transmission path for data transmission in the local area network.
[0104] The transmission importance acquisition module 20 is used to acquire the transmission importance of each transmission path according to the location distribution of each transmission path in the local area network and the data transmission situation of each transmission path within the first preset time period.
[0105] The transmission weight acquisition module 30 is used to obtain the transmission weight of each data transmitted by each transmission hub according to the transmission importance of the transmission path connected to each transmission hub and the transmission duration of each data transmitted by each transmission hub within the second preset time period.
[0106] The target transmission storage space capacity acquisition module 40 is used to acquire the target transmission storage space capacity of each data according to the transmission weight of each data in different transmission hubs and the preset minimum transmission storage space capacity of each data.
[0107] It should be noted that the system provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the data transmission system of an Internet of Things device provided in the above embodiment and the data transmission method embodiment of an Internet of Things device belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0108] Embodiment 3:
[0109] The present invention also provides a computer device, see Figure 5 The computer device includes a memory 401, a processor 402, and a computer program 403 stored in the memory 401 and running on the processor 402, wherein when the processor 402 executes the computer program 403, the computer device can execute the data transmission method of an Internet of Things device introduced above.
[0110] In addition, the embodiment of the present application also protects a data transmission device of an Internet of Things device, the device includes a memory and a processor, wherein the memory stores an executable program code, and the processor is used to call and execute the executable program code to execute a data transmission method of an Internet of Things device provided by the embodiment of the present application. The device can be a chip, component or module, and the chip may include a connected processor and memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute a data transmission method of an Internet of Things device provided by the above embodiment.
[0111] Embodiment 4:
[0112] This embodiment also provides a computer-readable storage medium, in which a computer program code is stored. When the computer program code is executed on a computer, the computer executes the above-mentioned related method steps to implement a data transmission method for an Internet of Things device provided in the above embodiment.
[0113] Embodiment 5:
[0114] This embodiment also provides a computer program product. When the computer program product runs on a computer, the computer executes the above-mentioned related steps to implement a data transmission method for an Internet of Things device provided in the above embodiment.
[0115] Among them, the device, computer-readable storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0116] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0117] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A data transmission method for an Internet of Things device, characterized in that: The method comprises the following steps: Obtain each transmission path for data transmission within the local area network; According to the position distribution of each transmission path in the local area network and the data transmission situation of each transmission path in the first preset time period, the transmission importance of each transmission path is obtained; According to the transmission importance of the transmission path connected to each transmission hub and the transmission duration of each type of data transmitted by each transmission hub within the second preset time period, the transmission weight of each type of data transmitted by each transmission hub is obtained; Obtain the target transmission storage space capacity of each data type according to the transmission weight of each data type in different transmission hubs and the preset minimum transmission storage space capacity of each data type; The method for obtaining the transmission importance is: According to the location distribution of each transmission path in the local area network, the structural influence degree of each transmission path is obtained; According to the data transmission situation of each transmission path within the first preset time period, the transmission stability of each transmission path is obtained; According to the structural influence degree and transmission stability degree of each transmission path, the transmission importance degree of each transmission path is obtained; wherein the structural influence degree and the transmission stability degree are both positively correlated with the transmission importance degree; The transmission importance is specifically quantified as the transmission importance value, and the calculation formula of the transmission importance value is: ; In the formula, is the transmission importance value of the i-th transmission path; is the structural influence value of the i-th transmission path; is the transmission stability of the i-th transmission path; The method for obtaining the structural influence degree is: For any transmission path, obtain the local path corresponding to the IoT device to the transmission path, and use the local path that does not include the control center as a reference path; Obtaining a maximum number of transmission paths based on the number of transmission paths traversed by each reference path; The number of transmission paths corresponding to the shortest path between the transmission path and the control center is taken as the second number; According to the maximum number and the second number, the structural influence degree of the transmission path is obtained; wherein the maximum number and the structural influence degree are positively correlated; and the second number and the structural influence degree are negatively correlated; The structural impact degree is specifically quantified as the structural impact degree value, and the calculation formula of the structural impact degree value is: ; In the formula, is the structural influence value of the i-th transmission path; is the maximum number corresponding to the i-th transmission path; is the second quantity corresponding to the i-th transmission path; is a first preset positive integer; The method for obtaining the transmission stability is: Determine a time at each preset time interval within the first preset time period, and use it as the target time; For any transmission path, the data volume of each type of data transmitted by the transmission path at each target time is obtained, and a vector is constructed as the data transmission vector of the transmission path at the corresponding target time; Obtain the cosine similarity of the data transmission vectors at any two adjacent target moments, and use them as the transmission data similarity value; The average of all transmission data similarity values is taken as the transmission stability of the transmission path.
2. A data transmission method for an Internet of Things device as claimed in claim 1, characterized in that: The method for obtaining the transmission weight is: According to the transmission importance of the transmission path connected to each transmission hub, the transmission demand degree of each transmission hub is obtained; According to the transmission duration of each type of data transmitted by each transmission hub within the second preset time period, the transmission duration ratio of each type of data transmitted by each transmission hub is obtained; According to the transmission time ratio of each type of data transmitted by each transmission hub and the transmission demand degree of each transmission hub, the transmission weight of each type of data transmitted by each transmission hub is obtained; wherein the transmission time ratio and the transmission demand degree are both positively correlated with the transmission weight; The calculation formula of transmission weight is: ; In the formula, is the transmission weight of the a-th type of data transmitted by the x-th transmission hub; is the transmission demand level of the xth transmission hub; is the transmission time ratio of the ath type of data transmitted by the xth transmission hub; norm is the normalization function.
3. A data transmission method for an Internet of Things device as claimed in claim 2, characterized in that: The method for obtaining the transmission requirement degree is: For any transmission hub, the transmission importance of all transmission paths connected to the transmission hub is accumulated and normalized to obtain the result, which serves as the transmission demand level of the transmission hub.
4. A data transmission method for an Internet of Things device as claimed in claim 2, characterized in that: The method for obtaining the transmission duration ratio is as follows: For any transmission hub and any type of data transmitted by the transmission hub within the second preset time period, the total duration of the transmission hub transmitting the type of data within the second preset time period is obtained as the target duration of the transmission hub transmitting the type of data; The ratio of the target duration to the total duration of the second preset time period is used as the transmission duration ratio of the data transmitted by the transmission hub.
5. The data transmission method of an Internet of Things device according to claim 1, characterized in that: The method for obtaining the target transmission storage space capacity is: For any type of data being transmitted, obtain the average value of the transmission weight of the data in each transmission hub as the adjustment weight of the data; The product of the adjustment weight of the data and the preset minimum transmission storage space capacity is used as the transmission storage space capacity adjustment value of the data; The sum of the preset minimum transmission storage space capacity of the data and the transmission storage space capacity adjustment value is used as the target transmission storage space capacity of the data.
6. A data transmission system for an Internet of Things device, characterized in that: The system comprises: A transmission path acquisition module is used to acquire each transmission path for data transmission in the local area network; A transmission importance acquisition module, used to acquire the transmission importance of each transmission path according to the location distribution of each transmission path in the local area network and the data transmission situation of each transmission path within a first preset time period; A transmission weight acquisition module, used to acquire the transmission weight of each type of data transmitted by each transmission hub according to the transmission importance of the transmission path connected to each transmission hub and the transmission duration of each type of data transmitted by each transmission hub within the second preset time period; A target transmission storage space capacity acquisition module is used to acquire the target transmission storage space capacity of each data according to the transmission weight of each data in different transmission hubs and the preset minimum transmission storage space capacity of each data; The method for obtaining the transmission importance is: According to the location distribution of each transmission path in the local area network, the structural influence degree of each transmission path is obtained; According to the data transmission situation of each transmission path within the first preset time period, the transmission stability of each transmission path is obtained; According to the structural influence degree and transmission stability degree of each transmission path, the transmission importance degree of each transmission path is obtained; wherein the structural influence degree and the transmission stability degree are both positively correlated with the transmission importance degree; The transmission importance is specifically quantified as the transmission importance value, and the calculation formula of the transmission importance value is: ; In the formula, is the transmission importance value of the i-th transmission path; is the structural influence value of the i-th transmission path; is the transmission stability of the i-th transmission path; The method for obtaining the structural influence degree is: For any transmission path, obtain the local path corresponding to the IoT device to the transmission path, and use the local path that does not include the control center as a reference path; Obtaining a maximum number of transmission paths based on the number of transmission paths traversed by each reference path; The number of transmission paths corresponding to the shortest path between the transmission path and the control center is taken as the second number; According to the maximum number and the second number, the structural influence degree of the transmission path is obtained; wherein the maximum number and the structural influence degree are positively correlated; and the second number and the structural influence degree are negatively correlated; The structural impact degree is specifically quantified as the structural impact degree value, and the calculation formula of the structural impact degree value is: ; In the formula, is the structural influence value of the i-th transmission path; is the maximum number corresponding to the i-th transmission path; is the second quantity corresponding to the i-th transmission path; is a first preset positive integer; The method for obtaining the transmission stability is: Determine a time at each preset time interval within the first preset time period, and use it as the target time; For any transmission path, the data volume of each type of data transmitted by the transmission path at each target time is obtained, and a vector is constructed as the data transmission vector of the transmission path at the corresponding target time; Obtain the cosine similarity of the data transmission vectors at any two adjacent target moments, and use them as the transmission data similarity value; The average of all transmission data similarity values is taken as the transmission stability of the transmission path.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When executing the computer program, the processor implements the steps of the data transmission method for an Internet of Things device as described in any one of claims 1 to 5.
