Summary of the invention
Based on this, it is necessary to the technical issues of leading to systemic breakdown for above-mentioned single-point link failure, provide one kind and be based on
Communication control method, device, communication control unit and the storage medium of docker.
To achieve the goals above, on the one hand, the embodiment of the present application provides a kind of communication control side based on docker
Method, which comprises
Receive the access connection request of acquisition equipment, wherein access connection request includes target main website and acquisition equipment
Facility information;
Facility information according to acquisition equipment is that acquisition equipment distributes corresponding docker container, obtains docker container
Network configuration information;
Docker container is established according to the network configuration information of docker container and acquires the communication connection relationship of equipment, with
Acquisition equipment is set to pass through corresponding docker container and target master station communication.
The network configuration information of docker container includes the IP address of docker container in one of the embodiments,;Then
Docker container is established according to the network configuration information of docker container and acquires the communication connection relationship of equipment, comprising: according to
The IP address of docker container establishes information transfer channel and encrypted transmission channel respectively, wherein information transfer channel is for adopting
Collect the transmission that data and control instruction are carried out between equipment and target main website, encrypted transmission channel is for acquiring equipment and docker
Data are transmitted between container by the way of coded communication.
Information transfer channel includes data transmission channel and control instruction transmission channel, number in one of the embodiments,
According to transmission channel for acquiring equipment to target main website reported data;Control instruction transmission channel is set for target main website to acquisition
Preparation send control instruction.
Encrypted transmission channel includes that the first encrypted transmission channel and the second encrypted transmission are logical in one of the embodiments,
Road, the first encrypted transmission channel is for acquiring equipment by the way of coded communication to docker container transport data;Second adds
Close transmission channel is for docker container to acquisition equipment transmission data by the way of coded communication.
Docker container is established according to the network configuration information of docker container in one of the embodiments, to set with acquisition
After standby communication connection relationship, further includes: the operating status of monitoring docker container;When monitor docker container occur therefore
When barrier, new docker container is generated according to the network configuration information of docker container;Establish new docker container and acquisition
The communication connection relationship of equipment, so that acquisition equipment passes through new docker container and target master station communication.
On the other hand, the embodiment of the present application also provides a kind of communication control unit based on docker, which includes:
Request receiving module is that access connection request includes wait visit for receiving the access connection request of acquisition equipment
It asks target main website and acquires the facility information of equipment;
Docker container allocation module, for being that acquisition equipment distribution is corresponding according to the facility information of acquisition equipment
Docker container obtains the network configuration information of docker container;
Module is established in communication connection, for establishing docker container and acquisition according to the network configuration information of docker container
The communication connection relationship of equipment, so that acquisition equipment passes through corresponding docker container and target master station communication.
The network configuration information of docker container includes the IP address of docker container in one of the embodiments,;Then
Communication connection establishes module and is specifically used for establishing information transfer channel and encrypted transmission respectively according to the IP address of docker container
Channel, wherein information transfer channel is used to acquire the transmission that data and control instruction are carried out between equipment and target main website, encryption
Transmission channel transmits data between equipment and docker container for acquiring by the way of coded communication.
Above-mentioned apparatus further includes monitoring modular in one of the embodiments, for monitoring the operation shape of docker container
State generates new docker according to the network configuration information of docker container and holds when monitoring that docker container breaks down
Device;Then communication connection is established module and is also used to, and the communication connection relationship of new docker container and acquisition equipment is established, so as to adopt
Collect equipment and passes through new docker container and target master station communication.
Another aspect, it is described the embodiment of the present application also provides a kind of communication control unit, including memory and processor
The step of memory is stored with computer program, and the processor realizes method as described above when executing the computer program.
In another aspect, being stored thereon with computer the embodiment of the present application also provides a kind of computer readable storage medium
The step of program, the computer program realizes method as described above when being executed by processor.
The above-mentioned communication control method based on docker, device, communication control unit and storage medium are acquired by receiving
The access connection request of equipment distributes corresponding docker container for acquisition equipment, and obtains the network configuration of docker container
Information establishes docker container according to the network configuration information of docker container and acquires the communication connection relationship of equipment, so that
Equipment is acquired by corresponding docker container and target master station communication, since docker container is with sandbox mechanism, it is mutual it
Between do not have any interface, and almost without performance cost, therefore, by the one-to-one correspondence of docker container and acquisition equipment,
The problem of can effectively solve the problem that the Single Point of Faliure of the communication equipment of front end processor in traditional technology and leading to systemic breakdown, and realize
The load balancing of system.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not
For limiting the application.
Communication control method provided by the present application based on docker, can be applied in application environment as shown in Figure 1.
Wherein, respectively acquisition equipment 102 is communicated by communication control unit 104 with main website 106, acquires equipment 102 and communication control
Connection is established by network between equipment 104, communication control unit 104 can be deployed in the inside of main website 106, can also be independent
Setting, and establish and communicate to connect with main website 106.Specifically, in the present embodiment, when communication control unit 104 receive it is a certain
It is the acquisition equipment according to the facility information of the acquisition equipment 102 when acquiring access connection request of the equipment 102 to main website 106
The corresponding docker container of 102 distribution, and the network configuration information of docker container is obtained, and then according to the net of docker container
Network configuration information establishes the communication connection relationship of docker container Yu the acquisition equipment 102 so that the acquisition equipment 102 by pair
The docker container answered is communicated with target main website 106.
Wherein, acquisition equipment 102 can be, but not limited to be the various terminal devices for carrying out data acquisition, such as be distributed in power grid
In distribution transformer terminals, low-voltage collecting meter reading acquisition terminal etc..Main website 106 can be formed with the either multiple servers of independent server
Server cluster realize.Communication control unit 104 then can be the computer for being deployed with docker (application container engine)
Equipment.
In one embodiment, as shown in Fig. 2, providing a kind of communication control method based on docker, in this way
Applied to being illustrated for the communication control unit in Fig. 1, method includes the following steps:
Step 202, the access connection request of acquisition equipment is received.
Specifically, since front-end collection equipment is communicated with main website by communication control unit, front-end collection is set
It is standby communicated with main website before, need elder generation and communication control unit establish connection, i.e., send access connection to communication control unit
Request, wherein access connection request includes the facility information of target main website and acquisition equipment.Specifically, the equipment of acquisition equipment
Information can be acquisition equipment address information, such as acquire equipment IP address (Internet Protocol Address, mutually
Networking protocol address), MAC (Media Access Control, medium access control) address etc..
Step 204, it is that acquisition equipment distributes corresponding docker container according to the facility information of acquisition equipment, obtains
The network configuration information of docker container.
Due to being deployed with docker i.e. application container engine in communication control unit, communication control unit receives
After the access connection request for acquiring equipment, communication control unit is then according to the facility information for acquiring equipment in access connection request
It acquires equipment and distributes corresponding docker container.And obtain the network configuration information of docker container, wherein network configuration information
May include but it is unlimited be docker container IP address.
Step 206, docker container is established according to the network configuration information of docker container and acquires the communication link of equipment
Connect relationship.
In the present embodiment, communication control unit is according to the IP of the network configuration information such as docker container of docker container
Address establishes docker container and acquires the communication connection relationship of equipment, i.e., is realized by the network configuration information of docker container
The one-to-one correspondence of docker container and acquisition equipment, so that acquisition equipment passes through corresponding docker container and target main website
Communication.
The above-mentioned communication control method based on docker is set by receiving the access connection request of acquisition equipment for acquisition
Back-up matches corresponding docker container, and obtains the network configuration information of docker container, is matched according to the network of docker container
Confidence breath establishes docker container and acquires the communication connection relationship of equipment, so that acquisition equipment passes through corresponding docker container
Any interface is not had, and between each other almost without property since docker container has sandbox mechanism with target master station communication
Therefore energy expense by the one-to-one correspondence of docker container and acquisition equipment, can effectively solve the problem that front end processor in traditional technology
The Single Point of Faliure of communication equipment and the problem of lead to systemic breakdown, and realize the load balancing of system.
In one embodiment, the network configuration information of docker container includes the IP address of docker container, then basis
The network configuration information of docker container establishes docker container and acquires the communication connection relationship of equipment, can specifically include:
Routing policy is generated according to the IP address or MAC Address of the IP address of docker container and acquisition equipment, is passed to establish communication
Defeated channel.Wherein, communication transmission passage includes information transfer channel and encrypted transmission channel.Specifically, information transfer channel is used
In acquisition equipment and target main website between carry out data and control instruction transmission, encrypted transmission channel for acquire equipment with
Data are transmitted by the way of coded communication between docker container.The present embodiment is a pair of in docker container and acquisition equipment one
On the basis of answering, by establishing multiple communication transmission passages, to realize the data that can transmit various businesses type needs, mention
The high compatibility of system.
In one embodiment, information transfer channel can also include data transmission channel and control instruction transmission channel,
Wherein, data transmission channel is for acquiring equipment to target main website reported data, such as log or record data.Control instruction passes
Defeated channel sends control instruction to acquisition equipment for target main website, such as down distributing configuration data, response data format, operating status
The control instructions such as monitoring, to realize the control function to acquisition equipment.
Encrypted transmission channel then may include the first encrypted transmission channel and the second encrypted transmission channel, specifically, working as net
When network communication is insincere, acquisition equipment can pass through the first encrypted transmission channel to docker container by the way of coded communication
Transmit data;Docker container can then be transmitted by the second encrypted transmission channel to acquisition equipment by the way of coded communication
Data, to guarantee the safety of transmission information.The present embodiment transmits needs by establishing different communication transmission passages
Data improve the efficiency of data transmission to realize the concurrency of data transmission to a certain extent.
In one embodiment, as shown in figure 3, according to the network configuration information of docker container establish docker container with
After the communication connection relationship for acquiring equipment, the above method can also include the following steps:
Step 302, the operating status of docker container is monitored.
Wherein, the operating status of docker container includes whether docker container itself has response or corresponding each communication
Whether transmission channel has response.In the present embodiment, when communication control unit establishes docker container and acquires the logical of equipment
After believing connection relationship, the operating status of docker container can also be monitored.
Step 304, it when monitoring that docker container breaks down, is generated according to the network configuration information of docker container
New docker container.
In the present embodiment, when docker container does not respond to itself, then it represents that docker container breaks down, because
This, can generate new docker container according to the network configuration information of the docker container of failure, i.e. duplication failure
The network configuration information of docker container is to re-establish corresponding new docker container, thus with new docker container generation
For failure docker container.
Step 306, the communication connection relationship of new docker container and acquisition equipment is established.
Specifically, for the acquisition equipment of communication connection relationship is established with failure docker container, establish its with it is new
Communication connection relationship between docker container, so that the acquisition equipment can pass through new docker container and target master
It stands communication.Wherein, the establishment process for communicating to connect relationship can refer to above-described embodiment, and details are not described herein again.
It should be understood that although each step in the flow chart of Fig. 1-3 is successively shown according to the instruction of arrow,
These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps
Execution there is no stringent sequences to limit, these steps can execute in other order.Moreover, at least one in Fig. 1-3
Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps
Completion is executed, but can be executed at different times, the execution sequence in these sub-steps or stage is also not necessarily successively
It carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternately
It executes.
In one embodiment, as shown in figure 4, providing a kind of communication control unit based on docker, comprising: request
Module 403 is established in receiving module 401, docker container allocation module 402 and communication connection, in which:
Request receiving module 401, for receiving the access connection request of acquisition equipment, wherein accessing connection request includes
The facility information of target main website to be visited and acquisition equipment;
Docker container allocation module 402, for being that acquisition equipment distribution is corresponding according to the facility information of acquisition equipment
Docker container obtains the network configuration information of docker container;
Communication connection establish module 403, for according to the network configuration information of docker container establish docker container with
The communication connection relationship of equipment is acquired, so that acquisition equipment passes through corresponding docker container and target master station communication.
In one embodiment, as shown in figure 5, further including monitoring modular 404, for monitoring the operation shape of docker container
State generates new docker according to the network configuration information of docker container and holds when monitoring that docker container breaks down
Device;Then communication connection is established module 403 and is also used to, and establishes the communication connection relationship of new docker container and acquisition equipment, with
Acquisition equipment is set to pass through new docker container and target master station communication.
In one embodiment, the network configuration information of docker container includes the IP address of docker container;Then communicate
Connection establishment module 403 is specifically used for establishing information transfer channel respectively according to the IP address of docker container and encrypted transmission is logical
Road, wherein information transfer channel is used to acquire the transmission that data and control instruction are carried out between equipment and target main website, and encryption passes
Data are transmitted by the way of coded communication between equipment and docker container for acquiring in defeated channel.
In one embodiment, information transfer channel includes data transmission channel and control instruction transmission channel, wherein number
According to transmission channel for acquiring equipment to target main website reported data;Control instruction transmission channel is set for target main website to acquisition
Preparation send control instruction.Encrypted transmission channel includes the first encrypted transmission channel and the second encrypted transmission channel, wherein first adds
Close transmission channel is for acquiring equipment by the way of coded communication to docker container transport data;Second encrypted transmission channel
For docker container to acquisition equipment transmission data by the way of coded communication.
Specific restriction about the communication control unit based on docker may refer to above for based on docker's
The restriction of communication control method, details are not described herein.Modules in the above-mentioned communication control unit based on docker can be complete
Portion or part are realized by software, hardware and combinations thereof.Above-mentioned each module can be embedded in the form of hardware or independently of calculating
In processor in machine equipment, it can also be stored in a software form in the memory in computer equipment, in order to processor
It calls and executes the corresponding operation of the above modules.
In one embodiment, a kind of communication control unit is provided, which, which can be, is deployed with
The computer equipment of docker application container engine, internal structure chart can be as shown in Figure 6.The communication control unit includes logical
Cross processor, memory, network interface and the docker application container engine of system bus connection.Wherein, the communication equipment
Processor is for providing calculating and control ability.The memory of the communication control unit includes non-volatile memory medium, memory
Reservoir.The non-volatile memory medium is stored with operating system, computer program and docker application container engine.The interior storage
Device provides environment for the operation of operating system and computer program in non-volatile memory medium.The net of the communication control unit
Network interface is used to communicate with external acquisition equipment and main website by network connection.When the computer program is executed by processor with
Realize a kind of communication control method based on docker.
It will be understood by those skilled in the art that structure shown in Fig. 6, only part relevant to application scheme is tied
The block diagram of structure does not constitute the restriction for the communication control unit being applied thereon to application scheme, specific communication control
Equipment may include perhaps combining certain components or with different component cloth than more or fewer components as shown in the figure
It sets.
In one embodiment, a kind of computer equipment, including memory and processor are provided, is stored in memory
Computer program, the processor perform the steps of when executing computer program
Receive the access connection request of acquisition equipment, wherein access connection request includes target main website and acquisition equipment
Facility information;
Facility information according to acquisition equipment is that acquisition equipment distributes corresponding docker container, obtains docker container
Network configuration information;
Docker container is established according to the network configuration information of docker container and acquires the communication connection relationship of equipment, with
Acquisition equipment is set to pass through corresponding docker container and target master station communication.
In one embodiment, the network configuration information of docker container includes the IP address of docker container;Then basis
The network configuration information of docker container establishes docker container and acquires the communication connection relationship of equipment, comprising: according to
The IP address of docker container establishes information transfer channel and encrypted transmission channel respectively, wherein information transfer channel is for adopting
Collect the transmission that data and control instruction are carried out between equipment and target main website, encrypted transmission channel is for acquiring equipment and docker
Data are transmitted between container by the way of coded communication.
In one embodiment, information transfer channel includes data transmission channel and control instruction transmission channel, and data pass
Defeated channel is for acquiring equipment to target main website reported data;Control instruction transmission channel is sent out for target main website to acquisition equipment
Send control instruction.
In one embodiment, encrypted transmission channel includes the first encrypted transmission channel and the second encrypted transmission channel, the
One encrypted transmission channel is for acquiring equipment by the way of coded communication to docker container transport data;Second encrypted transmission
Channel is for docker container to acquisition equipment transmission data by the way of coded communication.
In one embodiment, docker container is established according to the network configuration information of docker container and acquires equipment
After communication connection relationship, further includes: the operating status of monitoring docker container;When monitor docker container break down
When, new docker container is generated according to the network configuration information of docker container;New docker container is established to set with acquisition
Standby communication connection relationship, so that acquisition equipment passes through new docker container and target master station communication.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated
Machine program performs the steps of when being executed by processor
Receive the access connection request of acquisition equipment, wherein access connection request includes target main website and acquisition equipment
Facility information;
Facility information according to acquisition equipment is that acquisition equipment distributes corresponding docker container, obtains docker container
Network configuration information;
Docker container is established according to the network configuration information of docker container and acquires the communication connection relationship of equipment, with
Acquisition equipment is set to pass through corresponding docker container and target master station communication.
In one embodiment, the network configuration information of docker container includes the IP address of docker container;Then basis
The network configuration information of docker container establishes docker container and acquires the communication connection relationship of equipment, comprising: according to
The IP address of docker container establishes information transfer channel and encrypted transmission channel respectively, wherein information transfer channel is for adopting
Collect the transmission that data and control instruction are carried out between equipment and target main website, encrypted transmission channel is for acquiring equipment and docker
Data are transmitted between container by the way of coded communication.
In one embodiment, information transfer channel includes data transmission channel and control instruction transmission channel, and data pass
Defeated channel is for acquiring equipment to target main website reported data;Control instruction transmission channel is sent out for target main website to acquisition equipment
Send control instruction.
In one embodiment, encrypted transmission channel includes the first encrypted transmission channel and the second encrypted transmission channel, the
One encrypted transmission channel is for acquiring equipment by the way of coded communication to docker container transport data;Second encrypted transmission
Channel is for docker container to acquisition equipment transmission data by the way of coded communication.
In one embodiment, docker container is established according to the network configuration information of docker container and acquires equipment
After communication connection relationship, further includes: the operating status of monitoring docker container;When monitor docker container break down
When, new docker container is generated according to the network configuration information of docker container;New docker container is established to set with acquisition
Standby communication connection relationship, so that acquisition equipment passes through new docker container and target master station communication.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer
In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein,
To any reference of memory, storage, database or other media used in each embodiment provided herein,
Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM
(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include
Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms,
Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing
Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment
In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance
Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art
It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application
Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.