Disclosure of Invention
Aiming at the problem that stable data transmission service cannot be provided in the prior art during the peak period of access, the invention provides a 5G module-based power system communication gateway, which manages mobile terminals connected with the gateway by setting a periodic priority share, limits each mobile terminal at the peak time on one hand, and ensures the full utilization of bandwidth at the rest time on the other hand, thereby improving the data transmission efficiency and stability.
The technical scheme of the invention is as follows.
A power system communication gateway based on a 5G module comprises a first communication module with the 5G module, a second communication module connected with an intranet of a power system, a verification module, a control module, an isolation module and a monitoring module, wherein the first communication module is connected with the second communication module through the isolation module, the verification module receives and verifies a connection request of a mobile terminal, the first communication module is allowed to be connected with the mobile terminal after the connection request passes through the second communication module, the monitoring module inquires a current bandwidth occupation ratio, sets a stage priority share of the mobile terminal according to the current bandwidth occupation ratio and the connection conditions of all current mobile terminals and updates the stage priority share at regular time, and after a speed limiting mechanism is triggered, the control module controls the data transmission speed between the first communication module and the mobile terminal according to the stage priority share.
The invention follows the principle of first-come first-serve and full utilization of resources, utilizes the stage priority share to represent the stage resource use right of each mobile terminal, and carries out speed control according to the stage priority share after triggering the speed limiting mechanism, thereby ensuring the speed distribution and the data transmission stability in the peak period, simultaneously not influencing the data transmission in other time and fully utilizing the resources.
Preferably, the monitoring module queries the current bandwidth occupation ratio in the communication module, and sets a periodic priority share of the mobile terminal according to the current bandwidth occupation ratio and the connection conditions of all the current mobile terminals, including: the monitoring module inquires the average bandwidth occupation situation in a plurality of recent time and compares the total bandwidth to obtain the current bandwidth occupation ratio a, if no other mobile terminal is connected at present, the stage priority share is 1-a, and if other mobile terminals obtain the stage priority share at present, the minimum value is taken from the 1-a and other stage priority shares as the stage priority share of the mobile terminal. The stage priority share is mainly comprehensively determined by the connection time sequence and the use condition of the current bandwidth, the share is distributed as much as possible, and the benefit of a late-arriving person is not greater than that of a first-arriving person.
Preferably, the controlling module controls the data transmission speed between the first communication module and the mobile terminal according to the periodic priority share, and includes: and triggering the speed limiting mechanism when the triggering condition is met and lasting for a plurality of times, namely, the control module inquires the stage priority shares of all the connected mobile terminals, multiplies the stage priority shares by a preset flow value to obtain a share pool, and when the flow in the share pool corresponding to each mobile terminal is consumed up, limiting the transmission speed to be the basic speed until the speed limiting mechanism is released or the next stage priority share is distributed. In order to prevent the share owner from occupying the resource for a long time, a share pool is introduced, the right of resource use is further quantized, even if the share is large and the priority is high, the resource use is limited within a certain range, and meanwhile, the priority of the predecessor is weakened over time by periodically updating the priority, so that the right of the successor is guaranteed.
Preferably, the basic speed is calculated by: and taking half of the transmission speed corresponding to the maximum bandwidth as the basic total speed, and dividing the basic total speed by the number of the mobile terminals connected currently to obtain the basic speed.
Preferably, the triggering conditions of the speed limiting mechanism are as follows: the detection is carried out at intervals, and the bandwidth occupation ratio detected twice in succession reaches a threshold value.
Preferably, the system further comprises an interface module, wherein the interface module is used for connecting the expansion unit and at least comprises the following interfaces: an m.2Type2230 interface, namely an E KEY standard interface, which is externally connected with an INTEL 3168NGW module; the mSATA interface is used for externally connecting an mSATA hard disk of an SATA3 protocol; and the SFP + interface is used for externally connecting a terabyte SFP + electric port module or an SFP + optical port module. These interfaces allow the scalability of the gateway to be greatly increased.
The substantial effects of the present invention include: the information transmission channel resources of the gateways are reasonably distributed, the speed of the connected terminal is not limited in the low peak period, and the dynamic speed limitation is carried out in the high peak period, so that the stability of data transmission in the high peak period is guaranteed, the utilization rate of the resources in the low peak period is not influenced, and the problems in the prior art are solved.
Detailed Description
The technical solution of the present application will be described with reference to the following examples. In addition, numerous specific details are set forth below in order to provide a better understanding of the present invention. It will be understood by those skilled in the art that the present invention may be practiced without some of these specific details. In some instances, methods, procedures, components, and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present invention.
The embodiment is as follows:
a power system communication gateway based on a 5G module is disclosed, as shown in figure 1, and comprises a first communication module 1 with the 5G module and a second communication module 2 connected with an intranet of a power system, and further comprises a verification module, a control module 3, an isolation module 5 and a monitoring module 4, wherein the first communication module is connected with the second communication module through the isolation module, the verification module receives and verifies a connection request of a mobile terminal, after the connection request is passed, the first communication module is allowed to be connected with the mobile terminal, the monitoring module inquires a current bandwidth occupation ratio, a stage priority share of the mobile terminal is set according to the current bandwidth occupation ratio and connection conditions of all current mobile terminals and is updated regularly, and after a speed limiting mechanism is triggered, the control module controls data transmission speed between the first communication module and the mobile terminal according to the stage priority share.
The monitoring module inquires the current bandwidth occupation ratio in the communication module, and sets the stage priority share of the mobile terminal according to the current bandwidth occupation ratio and the current connection conditions of all mobile terminals, and the method comprises the following steps: the monitoring module inquires the average bandwidth occupation situation in a plurality of recent time and compares the total bandwidth to obtain the current bandwidth occupation ratio a, if no other mobile terminal is connected at present, the stage priority share is 1-a, and if other mobile terminals obtain the stage priority share at present, the minimum value is taken from the 1-a and other stage priority shares as the stage priority share of the mobile terminal. The stage priority share is mainly determined by the connection time sequence and the use condition of the current bandwidth in a comprehensive way, the distribution share as large as possible is ensured, and the rights of the later-arriving person are not more than those of the first-arriving person.
The control module controls the data transmission speed between the first communication module and the mobile terminal according to the stage priority share, and the control module comprises: and when the triggering condition is met, triggering a speed limiting mechanism and lasting for a plurality of times, namely, inquiring the stage priority shares of all connected mobile terminals by the control module, multiplying the stage priority shares by a preset flow value to obtain a share pool, and limiting the transmission speed to be a basic speed when the flow in the share pool corresponding to each mobile terminal is consumed up until the speed limiting mechanism is released or the next stage priority share is distributed. In order to prevent the share owner from occupying the resource for a long time, a share pool is introduced, the right of resource use is further quantized, even if the share is large and the priority is high, the resource use is limited within a certain range, and meanwhile, the priority of the predecessor is weakened over time by periodically updating the priority, so that the right of the successor is guaranteed.
In this embodiment, taking connection of three mobile terminals as an example, when a first mobile terminal is connected to a gateway, and a current bandwidth ratio is 0, a periodic priority share allocated to the first mobile terminal is 1; when the first mobile terminal is connected and uses data transmission for a certain time, the second mobile terminal is connected, and if the current bandwidth ratio is 0.3, the periodic priority share allocated to the second mobile terminal is 0.7 and is smaller than the periodic priority share allocated to the first mobile terminal, so that 0.7 is still reserved; and after the two mobile terminals operate for a period of time, the third mobile terminal is connected, so that the current bandwidth share ratio is 0.2, the stage priority share allocated to the third mobile terminal is 0.8, but the stage priority share allocated to the third mobile terminal is 0.7 finally because the stage priority share allocated to the second mobile terminal is smaller.
If a speed limiting mechanism is triggered in the working process of the three mobile terminals, the periodic priority share is multiplied by a preset flow value to obtain a share pool, the preset flow pool is 500M, the share pool obtained by the first terminal is 500M, and the share pools obtained by the second and third terminals are both 350M. And if a certain terminal exhausts the flow pool within the trigger duration of the speed limiting mechanism at the same time, limiting the speed.
By modifying the duration of each speed limiting mechanism, namely the updating time of the periodic priority share, the influence speed of the speed limiting effect can be adjusted, and the duration is short, so that the response is more sensitive and the speed limiting effect is more obvious.
In addition, the trigger conditions of the speed limit mechanism in this embodiment are: the detection is carried out at intervals, and the bandwidth occupation ratio detected twice in succession reaches a threshold value.
The basic speed of this embodiment is calculated as follows: and taking half of the transmission speed corresponding to the maximum bandwidth as the basic total speed, and dividing the basic total speed by the number of the mobile terminals connected currently to obtain the basic speed.
The embodiment further includes an interface module, where the interface module is used to connect the extension unit, and the interface module at least includes the following interfaces: an m.2Type2230 interface, namely an E KEY standard interface, which is externally connected with an INTEL 3168NGW module; the mSATA interface is used for externally connecting an mSATA hard disk of a SATA3 protocol; and the SFP + interface is used for externally connecting a gigabit SFP + electric port module or an SFP + optical port module. These interfaces allow the scalability of the gateway to be greatly increased.
The embodiment follows the principle of first-come first-serve and full utilization of resources, the periodic priority share is used for representing the periodic resource use right of each mobile terminal, and the speed control is carried out according to the periodic priority share after the speed limiting mechanism is triggered, so that the speed distribution and the data transmission stability in the peak period are ensured, and the data transmission in the rest time is not influenced, and the resources are fully utilized.
The substantial effects of the present embodiment include: information transmission channel resources of the gateways are reasonably distributed, speed limitation is not performed on the connected terminals in the low peak period, dynamic speed limitation is performed in the high peak period, stability of data transmission in the high peak period is guaranteed, utilization rate of the low peak period resources is not affected, and the problems in the prior art are solved.
Through the description of the above embodiments, those skilled in the art will understand that, for convenience and simplicity of description, only the division of the above functional modules is used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of a specific device is divided into different functional modules to complete all or part of the above described functions.
Units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed to a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.