Traffic distribution method, device, electronic device and storage medium of Internet of Things card
By obtaining the traffic usage data and prediction models of IoT cards in real time and choosing the appropriate traffic allocation method, the problem of waste and flexibility in IoT card traffic management is solved, and more efficient traffic allocation is achieved.
Patent Information
- Application Number
- CN202411412693.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-10-11
AI Technical Summary
The traffic management model of existing IoT cards leads to wasting traffic resources and is difficult to allocate flexibly, especially when there are a large number of devices and large fluctuations in traffic demand.
By obtaining the remaining total traffic and historical traffic usage of the target traffic pool in real time, using the traffic allocation method prediction model to predict the traffic allocation probability at the next moment, and selecting the appropriate initial traffic allocation method (such as priority, average, and on-demand allocation). Calculate the target traffic allocation ratio and determine the allocation traffic value of each IoT card.
It reduces the waste of traffic resources, improves the flexibility of traffic allocation, and can more accurately meet the traffic needs of IoT cards.
Smart Images

Figure CN118921328B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet of Things, and in particular to a flow distribution method, device, electronic device and storage medium of an Internet of Things card. Background Art
[0002] The Internet of Things card is a smart card designed to provide data transmission and network connection for Internet of Things devices. The Internet of Things card cannot be used for personal communications and is mainly sold in bulk to corporate users.
[0003] The traffic management mode of existing IoT cards usually allocates traffic independently for each IoT card. Especially when there are a large number of IoT devices and the traffic demand fluctuates greatly, this method of independently allocating traffic can easily cause waste of traffic resources and makes it difficult to flexibly allocate traffic. Summary of the invention
[0004] In view of this, the purpose of the present application is to provide a traffic allocation method, device, electronic device and storage medium for an Internet of Things card, which can allocate traffic to the Internet of Things card based on a determined target traffic allocation method, reduce the waste of traffic resources, and improve the flexibility of traffic allocation.
[0005] In a first aspect, an embodiment of the present application provides a traffic allocation method for an Internet of Things card, and the traffic allocation method for the Internet of Things card includes:
[0006] Obtain the current remaining total traffic in the target traffic pool in real time, as well as the historical traffic usage of each IoT card bound to the target traffic pool at each historical moment;
[0007] The historical traffic usage of all IoT cards at all historical moments is input into the traffic allocation method prediction model to obtain the first prediction probability of traffic allocation through each initial traffic allocation method at the next moment; the traffic allocation method prediction model is trained based on the sample moment, the historical traffic usage of all IoT cards at all sample historical moments before the sample moment, and the traffic allocation method label at the sample moment;
[0008] Determine the second prediction probability of traffic allocation through each initial traffic allocation method at the next moment according to the difference between the remaining total traffic and the preset minimum warning traffic and the historical traffic usage of each IoT card at each historical moment;
[0009] Selecting a target traffic allocation method from all initial traffic allocation methods according to the first predicted probability and the second predicted probability;
[0010] If the target traffic allocation method is on-demand allocation, the initial traffic allocation ratio is determined according to the historical traffic usage at each historical moment corresponding to the next moment; the initial traffic allocation ratio includes the ratio of the allocated traffic value of each IoT card at the next moment to the total allocated traffic value of all IoT cards at the next moment;
[0011] Substitute all initial flow distribution ratios into the following distribution ratio formula to calculate the target flow distribution ratio;
[0012] ;
[0013] ;
[0014] ;
[0015] in, is the target flow distribution ratio, is the number of initial flow distribution ratios with a weight value of 1, is the number of initial flow distribution ratios, is the weight value of the i-th initial flow distribution ratio, is the i-th initial flow distribution ratio; is the difference between the i-th initial flow distribution ratio and the average flow distribution ratio of all initial flow distribution ratios, is the number of IoT cards, is the ratio corresponding to the vth IoT card in the i-th initial traffic allocation ratio, is the average value of the ratio corresponding to the vth IoT card in all initial traffic allocation ratios, is the preset threshold;
[0016] The allocated traffic value of each IoT card is determined based on the target traffic allocation ratio and the maximum value of the historical traffic usage of all IoT cards at all historical moments corresponding to the next moment.
[0017] In a possible implementation, the initial traffic allocation method includes priority allocation, average allocation, and on-demand allocation; according to the difference between the remaining total traffic and the preset minimum warning traffic, and the historical traffic usage of each IoT card at each historical moment, determining the second prediction probability of traffic allocation through each initial traffic allocation method at the next moment includes:
[0018] Determine whether the remaining total flow is less than or equal to the preset minimum warning flow;
[0019] If the remaining total flow is less than or equal to the preset minimum warning flow, then the second predicted probability of flow distribution through each initial flow distribution method at the next moment is determined according to the preset probability of each initial flow distribution method corresponding to the preset difference range where the difference is located; the preset probabilities of each initial flow distribution method corresponding to different preset difference ranges are different; the preset probability of priority distribution corresponding to each preset difference range is the largest;
[0020] If the remaining total traffic is greater than the preset minimum warning traffic, the second predicted probability of traffic allocation through each initial traffic allocation method at the next moment is determined based on the historical traffic usage of each IoT card at each historical moment.
[0021] In a possible implementation, determining a second predicted probability of performing traffic allocation by each initial traffic allocation method at the next moment according to the historical traffic usage of each IoT card at each historical moment includes:
[0022] According to the historical traffic usage of each IoT card at each historical moment, the discrete degree of traffic usage of the IoT card at the same moment is calculated;
[0023] According to the preset probabilities of each initial traffic allocation method corresponding to the preset discrete degree range of the traffic usage discrete degree, the second predicted probability of traffic allocation through each initial traffic allocation method at the next moment is determined; the preset probabilities of each initial traffic allocation method corresponding to different preset discrete degree ranges are different; the preset probability of average allocation or the preset probability of allocation on demand corresponding to each preset discrete degree range is the largest.
[0024] In a possible implementation, according to the preset probabilities of the initial traffic allocation methods corresponding to the preset discrete degree range of the traffic usage discrete degree, determining the second predicted probability of traffic allocation by each initial traffic allocation method at the next moment includes:
[0025] Determine whether the traffic usage discreteness is less than or equal to the preset discreteness;
[0026] If the flow usage discreteness is less than or equal to the preset discreteness, then according to the preset probabilities of the initial flow allocation methods corresponding to the first preset discreteness range where the flow usage discreteness is located, determine the second predicted probability of flow allocation through the initial flow allocation methods at the next moment; the preset probabilities of the initial flow allocation methods corresponding to different first preset discreteness ranges are different; the preset probability of average allocation corresponding to each first preset discreteness range is the largest;
[0027] If the discrete degree of traffic usage is greater than the preset discrete degree, the second predicted probability of traffic distribution through each initial traffic distribution method at the next moment is determined according to the preset probabilities of each initial traffic distribution method corresponding to the second preset discrete degree range where the discrete degree of traffic usage is located; the preset probabilities of each initial traffic distribution method corresponding to different second preset discrete degree ranges are different; the preset probability of on-demand allocation corresponding to each second preset discrete degree range is the largest.
[0028] In a possible implementation, selecting a target traffic allocation method from all initial traffic allocation methods according to the first predicted probability and the second predicted probability includes:
[0029] The average of the first prediction probability and the second prediction probability corresponding to each initial flow distribution mode is determined as the target prediction probability corresponding to each initial flow distribution mode;
[0030] The initial flow allocation method with the highest target prediction probability is determined as the target flow allocation method.
[0031] In a possible implementation, the allocated traffic value of each IoT card is determined according to the target traffic allocation ratio and the maximum value of the historical traffic usage of all IoT cards at all historical moments corresponding to the next moment, including:
[0032] Determine the maximum value as the allocated flow value of the Internet of Things card corresponding to the maximum value;
[0033] According to the allocated traffic value of the IoT card corresponding to the maximum value, the allocated traffic values of each IoT card except the IoT card corresponding to the maximum value are calculated according to the target traffic allocation ratio.
[0034] In a possible implementation, the method further includes:
[0035] Get the current network connection status of each IoT card and the historical network connection status at each historical moment;
[0036] The current network connection status corresponding to each IoT card and the historical network connection status at each historical moment are respectively input into the network connection status determination model to obtain the network connection status of each IoT card at the next moment; the network connection status determination model is obtained by training the network connection status at the sample moment, the network connection status at each sample historical moment before the sample moment, and the network connection status label at the sample moment;
[0037] An IoT card whose network connection state at the next moment is connected is determined as a target IoT card;
[0038] Allocate traffic to the target IoT card according to the target traffic allocation method.
[0039] In a second aspect, an embodiment of the present application further provides a flow distribution device for an Internet of Things card, the device comprising:
[0040] The acquisition module is used to obtain the current remaining total traffic in the target traffic pool in real time, as well as the historical traffic usage of each IoT card bound to the target traffic pool at each historical moment;
[0041] An input module is used to input the historical traffic usage of all IoT cards at all historical moments into the traffic allocation method prediction model to obtain a first prediction probability of traffic allocation through each initial traffic allocation method at the next moment; the traffic allocation method prediction model is trained based on the sample moment, the historical traffic usage of all IoT cards at all sample historical moments before the sample moment, and the traffic allocation method label at the sample moment;
[0042] A determination module, used to determine a second prediction probability of performing flow distribution through each initial flow distribution method at the next moment according to the difference between the remaining total flow and the preset minimum warning flow and the historical flow usage of each IoT card at each historical moment;
[0043] A selection module, configured to select a target flow distribution method from all initial flow distribution methods according to the first prediction probability and the second prediction probability;
[0044] The determination module is further used to determine the initial traffic allocation ratio according to the historical traffic usage at each historical moment corresponding to the next moment if the target traffic allocation method is on-demand allocation; the initial traffic allocation ratio includes the ratio of the allocated traffic value of each IoT card at the next moment to the total value of the allocated traffic of all IoT cards at the next moment;
[0045] A calculation module, used for substituting all initial flow distribution ratios into the following distribution ratio formula to calculate the target flow distribution ratio;
[0046] ;
[0047] ;
[0048] ;
[0049] in, is the target flow distribution ratio, is the number of initial flow distribution ratios with a weight value of 1, is the number of initial flow distribution ratios, is the weight value of the i-th initial flow distribution ratio, is the i-th initial flow distribution ratio; is the difference between the i-th initial flow distribution ratio and the average flow distribution ratio of all initial flow distribution ratios, is the number of IoT cards, is the ratio corresponding to the vth IoT card in the i-th initial traffic allocation ratio, is the average value of the ratio corresponding to the vth IoT card in all initial traffic allocation ratios, is the preset threshold;
[0050] The determination module is also used to determine the allocated traffic value of each IoT card based on the target traffic allocation ratio and the maximum value of the historical traffic usage of all IoT cards at all historical moments corresponding to the next moment.
[0051] In the third aspect, an embodiment of the present application also provides an electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, when the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to perform the steps of the traffic distribution method of the Internet of Things card as described in any one of the first aspects.
[0052] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the traffic distribution method for an Internet of Things card as described in any one of the first aspects are executed.
[0053] The embodiment of the present application provides a traffic allocation method, device, electronic device and storage medium for an Internet of Things card, the method comprising: selecting a target traffic allocation method from all initial traffic allocation methods according to the historical traffic usage of all Internet of Things cards at all historical moments and the remaining total traffic in the target traffic pool; if the target traffic allocation method is on-demand allocation, determining the initial traffic allocation ratio according to the historical traffic usage at each historical moment corresponding to the next moment; substituting all initial traffic allocation ratios into the following allocation ratio formula to calculate the target traffic allocation ratio; determining the allocated traffic value of each Internet of Things card according to the target traffic allocation ratio and the maximum value of the historical traffic usage of all Internet of Things cards at all historical moments corresponding to the next moment. The present application allocates traffic to the Internet of Things card based on the determined target traffic allocation method, thereby reducing the waste of traffic resources and improving the flexibility of traffic allocation. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0055] Figure 1 A flow chart of a method for allocating traffic of an Internet of Things card provided by an embodiment of the present application is shown;
[0056] Figure 2 A flow chart of another method for allocating traffic of an Internet of Things card provided in an embodiment of the present application is shown;
[0057] Figure 3 A schematic diagram of the structure of a flow distribution device for an Internet of Things card provided in an embodiment of the present application is shown;
[0058] Figure 4 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0059] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0060] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0061] In order to enable those skilled in the art to use the content of this application, the following implementation is provided in conjunction with a specific application scenario, the "Internet of Things field". For those skilled in the art, the general principles defined herein can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application. Although this application is mainly described around the "Internet of Things field", it should be understood that this is only an exemplary embodiment.
[0062] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0063] The following is a detailed description of a traffic distribution method for an Internet of Things card provided in an embodiment of the present application.
[0064] Reference Figure 1 As shown, it is a flow chart of a method for allocating traffic of an Internet of Things card provided in an embodiment of the present application. The exemplary steps of the embodiment of the present application are described below:
[0065] S101. Obtain in real time the current remaining total traffic in the target traffic pool and the historical traffic usage of each IoT card bound to the target traffic pool at each historical moment.
[0066] In the implementation mode of the present application, at least one traffic pool is established in advance, each traffic pool can be bound to at least one IoT card, and the traffic in each traffic pool can only be allocated to the bound IoT card. The target traffic pool refers to the traffic pool that needs to allocate traffic to the bound IoT card. The historical moment refers to the moment when the actual traffic usage is known, and the historical traffic usage of each historical moment is the actual traffic usage of each historical moment. The current remaining total traffic refers to the sum of the current remaining traffic in the target traffic pool.
[0067] Among them, the IoT card is a smart card specially designed to provide data transmission and network connection for IoT devices. It is provided by China's three major operators (China Mobile, China Unicom and China Telecom) and uses a dedicated IoT number segment. IoT cards are developed based on mobile communication technologies (such as 2G, 3G, 4G and 5G). The main features include support for multiple communication services, flexible billing methods, high transmission rates and long service life, dedicated APN and static IP configuration, and environmental adaptability optimization. The IoT card not only supports SMS and wireless data communications, but also supports basic communication services such as voice, and can be customized according to different usage requirements. Its design takes into account the special needs of IoT devices working in unattended environments, such as high temperature resistance, cold resistance and dust resistance.
[0068] S102: Input the historical traffic usage of all IoT cards at all historical moments into a traffic allocation method prediction model to obtain a first prediction probability of performing traffic allocation through each initial traffic allocation method at the next moment.
[0069] In the embodiments of the present application, the initial traffic allocation methods include priority allocation, average allocation, and on-demand allocation. The traffic allocation method prediction model is a multi-classification model used to predict the probability of traffic allocation through each traffic allocation method at the next moment. The greater the first prediction probability corresponding to a certain traffic allocation method, the greater the possibility of traffic allocation through this traffic allocation method at the next moment.
[0070] Here, the traffic allocation method prediction model can be any model such as a k-nearest neighbor model, a random forest model, a support vector machine model, etc. that can determine the first prediction probability corresponding to each initial traffic allocation method.
[0071] Among them, the traffic allocation method prediction model is trained based on the sample moment, the historical traffic usage corresponding to all sample historical moments of all IoT cards before the sample moment, and the traffic allocation method label at the sample moment. The accuracy of allocating traffic to each IoT card through the traffic allocation method label at the sample moment is greater than the accuracy of allocating traffic to each IoT card through any traffic allocation method other than the traffic allocation method label.
[0072] S103. Determine the second prediction probability of traffic allocation through each initial traffic allocation method at the next moment according to the difference between the remaining total traffic and the preset minimum warning traffic, and the historical traffic usage of each IoT card at each historical moment.
[0073] In the embodiments of the present application, the greater the second prediction probability, the greater the possibility of traffic allocation through this traffic allocation method at the next moment. The difference between the remaining total traffic and the preset minimum warning traffic refers to the absolute value of the value obtained by subtracting the preset minimum warning traffic from the remaining total traffic.
[0074] Among them, the minimum warning traffic is used to represent the minimum value that can meet the traffic demand of all IoT cards; the highest value in the total traffic used by all IoT cards at each historical moment can be determined as the minimum warning traffic. The traffic demand refers to the traffic required by the business needs of the IoT card.
[0075] Example: The total traffic used by all IoT cards at the first historical moment is a, the total traffic used by all IoT cards at the second historical moment is b, and the total traffic used by all IoT cards at the third historical moment is c; where b < a < c, so c is determined as the preset minimum warning traffic.
[0076] Specifically, the following steps are used to determine the second prediction probability of traffic allocation through each initial traffic allocation method at the next moment according to the difference between the remaining total traffic and the preset minimum warning traffic, and the historical traffic usage of each IoT card at each historical moment:
[0077] Step 1: Determine whether the remaining total flow is less than or equal to the preset minimum warning flow.
[0078] In the implementation manner of the present application, by judging whether the remaining total flow is less than or equal to the preset minimum warning flow, it is determined whether the remaining total flow in the flow pool meets the flow demand of all IoT cards.
[0079] Step 2: If the remaining total flow is less than or equal to the preset minimum warning flow, the second predicted probability of flow distribution through each initial flow distribution method at the next moment is determined according to the preset probability of each initial flow distribution method corresponding to the preset difference range where the difference is located.
[0080] In the implementation mode of the present application, if the remaining total flow is less than or equal to the preset minimum warning flow, it means that the remaining total flow in the flow pool does not meet the flow demand of all IoT cards. Therefore, it is more important to prioritize the flow allocation for IoT cards with high priority. Therefore, among the preset probabilities of each initial flow allocation method corresponding to each preset difference range, the preset probability of priority allocation is the largest. The preset probabilities of each initial flow allocation method corresponding to different preset difference ranges are different;
[0081] Here, the larger the difference, the less the remaining total traffic can meet the traffic demand of all IoT cards. Therefore, the larger the value corresponding to the preset difference range, the larger the second predicted probability of priority allocation corresponding to the preset difference range.
[0082] For example, the first preset difference range is [1, 5], and the second preset difference range is [6, 10]. Therefore, the value corresponding to the second preset difference range is greater than the value corresponding to the first preset difference range; that is, the second predicted probability of the priority assignment corresponding to the second preset difference range is greater than the second predicted probability of the priority assignment corresponding to the first preset difference range.
[0083] Step 3: If the remaining total traffic is greater than the preset minimum warning traffic, the second predicted probability of traffic allocation through each initial traffic allocation method at the next moment is determined based on the historical traffic usage of each IoT card at each historical moment.
[0084] In an implementation manner of the present application, if the remaining total traffic is greater than the preset minimum warning traffic, it means that the remaining total traffic in the traffic pool can meet the traffic demand of all IoT cards. In this case, the second prediction probability of average distribution or on-demand distribution is the largest, and the second prediction probability of priority distribution is the smallest.
[0085] Here, the second prediction probability of traffic allocation by each initial traffic allocation method at the next moment is determined according to the historical traffic usage of each IoT card at each historical moment through the following steps:
[0086] (1) Based on the historical traffic usage of each IoT card at each historical moment, calculate the discrete degree of traffic usage of the IoT card at the same moment.
[0087] In the implementation mode of the present application, the traffic usage discreteness is used to characterize the difference in traffic usage between the IoT cards at the same time. The larger the value of the traffic usage discreteness, the larger the difference in traffic usage between the IoT cards at the same time, and the larger the second prediction probability of on-demand allocation. The smaller the value of the traffic usage discreteness, the smaller the difference in traffic usage between the IoT cards at the same time, and the larger the second prediction probability of average allocation.
[0088] Specifically, the historical traffic usage of each IoT card at each historical moment is substituted into the following formula to calculate the discrete degree of traffic usage of the IoT card at the same moment:
[0089] ;
[0090] in, is the discrete degree of traffic usage of IoT cards at the same time. is the number of historical moments, is the number of IoT cards, For the i-th IoT card Historical traffic usage at the moment, The jth IoT card is Historical traffic usage at the moment, For The average value of all historical traffic usage at the time. is the preset weight, The preset weights.
[0091] (2) According to the preset probabilities of the initial traffic allocation methods corresponding to the preset discrete degree range of the traffic usage discrete degree, a second predicted probability of traffic allocation by each initial traffic allocation method at the next moment is determined.
[0092] In the implementation manner of the present application, the preset probabilities of each initial flow distribution method corresponding to different preset discrete degree ranges are different; the preset probability of average distribution or the preset probability of on-demand distribution corresponding to each preset discrete degree range is the largest. The larger the value corresponding to the preset discrete degree range, the larger the preset probability of on-demand distribution corresponding to the preset discrete degree range, and the smaller the corresponding preset probability of average distribution. The preset discrete degree range includes a first preset discrete degree range and a second preset discrete degree range; the value corresponding to the first preset discrete degree range is smaller than the value corresponding to the second preset discrete degree range.
[0093] Here, according to the preset probabilities of the initial traffic allocation methods corresponding to the preset discrete degree range of the traffic usage discrete degree, the second predicted probability of traffic allocation by the initial traffic allocation methods at the next moment is determined, including:
[0094] i. Determine whether the traffic usage discreteness is less than or equal to the preset discreteness.
[0095] ii. If the traffic usage discrete degree is less than or equal to the preset discrete degree, then the second predicted probability of traffic allocation through each initial traffic allocation method at the next moment is determined according to the preset probability of each initial traffic allocation method corresponding to the first preset discrete degree range of the traffic usage discrete degree.
[0096] In the implementation manner of the present application, the preset probabilities of each initial traffic distribution method corresponding to different first preset discrete degree ranges are different; if the traffic usage discrete degree is less than or equal to the preset discrete degree, it means that the traffic used by each IoT card at the same time is almost the same, and it is better to distribute it evenly. Therefore, the preset probability of average distribution corresponding to each first preset discrete degree range is the largest.
[0097] Among all the first preset discrete degree ranges, the larger the value corresponding to the first preset discrete degree range is, the smaller the corresponding preset probability of average distribution is, and the larger the corresponding preset probability of on-demand distribution is.
[0098] iii. If the traffic usage discreteness is greater than the preset discreteness, the second predicted probability of traffic allocation through each initial traffic allocation method at the next moment is determined according to the preset probabilities of each initial traffic allocation method corresponding to the second preset discreteness range of the traffic usage discreteness.
[0099] In the implementation manner of the present application, the preset probabilities of each initial traffic allocation method corresponding to different second preset discrete degree ranges are different; if the traffic usage discrete degree is greater than the preset discrete degree, it means that the traffic used by each IoT card at the same time is quite different, and the on-demand allocation method is better, so the preset probability of on-demand allocation corresponding to each second preset discrete degree range is the largest.
[0100] Among all the second preset discrete degree ranges, the larger the value corresponding to the first preset discrete degree range is, the larger the corresponding preset probability of on-demand allocation is, and the smaller the corresponding preset probability of average allocation is.
[0101] S104. Select a target traffic allocation method from all initial traffic allocation methods according to the first predicted probability and the second predicted probability.
[0102] In the implementation manner of the present application, the average value of the first prediction probability and the second prediction probability corresponding to each initial flow allocation method can be determined as the target prediction probability corresponding to each initial flow allocation method; the weighted value of the first prediction probability and the second prediction probability corresponding to each initial flow allocation method can also be determined as the target prediction probability corresponding to each initial flow allocation method. The initial flow allocation method with the largest target prediction probability is determined as the target flow allocation method.
[0103] S105: If the target traffic allocation method is on-demand allocation, determine the initial traffic allocation ratio according to the historical traffic usage at each historical moment corresponding to the next moment.
[0104] In the implementation mode of the present application, for each historical moment corresponding to the next moment, the ratio of the historical traffic usage of each IoT card corresponding to the historical moment is determined as the initial traffic allocation ratio. The initial traffic allocation ratio includes the ratio of the allocated traffic value of each IoT card at the next moment to the total value of the allocated traffic of all IoT cards at the next moment.
[0105] For example, if the next moment is 3:00, then for each historical moment corresponding to the moment 3:00, the ratio of the historical traffic usage of each IoT card at the historical moment is determined as the initial traffic allocation ratio. At a certain historical moment 3:00, the historical traffic usage corresponding to each IoT card is q, w, e, then the initial traffic allocation ratio is q:w:e, where the ratio of the allocated traffic value of the first IoT card at the next moment to the total value of the allocated traffic of all IoT cards at the next moment is q, the ratio of the allocated traffic value of the second IoT card at the next moment to the total value of the allocated traffic of all IoT cards at the next moment is w, and the ratio of the allocated traffic value of the third IoT card at the next moment to the total value of the allocated traffic of all IoT cards at the next moment is e.
[0106] S106. Substitute all initial flow distribution ratios into the following distribution ratio formula to calculate the target flow distribution ratio.
[0107] ;
[0108] ;
[0109] ;
[0110] in, is the target flow distribution ratio, is the number of initial flow distribution ratios with a weight value of 1, is the number of initial flow distribution ratios, is the weight value of the i-th initial flow distribution ratio, is the i-th initial flow distribution ratio; is the difference between the i-th initial flow distribution ratio and the average flow distribution ratio of all initial flow distribution ratios, is the number of IoT cards, is the ratio corresponding to the vth IoT card in the i-th initial traffic allocation ratio, is the average value of the ratio corresponding to the vth IoT card in all initial traffic allocation ratios, is the preset threshold.
[0111] S107. Determine the allocated traffic value of each IoT card according to the target traffic allocation ratio and the maximum value of the historical traffic usage of all IoT cards at all historical moments corresponding to the next moment.
[0112] In an implementation manner of the present application, the maximum value is determined as the allocated traffic value of the Internet of Things card corresponding to the maximum value; based on the allocated traffic value of the Internet of Things card corresponding to the maximum value, the allocated traffic values of each Internet of Things card except the Internet of Things card corresponding to the maximum value are calculated according to the target traffic allocation ratio.
[0113] For example, the maximum value of the historical traffic usage of all IoT cards at all historical moments corresponding to the next moment is the historical traffic usage max of the second IoT card, so the allocated traffic value of the second IoT card is max.
[0114] Here, according to the allocated traffic value of the Internet of Things card corresponding to the maximum value, the allocated traffic value of each Internet of Things card except the Internet of Things card corresponding to the maximum value is calculated according to the target traffic allocation ratio, including: dividing the maximum value by the ratio corresponding to the Internet of Things card corresponding to the maximum value in the target traffic allocation ratio to obtain the total traffic allocation amount; for each Internet of Things card except the Internet of Things card corresponding to the maximum value, multiplying the total traffic allocation amount by the ratio corresponding to the Internet of Things card in the target traffic allocation ratio to obtain the allocated traffic value of the Internet of Things card.
[0115] Furthermore, if the target traffic allocation method is priority allocation, traffic is allocated to each IoT card in turn according to the priority; and the allocated traffic value of each IoT card is the average of the historical traffic usage of each IoT card at all historical moments corresponding to the next moment.
[0116] Furthermore, if the target traffic distribution method is average distribution, the sum of all historical traffic usages at each historical moment corresponding to the next moment is determined as the traffic distribution sum value of each historical moment; the average of all traffic distribution sum values is determined as the target traffic distribution total; the target traffic distribution total is divided by the number of IoT cards to obtain the allocated traffic value of each IoT card.
[0117] Furthermore, the method also includes: when the traffic usage of the IoT card increases suddenly or the remaining total traffic is lower than the minimum warning traffic, an alarm is issued, and corresponding processing is performed according to preset rules, such as limiting traffic, switching to a standby card, etc.
[0118] The embodiment of the present application provides a traffic allocation method for an Internet of Things card, the method comprising: selecting a target traffic allocation method from all initial traffic allocation methods according to the historical traffic usage of all Internet of Things cards at all historical moments and the remaining total traffic in the target traffic pool; if the target traffic allocation method is on-demand allocation, determining the initial traffic allocation ratio according to the historical traffic usage at each historical moment corresponding to the next moment; substituting all initial traffic allocation ratios into the following allocation ratio formula to calculate the target traffic allocation ratio; determining the allocated traffic value of each Internet of Things card according to the target traffic allocation ratio and the maximum value of the historical traffic usage of all Internet of Things cards at all historical moments corresponding to the next moment. The present application allocates traffic to the Internet of Things card based on the determined target traffic allocation method, thereby reducing the waste of traffic resources and improving the flexibility of traffic allocation.
[0119] Reference Figure 2 As shown, it is a flow chart of another method for distributing traffic of an Internet of Things card provided in an embodiment of the present application. The exemplary steps of the embodiment of the present application are described below:
[0120] S201. Obtain the current network connection status corresponding to each IoT card and the historical network connection status at each historical moment.
[0121] In the implementation manner of the present application, the network connection state includes a connected state and a disconnected state.
[0122] S202. Input the current network connection status corresponding to each Internet of Things card and the historical network connection status at each historical moment into a network connection status determination model to obtain the network connection status of each Internet of Things card at the next moment.
[0123] In the implementation manner of the present application, the network connection status determination model is a binary classification model, which is used to determine the network connection status of each IoT card at the next moment.
[0124] The network connection status determination model is obtained by training the network connection status at the sample moment, the network connection status at each sample historical moment before the sample moment, and the network connection status label at the sample moment.
[0125] S203: Determine the Internet of Things card whose network connection status at the next moment is connected as the target Internet of Things card.
[0126] S204. Allocate traffic to the target IoT card according to the target traffic allocation method.
[0127] In the implementation manner of the present application, since only the IoT card in the connected state will use the traffic, it is only necessary to allocate traffic to the target IoT card.
[0128] Further, allocating traffic for the target IoT card according to the target traffic allocation method includes:
[0129] I. If the target traffic allocation method is on-demand allocation, the initial traffic allocation ratio is determined based on the historical traffic usage of the target IoT card at each historical moment corresponding to the next moment.
[0130] In the implementation mode of the present application, for each historical moment corresponding to the next moment, the ratio of the historical traffic usage of each target IoT card to that of all target IoT cards at that historical moment is determined as the initial traffic allocation ratio. The initial traffic allocation ratio includes the ratio of the allocated traffic value of each target IoT card at the next moment to the total value of the allocated traffic of all target IoT cards at the next moment.
[0131] For example, if the next moment is 3:00, then for each historical moment corresponding to the moment 3:00, the ratio of the historical traffic usage of each target IoT card to that of all target IoT cards at that historical moment is determined as the initial traffic allocation ratio. At a certain historical moment 3:00, the historical traffic usage of each target IoT card is q, w, e, then the initial traffic allocation ratio is q:w:e, where the ratio of the allocated traffic value of the first target IoT card at the next moment to the total value of the allocated traffic of all target IoT cards at the next moment is q, the ratio of the allocated traffic value of the second target IoT card at the next moment to the total value of the allocated traffic of all target IoT cards at the next moment is w, and the ratio of the allocated traffic value of the third target IoT card at the next moment to the total value of the allocated traffic of all target IoT cards at the next moment is e.
[0132] II. Substitute all initial flow distribution ratios into the following distribution ratio formula to calculate the target flow distribution ratio.
[0133] ;
[0134] ;
[0135] ;
[0136] in, is the target flow distribution ratio, is the number of initial flow distribution ratios with a weight value of 1, is the number of initial flow distribution ratios, is the weight value of the i-th initial flow distribution ratio, is the i-th initial flow distribution ratio; is the difference between the i-th initial flow distribution ratio and the average flow distribution ratio of all initial flow distribution ratios, is the number of target IoT cards, is the ratio corresponding to the vth target IoT card in the i-th initial traffic allocation ratio, is the average value of the ratio corresponding to the vth target IoT card in all initial traffic allocation ratios, is the preset threshold.
[0137] III. Determine the allocated traffic value of each target IoT card according to the target traffic allocation ratio and the maximum value of the historical traffic usage of all target IoT cards at all historical moments corresponding to the next moment.
[0138] In an implementation manner of the present application, the maximum value is determined as the allocated traffic value of the target Internet of Things card corresponding to the maximum value; based on the allocated traffic value of the target Internet of Things card corresponding to the maximum value, the allocated traffic values of each target Internet of Things card except the target Internet of Things card corresponding to the maximum value are calculated according to the target traffic allocation ratio.
[0139] For example, the maximum value of the historical traffic usage of all target IoT cards at all historical moments corresponding to the next moment is the historical traffic usage max of the second target IoT card, then the allocated traffic value of the second target IoT card is max.
[0140] Here, according to the allocated traffic value of the target IoT card corresponding to the maximum value, the allocated traffic value of each target IoT card except the target IoT card corresponding to the maximum value is calculated according to the target traffic allocation ratio, including: dividing the maximum value by the ratio corresponding to the target IoT card corresponding to the maximum value in the target traffic allocation ratio to obtain the total traffic allocation amount; for each target IoT card except the target IoT card corresponding to the maximum value, multiplying the total traffic allocation amount by the ratio corresponding to the target IoT card in the target traffic allocation ratio to obtain the allocated traffic value of the target IoT card.
[0141] Furthermore, if the target traffic allocation method is priority allocation, traffic is allocated to each target IoT card in turn according to the priority; and the allocated traffic value of each target IoT card is the average of the historical traffic usage of each target IoT card at all historical moments corresponding to the next moment.
[0142] Furthermore, if the target traffic distribution method is average distribution, the sum of all historical traffic usages of all target logistics network cards at each historical moment corresponding to the next moment is determined as the traffic distribution and value of each historical moment; the average of all traffic distribution and values is determined as the target traffic distribution total; the target traffic distribution total is divided by the number of target Internet of Things cards to obtain the distribution traffic value of each target Internet of Things card.
[0143] Here, an embodiment of the present application provides another method for allocating traffic to an IoT card, which can determine the target IoT card to which traffic needs to be allocated, thereby reducing the waste of traffic resources and improving the flexibility of traffic allocation.
[0144] Based on the same inventive concept, the embodiment of the present application also provides a traffic distribution device for an Internet of Things card corresponding to the traffic distribution method of the Internet of Things card. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the traffic distribution method of the Internet of Things card in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0145] Reference Figure 3 FIG. 1 is a schematic diagram of a flow distribution device of an Internet of Things card provided in an embodiment of the present application, and the flow distribution device of the Internet of Things card includes:
[0146] The acquisition module 301 is used to obtain in real time the current remaining total traffic in the target traffic pool and the historical traffic usage of each IoT card bound to the target traffic pool at each historical moment;
[0147] An input module 302 is used to input the historical traffic usage of all IoT cards at all historical moments into a traffic allocation method prediction model to obtain a first prediction probability of traffic allocation by each initial traffic allocation method at the next moment; the traffic allocation method prediction model is trained based on the sample moment, the historical traffic usage of all IoT cards at all sample historical moments before the sample moment, and the traffic allocation method label at the sample moment;
[0148] The determination module 303 is used to determine the second prediction probability of performing flow distribution by each initial flow distribution method at the next moment according to the difference between the remaining total flow and the preset minimum warning flow and the historical flow usage of each IoT card at each historical moment;
[0149] A selection module 304, configured to select a target flow distribution method from all initial flow distribution methods according to the first prediction probability and the second prediction probability;
[0150] The determination module 303 is further used to determine the initial traffic allocation ratio according to the historical traffic usage at each historical moment corresponding to the next moment if the target traffic allocation mode is on-demand allocation; the initial traffic allocation ratio includes the ratio of the allocated traffic value of each IoT card at the next moment to the total value of the allocated traffic of all IoT cards at the next moment;
[0151] The calculation module 305 is used to substitute all the initial flow distribution ratios into the following distribution ratio formula to calculate the target flow distribution ratio;
[0152] ;
[0153] ;
[0154] ;
[0155] in, is the target flow distribution ratio, is the number of initial flow distribution ratios with a weight value of 1, is the number of initial flow distribution ratios, is the weight value of the i-th initial flow distribution ratio, is the i-th initial flow distribution ratio; is the difference between the i-th initial flow distribution ratio and the average flow distribution ratio of all initial flow distribution ratios, is the number of IoT cards, is the ratio corresponding to the vth IoT card in the i-th initial traffic allocation ratio, is the average value of the ratio corresponding to the vth IoT card in all initial traffic allocation ratios, is the preset threshold;
[0156] The determination module 303 is also used to determine the allocated traffic value of each Internet of Things card according to the target traffic allocation ratio and the maximum value of the historical traffic usage of all Internet of Things cards at all historical moments corresponding to the next moment.
[0157] In one possible implementation, the initial traffic allocation method includes priority allocation, average allocation and on-demand allocation; the determination module 303 is specifically used to determine whether the remaining total traffic is less than or equal to the preset minimum warning traffic; if the remaining total traffic is less than or equal to the preset minimum warning traffic, then according to the preset probability of each initial traffic allocation method corresponding to the preset difference range where the difference is located, the second predicted probability of traffic allocation through each initial traffic allocation method at the next moment is determined; the preset probabilities of each initial traffic allocation method corresponding to different preset difference ranges are different; the preset probability of priority allocation corresponding to each preset difference range is the largest; if the remaining total traffic is greater than the preset minimum warning traffic, then according to the historical traffic usage of each Internet of Things card at each historical moment, the second predicted probability of traffic allocation through each initial traffic allocation method at the next moment is determined.
[0158] In a possible implementation, the determination module 303 is specifically used to calculate the discrete degree of traffic usage of the Internet of Things cards at the same moment according to the historical traffic usage of each Internet of Things card at each historical moment; determine the second predicted probability of traffic allocation through each initial traffic allocation method at the next moment according to the preset probability of each initial traffic allocation method corresponding to the preset discrete degree range where the traffic usage discrete degree is located; the preset probabilities of each initial traffic allocation method corresponding to different preset discrete degree ranges are different; the preset probability of average allocation or the preset probability of on-demand allocation corresponding to each preset discrete degree range is the largest.
[0159] In a possible implementation, the determination module 303 is specifically used to determine whether the traffic usage discrete degree is less than or equal to the preset discrete degree; if the traffic usage discrete degree is less than or equal to the preset discrete degree, then according to the preset probabilities of each initial traffic allocation method corresponding to the first preset discrete degree range where the traffic usage discrete degree is located, it is determined that the second predicted probability of traffic allocation is performed through each initial traffic allocation method at the next moment; the preset probabilities of each initial traffic allocation method corresponding to different first preset discrete degree ranges are different; the preset probability of average allocation corresponding to each first preset discrete degree range is the largest; if the traffic usage discrete degree is greater than the preset discrete degree, then according to the preset probabilities of each initial traffic allocation method corresponding to the second preset discrete degree range where the traffic usage discrete degree is located, it is determined that the second predicted probability of traffic allocation is performed through each initial traffic allocation method at the next moment; the preset probabilities of each initial traffic allocation method corresponding to different second preset discrete degree ranges are different; the preset probability of on-demand allocation corresponding to each second preset discrete degree range is the largest.
[0160] In a possible implementation, the selection module 304 is specifically used to determine the average of the first prediction probability and the second prediction probability corresponding to each initial traffic allocation method as the target prediction probability corresponding to each initial traffic allocation method; and determine the initial traffic allocation method with the largest target prediction probability as the target traffic allocation method.
[0161] In a possible implementation, the determination module 303 is specifically used to determine the maximum value as the allocated traffic value of the Internet of Things card corresponding to the maximum value; based on the allocated traffic value of the Internet of Things card corresponding to the maximum value, the allocated traffic value of each Internet of Things card except the Internet of Things card corresponding to the maximum value is calculated according to the target traffic allocation ratio.
[0162] In a possible implementation, the device further includes: an allocation module 306;
[0163] The acquisition module 301 is also used to obtain the current network connection status corresponding to each IoT card and the historical network connection status at each historical moment;
[0164] The input module 302 is further used to input the current network connection status corresponding to each IoT card and the historical network connection status at each historical moment into the network connection status determination model to obtain the network connection status of each IoT card at the next moment; the network connection status determination model is obtained by training the network connection status at the sample moment, the network connection status at each sample historical moment before the sample moment, and the network connection status label at the sample moment;
[0165] The determination module 303 is further used to determine the Internet of Things card whose network connection state at the next moment is connected as the target Internet of Things card;
[0166] The allocation module 306 is used to allocate traffic to the target Internet of Things card according to the target traffic allocation method.
[0167] An embodiment of the present application provides a traffic distribution device for an Internet of Things card, which can distribute traffic to the Internet of Things card based on a determined target traffic distribution method, thereby reducing the waste of traffic resources and improving the flexibility of traffic distribution.
[0168] like Figure 4 As shown, an electronic device 400 provided in an embodiment of the present application includes: a processor 401, a memory 402 and a bus, the memory 402 stores machine-readable instructions executable by the processor 401, and when the electronic device is running, the processor 401 communicates with the memory 402 through the bus, and the processor 401 executes the machine-readable instructions to perform the steps of the traffic distribution method of the Internet of Things card as mentioned above.
[0169] Specifically, the above-mentioned memory 402 and processor 401 can be general-purpose memory and processor, which are not specifically limited here. When the processor 401 runs the computer program stored in the memory 402, it can execute the above-mentioned traffic distribution method of the Internet of Things card.
[0170] Corresponding to the above-mentioned traffic distribution method of the Internet of Things card, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned traffic distribution method of the Internet of Things card are executed.
[0171] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0172] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0173] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0174] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the information processing method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0175] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A traffic distribution method for an Internet of Things card, characterized in that: The method comprises: Obtain in real time the current remaining total traffic in the target traffic pool, as well as the historical traffic usage of each IoT card bound to the target traffic pool at each historical moment; Input the historical traffic usage of all IoT cards at all historical moments into the traffic allocation method prediction model to obtain a first prediction probability of traffic allocation through each initial traffic allocation method at the next moment; the traffic allocation method prediction model is trained based on the sample moment, the historical traffic usage of all IoT cards at all sample historical moments before the sample moment, and the traffic allocation method label at the sample moment; Determine a second prediction probability of performing flow distribution by each initial flow distribution method at the next moment according to the difference between the remaining total flow and the preset minimum warning flow and the historical flow usage of each IoT card at each historical moment; selecting a target traffic allocation method from all initial traffic allocation methods according to the first predicted probability and the second predicted probability; If the target traffic allocation method is on-demand allocation, the initial traffic allocation ratio is determined according to the historical traffic usage at each historical moment corresponding to the next moment; the initial traffic allocation ratio includes the ratio of the allocated traffic value of each IoT card at the next moment to the total value of the allocated traffic of all IoT cards at the next moment; Substitute all initial flow distribution ratios into the following distribution ratio formula to calculate the target flow distribution ratio; ; ; ; in, is the target flow distribution ratio, is the number of initial flow distribution ratios with a weight value of 1, is the number of initial flow distribution ratios, is the weight value of the i-th initial flow distribution ratio, is the i-th initial flow distribution ratio; is the difference between the i-th initial flow distribution ratio and the average flow distribution ratio of all initial flow distribution ratios, is the number of IoT cards, is the ratio corresponding to the vth IoT card in the i-th initial traffic allocation ratio, is the average value of the ratio corresponding to the vth IoT card in all initial traffic allocation ratios, is the preset threshold; The allocated traffic value of each Internet of Things card is determined according to the target traffic allocation ratio and the maximum value of the historical traffic usage of all Internet of Things cards at all historical moments corresponding to the next moment.
2. The traffic distribution method of the Internet of Things card according to claim 1 is characterized in that: The initial traffic allocation method includes priority allocation, average allocation and on-demand allocation; the second prediction probability of traffic allocation by each initial traffic allocation method at the next moment is determined according to the difference between the remaining total traffic and the preset minimum warning traffic and the historical traffic usage of each IoT card at each historical moment, including: Determine whether the remaining total flow is less than or equal to a preset minimum warning flow; If the remaining total flow is less than or equal to the preset minimum warning flow, then according to the preset probabilities of the initial flow allocation methods corresponding to the preset difference range where the difference is located, determine the second predicted probability of flow allocation through each initial flow allocation method at the next moment; the preset probabilities of each initial flow allocation method corresponding to different preset difference ranges are different; the preset probability of priority allocation corresponding to each preset difference range is the largest; If the remaining total flow is greater than the preset minimum warning flow, the second predicted probability of flow distribution through each initial flow distribution method at the next moment is determined according to the historical flow usage of each IoT card at each historical moment.
3. The traffic distribution method of the Internet of Things card according to claim 2 is characterized in that: The determining, according to the historical traffic usage of each IoT card at each historical moment, a second prediction probability of performing traffic allocation by each initial traffic allocation method at the next moment includes: According to the historical traffic usage of each IoT card at each historical moment, the discrete degree of traffic usage of the IoT card at the same moment is calculated; According to the preset probabilities of each initial traffic allocation method corresponding to the preset discrete degree range where the traffic usage discrete degree is located, a second predicted probability of traffic allocation through each initial traffic allocation method at the next moment is determined; the preset probabilities of each initial traffic allocation method corresponding to different preset discrete degree ranges are different; the preset probability of average allocation or the preset probability of on-demand allocation corresponding to each preset discrete degree range is the largest.
4. The traffic distribution method of the Internet of Things card according to claim 2 is characterized in that: The determining, according to the preset probabilities of the initial traffic allocation modes corresponding to the preset discrete degree range of the traffic usage discrete degree, a second predicted probability of traffic allocation by each initial traffic allocation mode at the next moment comprises: Determining whether the flow usage discreteness is less than or equal to a preset discreteness; If the flow usage discrete degree is less than or equal to the preset discrete degree, then according to the preset probabilities of the initial flow allocation methods corresponding to the first preset discrete degree range where the flow usage discrete degree is located, determine the second predicted probability of flow allocation through each initial flow allocation method at the next moment; the preset probabilities of each initial flow allocation method corresponding to different first preset discrete degree ranges are different; the preset probability of average allocation corresponding to each first preset discrete degree range is the largest; If the discrete degree of traffic usage is greater than the preset discrete degree, then the second predicted probability of traffic distribution through each initial traffic distribution method at the next moment is determined according to the preset probabilities of each initial traffic distribution method corresponding to the second preset discrete degree range where the discrete degree of traffic usage is located; the preset probabilities of each initial traffic distribution method corresponding to different second preset discrete degree ranges are different; and the preset probability of on-demand allocation corresponding to each second preset discrete degree range is the largest.
5. The traffic distribution method of the Internet of Things card according to claim 1 is characterized in that: The selecting a target traffic allocation method from all initial traffic allocation methods according to the first predicted probability and the second predicted probability includes: The average of the first prediction probability and the second prediction probability corresponding to each initial flow distribution mode is determined as the target prediction probability corresponding to each initial flow distribution mode; The initial flow allocation method with the highest target prediction probability is determined as the target flow allocation method.
6. The traffic distribution method of the Internet of Things card according to claim 5 is characterized in that: The method of determining the allocated flow value of each IoT card according to the target flow allocation ratio and the maximum value of the historical flow usage of all IoT cards at all historical moments corresponding to the next moment includes: Determine the maximum value as the allocated flow value of the Internet of Things card corresponding to the maximum value; According to the allocated flow value of the Internet of Things card corresponding to the maximum value, the allocated flow values of each Internet of Things card except the Internet of Things card corresponding to the maximum value are calculated according to the target flow distribution ratio.
7. The method for distributing traffic of an Internet of Things card according to any one of claims 1 to 6, characterized in that: The method further comprises: Get the current network connection status of each IoT card and the historical network connection status at each historical moment; The current network connection status corresponding to each IoT card and the historical network connection status at each historical moment are respectively input into a network connection status determination model to obtain the network connection status of each IoT card at the next moment; the network connection status determination model is obtained by training the network connection status at the sample moment, the network connection status at each sample historical moment before the sample moment, and the network connection status label at the sample moment; An IoT card whose network connection state at the next moment is connected is determined as a target IoT card; Traffic is allocated to the target Internet of Things card according to the target traffic allocation method.
8. A flow distribution device for an Internet of Things card, characterized in that: The device includes: An acquisition module is used to acquire in real time the current remaining total traffic in the target traffic pool and the historical traffic usage of each IoT card bound to the target traffic pool at each historical moment; An input module is used to input the historical traffic usage of all IoT cards at all historical moments into a traffic allocation mode prediction model to obtain a first prediction probability of traffic allocation through each initial traffic allocation mode at the next moment; the traffic allocation mode prediction model is trained based on a sample moment, the historical traffic usage of all IoT cards at all sample historical moments before the sample moment, and the traffic allocation mode label at the sample moment; A determination module, used to determine a second prediction probability of performing flow distribution by each initial flow distribution method at the next moment according to the difference between the remaining total flow and the preset minimum warning flow and the historical flow usage of each IoT card at each historical moment; A selection module, configured to select a target flow distribution method from all initial flow distribution methods according to the first prediction probability and the second prediction probability; The determination module is further configured to determine an initial traffic allocation ratio according to the historical traffic usage at each historical moment corresponding to the next moment if the target traffic allocation method is on-demand allocation; the initial traffic allocation ratio includes the ratio of the allocated traffic value of each IoT card at the next moment to the total value of the allocated traffic of all IoT cards at the next moment; A calculation module, used for substituting all initial flow distribution ratios into the following distribution ratio formula to calculate the target flow distribution ratio; ; ; ; in, is the target flow distribution ratio, is the number of initial flow distribution ratios with a weight value of 1, is the number of initial flow distribution ratios, is the weight value of the i-th initial flow distribution ratio, is the i-th initial flow distribution ratio; is the difference between the i-th initial flow distribution ratio and the average flow distribution ratio of all initial flow distribution ratios, is the number of IoT cards, is the ratio corresponding to the vth IoT card in the i-th initial traffic allocation ratio, is the average value of the ratio corresponding to the vth IoT card in all initial traffic allocation ratios, is the preset threshold; The determination module is also used to determine the allocated traffic value of each Internet of Things card based on the target traffic allocation ratio and the maximum value of the historical traffic usage of all Internet of Things cards at all historical moments corresponding to the next moment.
9. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the traffic distribution method for the Internet of Things card as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the traffic distribution method for an Internet of Things card as described in any one of claims 1 to 7 are executed.
Citation Information
Patent Citations
Flow control method and system for service cluster
CN114172902A
Dynamic allocation method of network slice bandwidth, electronic equipment and storage medium
CN116743588A
