The band width control method of powerline network and device
Technical field
The present invention relates to technical field of electric power communication, more particularly, to a kind of band width control method of powerline network and
Plant the bandwidth control apparatus of powerline network.
Background technology
In power system, powerline network carries the effect of key, and the unimpeded of powerline network determines respectively
Plant power project and electric grid operating can smoothly execute.Powerline network can adopt the wireless networks such as 3G or GPRS tissue
Mode, may also be employed the mode of cable network, or both have both at the same time.
Due to comprising the network terminal of enormous amount in powerline network, mostly these terminals are staff's execution electric power
Necessary during task.And the increase of terminal quantity means the increase of network bandwidth pressure, if a large amount of network terminal is simultaneously
Using network, then the situation of network congestion is just easy to occur.For example, typically at the beginning of the month monthly, distribution attendant will
Using handheld terminal, tour data of this month or file of checking meter etc. are downloaded by powerline network.At this moment generally require to download ratio
Larger packet, can take very many network bandwidth resources.If many people are simultaneously in the download carrying out big data bag,
Network congestion can be caused, everyone speed of download can become very slow, and the situation of failed download very likely occurs.Cause
How this, ensure the unimpeded of powerline network, and particularly multiple network terminals avoid when concurrently communicating network congestion occurring,
The service efficiency of big degree ground lifting powerline network and reliability, become a problem demanding prompt solution.
Content of the invention
Based on this, the invention provides a kind of band width control method of powerline network and a kind of powerline network
Bandwidth control apparatus.
A kind of band width control method of powerline network, comprises the following steps:
After server in powerline network receives the packet download request of network terminal transmission, detection is current
Whether the bandwidth usage of powerline network is more than or equal to the first preset value;
If the bandwidth usage of current power communication network is more than or equal to described first preset value, described service
Device is refused described packet download request and is sent network busy message to the described network terminal;
After the described network terminal receives described network busy message, initiate poll to described server, until downloading
To packet.
Compared with general technology, the band width control method of powerline network of the present invention efficiently solves power communication system
Concurrently communicate, when middle terminal quantity is more, the problem leading to network congestion.To each terminal, to server request downloading data
Bao Shi, server end detects the service condition of current network bandwidth.When the network bandwidth uses the threshold values reaching total bandwidth setting,
Then server refusal terminal-pair packet, such as makes an inspection tour the download of packet, basic data bag, photo and terminal software upgrading bag etc.
Request, thus avoid network congestion.According to network bandwidth service condition, adjust the transmission of data, the use of lifting whole network
Efficiency, and make powerline network relatively reliable, efficient and safety.
A kind of bandwidth control apparatus of powerline network, including detection module, processing module and poller module;
Described detection module and described processing module are located on the server in powerline network, described poller module position
On the network terminal in powerline network;
Described detection module, for receiving under the packet that the network terminal sends in the server in powerline network
After carrying request, whether the bandwidth usage of detection current power communication network is more than or equal to the first preset value;
Described processing module, is more than or equal to described first for the bandwidth usage in current power communication network pre-
If during value, refuse described packet download request and send network busy message to the described network terminal;
Described poller module, after receiving described network busy message in the described network terminal, to described service
Poll initiated by device, until downloading to packet.
Compared with general technology, the bandwidth control apparatus of powerline network of the present invention efficiently solve power communication system
Concurrently communicate, when middle terminal quantity is more, the problem leading to network congestion.To each terminal, to server request downloading data
Bao Shi, server end detects the service condition of current network bandwidth.When the network bandwidth uses the threshold values reaching total bandwidth setting,
Then server refusal terminal-pair packet, such as makes an inspection tour the download of packet, basic data bag, photo and terminal software upgrading bag etc.
Request, thus avoid network congestion.According to network bandwidth service condition, adjust the transmission of data, the use of lifting whole network
Efficiency, and make powerline network relatively reliable, efficient and safety.
Brief description
Fig. 1 is the schematic flow sheet of the band width control method of powerline network of the present invention;
Fig. 2 is the structural representation of the bandwidth control apparatus of powerline network of the present invention.
Specific embodiment
For further illustrating the effect of technological means that the present invention taken and acquirement, below in conjunction with the accompanying drawings and preferably real
Apply example, to technical scheme, carry out clear and complete description.
Refer to Fig. 1, be the schematic flow sheet of the band width control method of powerline network of the present invention.
The band width control method of powerline network of the present invention, comprises the following steps:
After server in S101 powerline network receives the packet download request of network terminal transmission, detection
Whether the bandwidth usage of current power communication network is more than or equal to the first preset value;
If the bandwidth usage of S102 current power communication network is more than or equal to described first preset value, described
Server is refused described packet download request and is sent network busy message to the described network terminal;
After the network terminal described in S103 receives described network busy message, initiate poll to described server, until
Download to packet.
In step S101, terminal to server initiates big data bag download request, and server end detects current network band
Whether wide use reaches the threshold values that total bandwidth sets, namely described first preset value.This first preset value can be according to actual conditions
Set, such as 80%.
Described server can be constituted by the way of J2EE+WEBSERVICE+WEBLOGIC, in the outlet bandwidth of server
The concurrent data transmission of 2 to 3 ten thousand terminals in the case of 20M, can be born.In this case, can be significantly using the present invention
Reduce network blocking probability, be the efficiency of bandwidth use that whole network lifts up to 50%~70%.
As one of embodiment, that whether the bandwidth usage of described detection current power communication network reaches is default
Before the step of value, comprise the following steps:
Judge the size of packet to be downloaded in the packet download request that the described network terminal sends whether less than or
Equal to the second preset value;
If the size of packet to be downloaded is less than or equal to described second preset value, described server accepts described
Packet download request, and provide packet to download to the described network terminal.
The packet that file size exceedes described second preset value can be described as big data bag, to each terminal, to service
When big data bag is downloaded in device request, server end detects the service condition of current network bandwidth, when the network bandwidth is total using reaching
The threshold values such as 80% that bandwidth sets, then server refusal terminal-pair big data bag(As make an inspection tour packet, basic data bag, photo,
Terminal software upgrading bag)Download request, the less basic communication for data volume(Data as order, task, list is upper and lower
Pass)Request then still normal response, thus avoid network congestion it is ensured that the basic communication request of terminal.So network can reduced
During obstruction it is ensured that information complete.
As one of embodiment, that whether the bandwidth usage of described detection current power communication network reaches is default
Before the step of value, comprise the following steps:
Judge whether the type of packet to be downloaded in the packet download request that the described network terminal sends belongs to default
Type;
If the type of packet to be downloaded belongs to described preset kind, described server accepts described packet and downloads
Request, and provide packet to download to the described network terminal.
Because, in power system, the packet of each type often has corresponding amount of capacity.For example, check meter literary composition
Part, tour data and continuous data etc., are often classified as big data bag.Client AKU, renewal configuration information and renewal
During basic data, the often also appearance along with big data bag.Therefore, according to packet to be downloaded in packet download request
Type, often also can judge whether this packet is big data bag.Server refuses the larger type of terminal-pair data capacity
Packet(As maked an inspection tour packet, basic data bag, photo, terminal software upgrading bag)Download request, less for data volume
Basic communication(Data as order, task, list passes up and down)Request then still normal response, thus avoiding network congestion, protects
The basic communication request of card terminal.
In step s 102, preset if the bandwidth usage of current power communication network is more than or equal to described first
It is worth, then described server is refused described packet download request and sent network busy message to the described network terminal.Server
End detection current network bandwidth using whether reaching the default threshold values of total bandwidth, such as when 80%, then refuse under terminal by server
Carry request, busy for bandwidth flag states code is placed in HTTP message head and returns to terminal, notify the busy needs of terminal network temporarily
Stop big data to download.
As one of embodiment, the described step sending network busy message to the described network terminal, including following
Step:
Described server would indicate that the conditional code of network busy is placed in HTTP message head, and by described HTTP message hair
Deliver to the described network terminal.
The busy conditional code of above-mentioned expression bandwidth by user's self-defining, and this self-defining conditional code can be expanded into
In HTTP message head.For example, in HTTP message head, the numerical value such as 200,201 and 203 are all defined, and this expression bandwidth is busy
Conditional code may be defined as 209 or other, as long as its numerical value is not repeated with the conditional code numerical value having existed.
In step s 103, after the described network terminal receives described network busy message, initiate to described server
Poll, until download to packet.The network terminal detects the expression network busy in the HTTP message head of server response
Conditional code(For example, it may be 209)Afterwards, start poll, initiate a packet download request at set intervals, until success
Download to packet and just stop poll.
As one of embodiment, the described step initiating poll to described server, comprise the following steps:
At interval of predetermined time period, the described network terminal sends a packet download request to described server, directly
To downloading to packet.
Take the mode of above-mentioned poll, carry out bandwidth control before network blocks.But because packet is downloaded
Request can not unrestrictedly be rejected, namely after network bandwidth occupancy reduces, can meet packet download request.This
When poll effect just embody, can network bandwidth occupancy situation take a turn for the better after the very first time request of terminal is made
Response, thus farthest improving powerline network utilization rate, meets thousands of terminal concurrence communications.
When being embodied as, the powerline network in the present invention can be using 3G network as network construction form.
In the method for the present invention, system architecture can adopt J2EE data service technology, and network organization mode can be using wireless
WCDMA, CDMA2000 or GPRS etc..
A preferred embodiment is described below:
Using the data WEB service mode based on J2EE framework, can avoid directly utilizing the socket communication of bottom, meet
The associated international standards of HTTP1.1 and DATA Service, the data of transmission can effectively be set by the various safety in wide area network
Standby.
The concurrent transmission of data is a big bottleneck of general mobile operating system, because one big in actual applications
System has the terminal of huge amount(Tens of thousands of or hundreds of thousands)It is ensured that the premise of efficient communication is to solve the communication resistance of concurrent transmission
Plug.Method of the present invention platform adopts J2EE+Web service to constitute, i.e. the data, services based on J2EE framework basis of enterprise-level
Issue software architecture, this system can support that the Data Concurrent of high intensity transmits data service, support mass data inquiry, have
High practicality.Wherein include:
J2EE linked system:J2EE linked system provides the mark of the EIS system integration existing in J2EE application and enterprise
Collimator frame.
JMS(Java information service):Java information service is the standard programming interface of a support communication system for enterprise, mesh
Be provide one leap dissimilar communication system common interface.Java application utilizes JMS API and enterprise
After communication system connects, application program just can utilize the function that communication system provides to create and send message, reach and other should
Purpose with system asynchronous communication.
JDBC API:It is the standard interface integrated with system R.Application program is obtained with this interface
Database connects, inquires about data and execute other database functions.
Web Services:EIS is allowed to provide some service access points, new application can obtain number by these points
According to it is also possible to submit data to.
The network bandwidth monitors, using existing ripe third party's network bandwidth monitoring tools monitoring bandwidth.
Above-described embodiment is based on CDMA, WCDMA, GPRS communication modes and transmits data;And the data based on J2EE framework
Service, solves concurrent communication network and blocks bottleneck problem, provide the enterprise of the powerful Web Data Service based on J2EE
The data, services data checking of level, can bear the concurrent data transmission of 2~30,000 distribution transformer terminals.
Compared with general technology, the band width control method of powerline network of the present invention efficiently solves power communication system
Concurrently communicate, when middle terminal quantity is more, the problem leading to network congestion.To each terminal, to server request downloading data
Bao Shi, server end detects the service condition of current network bandwidth.When the network bandwidth uses the threshold values reaching total bandwidth setting,
Then server refusal terminal-pair packet, such as makes an inspection tour the download of packet, basic data bag, photo and terminal software upgrading bag etc.
Request, thus avoid network congestion.According to network bandwidth service condition, adjust the transmission of data, the use of lifting whole network
Efficiency, and make powerline network relatively reliable, efficient and safety.
Using the method for the present invention, the operation of electric power field work system can be made more efficient, stable, lift the network bandwidth
Service efficiency, make system really have a practicality, improve the management automation level of Utilities Electric Co.s at different levels, promote power supply, join
Electricity, the orderly development of electricity consumption each side.
Refer to Fig. 2, be the structural representation of the bandwidth control apparatus of powerline network of the present invention.
A kind of bandwidth control apparatus of powerline network, including detection module 201, processing module 202 and poller module
203;
Described detection module 201 and described processing module 202 are located on the server in powerline network, described poll
Module 203 is located on the network terminal in powerline network;
Described detection module 201, receives the data of network terminal transmission for the server in powerline network
After bag download request, whether the bandwidth usage of detection current power communication network is more than or equal to the first preset value;
Described processing module 202, is more than or equal to described for the bandwidth usage in current power communication network
During one preset value, refuse described packet download request and send network busy message to the described network terminal;
Described poller module 203, after receiving described network busy message in the described network terminal, to described clothes
Poll initiated by business device, until downloading to packet.
As one of embodiment, the bandwidth control apparatus of powerline network of the present invention also include judge module;
Described judge module, for judging packet to be downloaded in the packet download request that the described network terminal sends
Whether size is less than or equal to the second preset value;
If the size of packet to be downloaded is less than or equal to described second preset value, described processing module accepts institute
State packet download request, and provide packet to download to the described network terminal.
The packet that file size exceedes described second preset value can be described as big data bag, to each terminal, to service
When big data bag is downloaded in device request, server end detects the service condition of current network bandwidth, when the network bandwidth is total using reaching
The threshold values such as 80% that bandwidth sets, then server refusal terminal-pair big data bag(As make an inspection tour packet, basic data bag, photo,
Terminal software upgrading bag)Download request, the less basic communication for data volume(Data as order, task, list is upper and lower
Pass)Request then still normal response, thus avoid network congestion it is ensured that the basic communication request of terminal.So network can reduced
During obstruction it is ensured that information complete.
As one of embodiment, the bandwidth control apparatus of powerline network of the present invention also include judge module;
Described judge module, for judging packet to be downloaded in the packet download request that the described network terminal sends
Whether type belongs to preset kind;
If the type of packet to be downloaded belongs to described preset kind, described processing module accepts under described packet
Carry request, and provide packet to download to the described network terminal.
Because, in power system, the packet of each type often has corresponding amount of capacity.For example, check meter literary composition
Part, tour data and continuous data etc., are often classified as big data bag.Client AKU, renewal configuration information and renewal
During basic data, the often also appearance along with big data bag.Therefore, according to packet to be downloaded in packet download request
Type, often also can judge whether this packet is big data bag.Server refuses the larger type of terminal-pair data capacity
Packet(As maked an inspection tour packet, basic data bag, photo, terminal software upgrading bag)Download request, less for data volume
Basic communication(Data as order, task, list passes up and down)Request then still normal response, thus avoiding network congestion, protects
The basic communication request of card terminal.
As one of embodiment, described processing module is used for would indicate that the conditional code of network busy is placed in HTTP message
In head, and described HTTP message hair is delivered to the described network terminal.
The busy conditional code of above-mentioned expression bandwidth by user's self-defining, and this self-defining conditional code can be expanded into
In HTTP message head.For example, in HTTP message head, the numerical value such as 200,201 and 203 are all defined, and this expression bandwidth is busy
Conditional code may be defined as 209 or other, as long as its numerical value is not repeated with the conditional code numerical value having existed.
As one of embodiment, described poller module is used at interval of predetermined time period, sends out to described server
Send a packet download request, until downloading to packet.
Take the mode of above-mentioned poll, carry out bandwidth control before network blocks.But because packet is downloaded
Request can not unrestrictedly be rejected, namely after network bandwidth occupancy reduces, can meet packet download request.This
When poll effect just embody, can network bandwidth occupancy situation take a turn for the better after the very first time request of terminal is made
Response, thus farthest improving powerline network utilization rate, meets thousands of terminal concurrence communications.
Compared with general technology, the bandwidth control apparatus of powerline network of the present invention efficiently solve power communication system
Concurrently communicate, when middle terminal quantity is more, the problem leading to network congestion.To each terminal, to server request downloading data
Bao Shi, server end detects the service condition of current network bandwidth.When the network bandwidth uses the threshold values reaching total bandwidth setting,
Then server refusal terminal-pair packet, such as makes an inspection tour the download of packet, basic data bag, photo and terminal software upgrading bag etc.
Request, thus avoid network congestion.According to network bandwidth service condition, adjust the transmission of data, the use of lifting whole network
Efficiency, and make powerline network relatively reliable, efficient and safety.
Embodiment described above only have expressed the several embodiments of the present invention, and its description is more concrete and detailed, but simultaneously
Therefore the restriction to the scope of the claims of the present invention can not be interpreted as.It should be pointed out that for those of ordinary skill in the art
For, without departing from the inventive concept of the premise, some deformation can also be made and improve, these broadly fall into the guarantor of the present invention
Shield scope.Therefore, the protection domain of patent of the present invention should be defined by claims.