CN108092839A - A kind of method and apparatus for establishing network connection - Google Patents
A kind of method and apparatus for establishing network connection Download PDFInfo
- Publication number
- CN108092839A CN108092839A CN201611046908.1A CN201611046908A CN108092839A CN 108092839 A CN108092839 A CN 108092839A CN 201611046908 A CN201611046908 A CN 201611046908A CN 108092839 A CN108092839 A CN 108092839A
- Authority
- CN
- China
- Prior art keywords
- location
- based service
- service component
- power
- firmly
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0654—Management of faults, events, alarms or notifications using network fault recovery
- H04L41/0659—Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities
- H04L41/0661—Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities by reconfiguring faulty entities
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Telephonic Communication Services (AREA)
Abstract
The embodiment of the invention discloses a kind of method and apparatus for establishing network connection, belong to Internet technical field.The described method includes:Based on default detection cycle, the connection state of detection power & environment supervision host and location-based service component;When detecting that the power & environment supervision host is not connected normally with the location-based service component, the location-based service component is controlled to restart firmly;When detecting that the power & environment supervision host is normally connected with the location-based service component, network connection is established by the location-based service component and monitoring backstage.It, can be offline for a long time to avoid FSU using the present invention.
Description
Technical field
The present invention relates to Internet technical field, more particularly to a kind of method and apparatus for establishing network connection.
Background technology
For the dynamic environment of remote monitoring computer room, technical staff often passes through FSU (Field Supervision
Unit, power & environment supervision host) other power that the dynamic environment data of acquisition computer room include being connected to building environment and with FSU set
Standby data etc., and then, computer room is monitored.For example, can set Temperature Humidity Sensor in computer room, (wherein, humiture passes
The humiture of environment where sensor can sense), the equipment such as air-conditioning, FSU can be electrical with the equipment such as Temperature Humidity Sensor, air-conditioning
Connection, it is thus possible to the gathered data of associated devices is obtained, and then, the gathered data of acquisition can be uploaded by internet
To monitoring backstage (such as server).In addition, FSU can also receive the control instruction that monitor supervision platform issues by internet, into
And coupled equipment is controlled according to control instruction, for example, control instruction be by the temperature setting of air-conditioning be 15
Degree, then FSU can be according to the temperature of control instruction adjusting air-conditioning.
General FSU can be by interface with connecting (wherein location-based service component for connecting the location-based service component of internet
Can have wireless networking capabilities), FSU can realize network connection by location-based service component, and FSU is location-based service component
It is powered.In order to preferably, more timely carry out remote monitoring to computer room, avoid FSU it is offline for a long time (avoid FSU with
Monitoring backstage disconnects network connection for a long time) become particularly important.At present, avoiding FSU, offline method is for a long time:Work as FSU
Detect with monitoring backstage disconnect network connection when, FSU will according to the flow that network connection is established with monitoring backstage, attempt with
Monitoring backstage re-establishes network connection.Wherein, the flow that FSU establishes network connection with monitoring backstage is usually:First, FSU
It can detect whether FSU is normally connected with location-based service module, in the situation for detecting FSU and being normally connected with location-based service module
Under, FSU can establish network connection by network dial process, and finally, FSU sends registration request to monitoring backstage, registers
The network connection of FSU and monitoring backstage can be completed after work(.
In the implementation of the present invention, inventor has found that the prior art has at least the following problems:
The processing mode of network connection is established based on above-mentioned FSU and monitor supervision platform, only in FSU and location-based service component just
Often on the premise of connection, FSU could establish network connection with monitor supervision platform, when FSU is not connected normally with location-based service component,
FSU can not establish network connection with monitoring backstage, so as to cause FSU offline for a long time.
The content of the invention
In order to solve problem of the prior art, an embodiment of the present invention provides a kind of methods and dress for establishing network connection
It puts.The technical solution is as follows:
In a first aspect, a kind of method for establishing network connection is provided, the described method includes:
Based on default detection cycle, the connection state of detection power & environment supervision host and location-based service component;
When detecting that the power & environment supervision host is not connected normally with the location-based service component, the position is controlled to take
Business component is restarted firmly;
When detecting that the power & environment supervision host is normally connected with the location-based service component, pass through the location-based service
Component establishes network connection with monitoring backstage.
Optionally, it is described when detecting that the power & environment supervision host is not connected normally with the location-based service component, control
The location-based service component is made firmly to restart, including:
When detecting the device node that the corresponding location-based service component is not present under default file catalogue, described in control
Location-based service component is restarted firmly.
Optionally, it is described to work as the device node for detecting and the corresponding location-based service component being not present under default file catalogue
When, the location-based service component is controlled to restart firmly, including:
The device node for corresponding to the location-based service component is not present under default file catalogue when detecting, and the equipment
When node loss duration reaches preset duration, the location-based service component is controlled to restart firmly.
Optionally, it is described when detecting that the power & environment supervision host is not connected normally with the location-based service component, control
The location-based service component is made firmly to restart, including:
When detecting that the device node of correspondence position Service Part under default file catalogue there are during numerical abnormality, controls institute
Rheme is put Service Part and is restarted firmly, wherein, the numerical abnormality is to correspond to the location-based service component under default file catalogue
The number of device node is less than the corresponding default device node number of the location-based service component and more than 0.
Optionally, the method further includes:
When the number for being consecutively detected numerical abnormality reaches preset times threshold value, the power & environment supervision host is performed soft
Restart.
Optionally, the method further includes:
In predetermined time, the network connection status of the power & environment supervision host and the monitoring backstage is detected;
When detecting that the power & environment supervision host disconnects network connection with the monitoring backstage, the location-based service is controlled
Component is restarted firmly.
Optionally, it is described when detecting that the power & environment supervision host disconnects network connection with the monitoring backstage, control
The location-based service component is restarted firmly, including:
When detect public network virtual network port be not present either private network virtual network port be not present or public network virtual network port with
In the presence of private network virtual network port but the location-based service component is not when the monitoring backstage is registered, and controls the position
Service Part is restarted firmly.
Second aspect, provides a kind of device for establishing network connection, and described device includes:
Detection module, for being based on default detection cycle, the connection of detection power & environment supervision host and location-based service component
Situation;
Control module, for when detecting that the power & environment supervision host is not connected normally with the location-based service component,
The location-based service component is controlled to restart firmly;
Link block, for when detecting that the power & environment supervision host is normally connected with the location-based service component, leading to
It crosses the location-based service component and establishes network connection with monitoring backstage.
Optionally, the control module, is used for:
When detecting the device node that the corresponding location-based service component is not present under default file catalogue, described in control
Location-based service component is restarted firmly.
Optionally, the control module, is used for:
The device node for corresponding to the location-based service component is not present under default file catalogue when detecting, and the equipment
When node loss duration reaches preset duration, the location-based service component is controlled to restart firmly.
Optionally, the control module, is used for:
When detecting that the device node of correspondence position Service Part under default file catalogue there are during numerical abnormality, controls institute
Rheme is put Service Part and is restarted firmly, wherein, the numerical abnormality is to correspond to the location-based service component under default file catalogue
The number of device node is less than the corresponding default device node number of the location-based service component and more than 0.
Optionally, described device further includes:
Execution module, for when the number for being consecutively detected numerical abnormality reaches preset times threshold value, to the rotating ring
Monitoring host computer performs soft reboot.
Optionally, the detection module, is additionally operable to:
In predetermined time, the network connection status of the power & environment supervision host and the monitoring backstage is detected;
The control module, is additionally operable to:
When detecting that the power & environment supervision host disconnects network connection with the monitoring backstage, the location-based service is controlled
Component is restarted firmly.
Optionally, the control module, is used for:
When detect public network virtual network port be not present either private network virtual network port be not present or public network virtual network port with
In the presence of private network virtual network port but the location-based service component is not when the monitoring backstage is registered, and controls the position
Service Part is restarted firmly.
The advantageous effect that technical solution provided in an embodiment of the present invention is brought is:
In the embodiment of the present invention, power & environment supervision host FSU can periodically to itself whether with location-based service component just
Often connection is detected, and when detecting that FSU is not connected normally with location-based service component, FSU can control position Service Part
Restart firmly, i.e. FSU can give location-based service component to power off, and supply power for again afterwards, after location-based service component is restarted firmly, FSU can
With by location-based service component, monitoring backstage corresponding with power & environment supervision host establishes network connection.In this way, as power & environment supervision master
When machine is not connected normally with location-based service component, FSU can make power & environment supervision host by the way that position Service Part is controlled to restart firmly
It can be normally connected automatically with location-based service component, and then, FSU can re-establish network connection with monitoring backstage, thus, it can
It is offline for a long time to avoid FSU.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is only some embodiments of the present invention, for
For those of ordinary skill in the art, without creative efforts, other are can also be obtained according to these attached drawings
Attached drawing.
Fig. 1 is a kind of method flow diagram for establishing network connection provided in an embodiment of the present invention;
Fig. 2 is a kind of component connection diagram provided in an embodiment of the present invention;
Fig. 3 is a kind of apparatus structure schematic diagram for establishing network connection provided in an embodiment of the present invention;
Fig. 4 is a kind of apparatus structure schematic diagram for establishing network connection provided in an embodiment of the present invention;
Fig. 5 is a kind of terminal structure schematic diagram provided in an embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention
Formula is described in further detail.
An embodiment of the present invention provides a kind of method for establishing network connection, the executive agent of this method is power & environment supervision master
Machine.Processor, memory can be provided in the power & environment supervision host, processor can be used for controlling position Service Part firmly heavy
Open and established with monitor supervision platform the relevant treatment of network connection, memory can be used for storing following processing procedure needs and
The data of generation.Transceiver is also provided with, transceiver can be used for sending and receiving data.
Below in conjunction with specific embodiment, process flow shown in FIG. 1 is described in detail, content can be as
Under:
In step 101, based on default detection cycle, the connection shape of detection power & environment supervision host and location-based service component
Condition.
Wherein, location-based service component can be with wireless networking capabilities and GPS (Global Positioning
System, global positioning system) positioning function component, USB (Universal Serial Bus, general serial can be passed through
Bus) interface is external in outside FSU, can also be inscribed in inside FSU, and FSU can be realized by location-based service component on wireless
Net function.
In force, technical staff can connect power & environment supervision host FSU and location-based service component beforehand through connecting line
It connects, during FSU or location-based service component working, some reasons may result in FSU and fail just with location-based service component
Often connection, so as to which FSU be caused to disconnect network connection with monitoring backstage.In the course of work of FSU, FSU can be to itself and position
The connection state for putting Service Part is detected.Specifically, detection cycle can be previously stored in FSU, wherein, default inspection
It can be smaller duration to survey the cycle, can be pre-set by technical staff.After FSU start work, every default detection
Cycle, FSU can be detected the connection state of itself and location-based service component, and the connection of FSU and location-based service component are shown
It is intended to as shown in Fig. 2, wherein, location-based service component can pass through LTE (Long Term Evolution, Long Term Evolution) antenna
Realize wireless networking capabilities, the master chip arm of FSU can be the processor of FSU, and FSU can also include output port, the output
The output voltage of port can be 12 volts (V), which can be electrically connected with the supply port of location-based service component,
To power for location-based service component, arm can pass through USB (Universal Serial Bus, universal serial bus) and position
Service Part connection is put, it can be by the line and location-based service component into row data communication, MCU (Microcontroller
Unit, microcontroller) it can also be electrically connected with arm, output port, and then, arm can be by MCU come control output end mouthful
Output voltage, and then, it can be powered off by MCU to location-based service component.
In step 102, when detecting that power & environment supervision host is not connected normally with location-based service component, location-based service is controlled
Component is restarted firmly.
In force, when FSU detects that itself fails normally to be connected with location-based service component, FSU can be with control bit
It puts Service Part firmly to restart, i.e., when FSU detects that itself is not connected normally with location-based service component, inside can be passed through
MCU powers off position Service Part, it is powered again again afterwards, so that location-based service component is restarted firmly.
Optionally, when FSU is normally connected with location-based service component, device node can be mapped out in FSU, is actually used
In, since defect occasional existing for location-based service component causes device node mapping abnormal, mapped based on device node abnormal
Situation it is different, the processing mode of step 102 can be varied, and following present several feasible processing modes:
Mode one, when detecting the device node that correspondence position Service Part is not present under default file catalogue, control
Location-based service component is restarted firmly.
In force, when FSU is normally connected with location-based service component, can be mapped out under the default file catalogue in FSU
Corresponding file (can map out device node corresponding with the location-based service component of FSU connections), for example, when FSU and position
When Service Part normally connects, FSU /dev catalogues under can be there are ttyUsb_3Gn nodes, n is the integer between 0~19.FSU
Default detection cycle can be based on, the device node that whether there is correspondence position Service Part under predetermined directory is detected, works as inspection
(i.e. such mapping abnormal conditions are mapping when measuring the device node that correspondence position Service Part is not present under default file catalogue
The number of device node be that zero), FSU can control position Service Part to restart firmly, so as to automatically to current exception
Situation is repaired, and then, FSU can be allowd normally to be connected with location-based service component.
Optionally, FSU can also be when device node loses duration and reaches preset duration, then controls position Service Part hard
Restart, correspondingly, the processing procedure of mode one can be as follows:Correspondence position service is not present under default file catalogue when detecting
The device node of component, and device node loses duration when reaching preset duration, control position Service Part is restarted firmly.
In force, when FSU detects the equipment that correspondence position Service Part is not present under default file catalogue for the first time
During node, hard reboot process can not be carried out to position Service Part.It is not present when being detected from first under default file catalogue
The device node of correspondence position Service Part start after preset duration in detect be not present under default file catalogue always
During the device node of correspondence position Service Part, position Service Part can be controlled to restart firmly again.That is, default file mesh
In the case of the lower device node there is no correspondence position Service Part of record, every preset duration, FSU control position Service Parts
Restart firmly.
Mode two, when the device node for detecting correspondence position Service Part under default file catalogue, there are numerical abnormalities
When, control position Service Part is restarted firmly, wherein, numerical abnormality is the equipment of correspondence position Service Part under default file catalogue
The number of node is less than the corresponding default device node number of location-based service component and more than 0.
In force, another mapping abnormal conditions can be that there are correspondence position Service Parts under default file catalogue
Device node, but the number of existing device node is less than the corresponding default device node number of location-based service component, it is such
In the case of, FSU can also control position Service Part to restart firmly.Specifically, the position clothes of the different model of different manufacturers production
Being engaged in, the corresponding device node preferred number of component is different, i.e., different production men identifies (Vid can be production man code name) and product mark
Know (Pid can be product type) corresponding location-based service component, corresponding device node preferred number is different.Technical staff
The corresponding device node preferred number of the location-based service module connected with FSU can be stored in advance.Whenever FSU is detected
There are during device node under default file catalogue, it can be determined that the device node number detected is corresponding with the location-based service component
Default device node number (i.e. pre-stored location-based service component corresponding device node preferred number) it is whether consistent, such as
The number for the device node that fruit detects is less than default device node number, then FSU can control position Service Part to restart firmly.
That is, whenever FSU detects the device node of correspondence position Service Part under default file catalogue there are during numerical abnormality,
Position Service Part can be controlled to restart firmly.
Optionally, FSU can also carry out soft reboot to itself in any case, correspondingly, processing procedure can be as follows:
When the number for being consecutively detected numerical abnormality reaches preset times threshold value, soft reboot is performed to power & environment supervision host.
In force, whenever FSU detects under default file catalogue existing device node there are during numerical abnormality, except control
After location-based service component processed is restarted firmly, one can also be added to the number of numerical abnormality, when the number for being consecutively detected numerical abnormality
When reaching preset times threshold value, FSU can with soft reboot, wherein, preset times threshold value can be it is pre-set by technical staff,
For example preset times threshold value is 3.That is, whenever FSU detects that there are numbers for existing device node under default file catalogue
During mesh exception, if the number of numerical abnormality is less than preset times threshold value, FSU can control position Service Part to restart firmly,
If the number of numerical abnormality has reached preset times threshold value, FSU can with soft reboot, wherein, soft reboot, that is, FSU is continuous
It is restarted in the case of electricity, the number of numerical abnormality is reset at this time.In addition, it is less than for the number of numerical abnormality default
Frequency threshold value, the situation that control position Service Part is restarted firmly, after this restarts firmly, FSU recovers with location-based service component just
Often during connection, FSU can be zeroed out the number of numerical abnormality.
In addition, during the present invention is implemented, FSU can be directed to different mapping abnormal conditions and carry out different processing, and FSU also may be used
By simultaneously executive mode one and in a manner of two processing.
In step 103, when detecting that power & environment supervision host is normally connected with location-based service component, pass through location-based service portion
Part establishes network connection with monitoring backstage.
In force, after FSU control position Service Parts are restarted firmly, FSU can be normally connected with location-based service component
When, FSU can be built in a manner that existing and monitoring backstage establishes network connection by location-based service component with monitoring backstage
Vertical network connection.Wherein, FSU the process of network connection is established with monitoring backstage can be as follows:Detect FSU whether with location-based service
Component normally connects, and in the case where FSU is normally connected with location-based service component, FSU can carry out ppp by pppd processes and dial
Number, public network virtual network port ppp1 is generated, public network successful connection at this time, then on the premise of public network successful connection, FSU can lead to
It crosses xl2tpd processes and carries out VPN dialing, generate private network virtual network port ppp0, private network successful connection at this time finally, is connected in private network
Under the premise of successfully, FSU can be based on pre-stored account identification and password and send registration request to monitoring backstage, work as FSU
After succeeding in registration, FSU is the network connection completed with monitoring backstage.
At present, in order to which FSU and monitoring backstage is maintained to establish network connection as far as possible, be not present as ppp1 and ppp0 or
Location-based service component is carried not when monitoring backstage is registered using Chinese steel tower company mostly in the presence of person ppp1 and ppp0
The triple Restart mechanisms gone out are replayed network (i.e. above-mentioned ppp dialing and VPN dial) and are re-registered and control.But energy
Precondition using triple Restart mechanisms is that FSU is normally connected with location-based service component, i.e., when FSU and location-based service component not
During normal connection, triple Restart mechanisms will fail.The embodiment of the present invention is a kind of supplement to triple Restart mechanisms, i.e., originally
The scheme that inventive embodiments are told about can solve to cause FSU and monitoring backstage since FSU is not connected normally with location-based service component
The problem of disconnecting network connection, can also solve to cause triple Restart mechanisms since FSU is not connected normally with location-based service component
The problem of failure.In addition, triple Restart mechanisms specifically can be as follows:After FSU and monitoring backstage communication disruption, FSU can be weighed
Newly to monitoring backstage send registration request, if registration failure, FSU can re-start ppp or VPN dialing, if ppp or
The continuous failure of VPN dialing 3 times, then FSU can control position Service Part soft reboot, if ppp or VPN dialing is continuously lost again
Lose 3 times, then FSU can control position Service Part to restart firmly, if ppp or VPN dialing fails 1 time again, FSU carries out soft heavy
It opens.
Optionally, FSU can also detect FSU and the network connection status of monitoring backstage in predetermined time, correspondingly, processing
Process can be as follows:In predetermined time, power & environment supervision host and the network connection status of monitoring backstage are detected;When detecting rotating ring
When monitoring host computer disconnects network connection with monitoring backstage, control position Service Part is restarted firmly.
It in force, can be in predetermined time (such as daily 5 in FSU preferably to avoid FSU offline for a long time:
40、15:40、22:40 3 time points) detect itself whether the network connection status with monitoring backstage, when detect FSU with prison
Control backstage can control position Service Part to restart firmly when being disconnected network connection, and then, can trigger FSU again with monitoring
Network connection is established on backstage.
Specifically, when FSU detects that public network virtual network port is not present either private network virtual network port and is not present or public network
In the presence of virtual network port and private network virtual network port but location-based service component is not when monitoring backstage is registered, and FSU can be controlled
Location-based service component processed is restarted firmly.FSU control position Service Part restart firmly after, FSU can according to told about in step 103 with
Monitoring backstage establishes the mode of network connection, and network connection is established by location-based service component and monitoring backstage.That is, work as
Detect that above-mentioned ppp1 is not present, ppp0 is not present or FSU is not built with monitoring backstage under the premise of existing for ppp1, ppp0
During vertical network connection (i.e. FSU registration failures), FSU can control position Service Part to restart firmly.Specifically, the inspection of virtual network port
It surveys so as to getting subject to effective IP (Internet Protocol, the agreement interconnected between network) address.In addition, FSU
It can be logged in by the corresponding values of presence mark LoginOK to judge whether FSU currently registers in monitoring backstage, when
When LoginOK is 1, show that FSU currently establishes network connection (currently succeeding in registration) with monitoring backstage, when LoginOK is 0
When, show that FSU does not establish network connection (i.e. current unregistered success) currently with monitoring backstage.
In the embodiment of the present invention, power & environment supervision host FSU can periodically to itself whether with location-based service component just
Often connection is detected, and when detecting that FSU is not connected normally with location-based service component, FSU can control position Service Part
Restart firmly, i.e. FSU can give location-based service component to power off, and supply power for again afterwards, after location-based service component is restarted firmly, FSU can
With by location-based service component, monitoring backstage corresponding with power & environment supervision host establishes network connection.In this way, as power & environment supervision master
When machine is not connected normally with location-based service component, FSU can make power & environment supervision host by the way that position Service Part is controlled to restart firmly
It can be normally connected automatically with location-based service component, and then, FSU can re-establish network connection with monitoring backstage, thus, it can
It is offline for a long time to avoid FSU.
Based on identical technical concept, the embodiment of the present invention additionally provides a kind of device for establishing network connection, such as Fig. 3 institutes
Show, which includes:
Detection module 310, for being based on default detection cycle, the company of detection power & environment supervision host and location-based service component
Connect situation;
Control module 320 detects that the power & environment supervision host is not connected normally with the location-based service component for working as
When, the location-based service component is controlled to restart firmly;
Link block 330, for when detecting that the power & environment supervision host is normally connected with the location-based service component,
Network connection is established by the location-based service component and monitoring backstage.
Optionally, the control module 320, is used for:
When detecting the device node that the corresponding location-based service component is not present under default file catalogue, described in control
Location-based service component is restarted firmly.
Optionally, the control module 320, is used for:
The device node for corresponding to the location-based service component is not present under default file catalogue when detecting, and the equipment
When node loss duration reaches preset duration, the location-based service component is controlled to restart firmly.
Optionally, the control module 320, is used for:
When detecting that the device node of correspondence position Service Part under default file catalogue there are during numerical abnormality, controls institute
Rheme is put Service Part and is restarted firmly, wherein, the numerical abnormality is to correspond to the location-based service component under default file catalogue
The number of device node is less than the corresponding default device node number of the location-based service component and more than 0.
Optionally, as shown in figure 4, described device further includes:
Execution module 340, for when the number for being consecutively detected numerical abnormality reaches preset times threshold value, being moved to described
Ring monitoring host computer performs soft reboot.
Optionally, the detection module 310, is additionally operable to:
In predetermined time, the network connection status of the power & environment supervision host and the monitoring backstage is detected;
The control module 320, is additionally operable to:
When detecting that the power & environment supervision host disconnects network connection with the monitoring backstage, the location-based service is controlled
Component is restarted firmly.
Optionally, the control module 320, is used for:
When detect public network virtual network port be not present either private network virtual network port be not present or public network virtual network port with
In the presence of private network virtual network port but the location-based service component is not when the monitoring backstage is registered, and controls the position
Service Part is restarted firmly.
In the embodiment of the present invention, power & environment supervision host FSU can periodically to itself whether with location-based service component just
Often connection is detected, and when detecting that FSU is not connected normally with location-based service component, FSU can control position Service Part
Restart firmly, i.e. FSU can give location-based service component to power off, and supply power for again afterwards, after location-based service component is restarted firmly, FSU can
With by location-based service component, monitoring backstage corresponding with power & environment supervision host establishes network connection.In this way, as power & environment supervision master
When machine is not connected normally with location-based service component, FSU can make power & environment supervision host by the way that position Service Part is controlled to restart firmly
It can be normally connected automatically with location-based service component, and then, FSU can re-establish network connection with monitoring backstage, thus, it can
It is offline for a long time to avoid FSU.
It should be noted that:What above-described embodiment provided establishes the device of network connection when establishing network connection, only with
The division progress of above-mentioned each function module, can be as needed and by above-mentioned function distribution by not for example, in practical application
Same function module is completed, i.e., the internal structure of terminal is divided into different function modules, to complete whole described above
Or partial function.In addition, the device for establishing network connection that above-described embodiment provides is implemented with establishing the method for network connection
Example belongs to same design, and specific implementation process refers to embodiment of the method, and which is not described herein again.
Fig. 5 is refer to, it illustrates the structure diagram of the terminal involved by the embodiment of the present invention, which can be used for
Implement the method and apparatus for establishing network connection provided in above-described embodiment, which can be the above-mentioned FSU told about.Specifically
For:
Terminal 500 can include RF (Radio Frequency, radio frequency) circuit 110, include one or more meters
The memory 120 of calculation machine readable storage medium storing program for executing, input unit 130, display unit 140, sensor 150, voicefrequency circuit 160,
WiFi (wireless fidelity, Wireless Fidelity) module 170, including there are one or more than one processing core processing
The components such as device 180 and power supply 190.It will be understood by those skilled in the art that the terminal structure shown in Fig. 5 is not formed pair
The restriction of terminal can include either combining some components or different component cloth than illustrating more or fewer components
It puts.Wherein:
RF circuits 110 can be used for receive and send messages or communication process in, signal sends and receivees, particularly, by base station
After downlink information receives, transfer to one or more than one processor 180 is handled;In addition, will be related to the data sending of uplink to
Base station.In general, RF circuits 110 include but not limited to antenna, at least one amplifier, tuner, one or more oscillators, use
Family identity module (SIM) card, transceiver, coupler, LNA (Low Noise Amplifier, low-noise amplifier), duplex
Device etc..In addition, RF circuits 110 can also be communicated by wireless communication with network and other equipment.The wireless communication can make
With any communication standard or agreement, include but not limited to GSM (Global System of Mobile communication, entirely
Ball mobile communcations system), GPRS (General Packet Radio Service, general packet radio service), CDMA (Code
Division Multiple Access, CDMA), WCDMA (Wideband Code Division Multiple
Access, wideband code division multiple access), LTE (Long Term Evolution, Long Term Evolution), Email, SMS (Short
Messaging Service, Short Message Service) etc..
Memory 120 can be used for storage software program and module, and processor 180 is stored in memory 120 by operation
Software program and module, so as to perform various functions application and data processing.Memory 120 can mainly include storage journey
Sequence area and storage data field, wherein, storing program area can storage program area, the application program (ratio needed at least one function
Such as sound-playing function, image player function) etc.;Storage data field can be stored uses created number according to terminal 500
According to (such as voice data, phone directory etc.) etc..In addition, memory 120 can include high-speed random access memory, can also wrap
Include nonvolatile memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Correspondingly, memory 120 can also include Memory Controller, to provide processor 180 and input unit 130 to memory
120 access.
Input unit 130 can be used for the number for receiving input or character information and generate and user setting and function
Control related keyboard, mouse, operation lever, optics or the input of trace ball signal.Specifically, input unit 130 may include to touch
Sensitive surfaces 131 and other input equipments 132.Touch sensitive surface 131, also referred to as touch display screen or Trackpad, collect and use
Family on it or neighbouring touch operation (such as user using any suitable object such as finger, stylus or attachment in touch-sensitive table
Operation on face 131 or near touch sensitive surface 131), and corresponding attachment device is driven according to preset formula.It is optional
, touch sensitive surface 131 may include both touch detecting apparatus and touch controller.Wherein, touch detecting apparatus detection is used
The touch orientation at family, and the signal that touch operation is brought is detected, transmit a signal to touch controller;Touch controller is from touch
Touch information is received in detection device, and is converted into contact coordinate, then gives processor 180, and processor 180 can be received
The order sent simultaneously is performed.Furthermore, it is possible to using polytypes such as resistance-type, condenser type, infrared ray and surface acoustic waves
Realize touch sensitive surface 131.Except touch sensitive surface 131, input unit 130 can also include other input equipments 132.Specifically,
Other input equipments 132 can include but is not limited to physical keyboard, function key (such as volume control button, switch key etc.),
One or more in trace ball, mouse, operation lever etc..
Display unit 140 is available for the information and terminal 500 for showing by information input by user or being supplied to user
Various graphical user interface, these graphical user interface can be made of figure, text, icon, video and its any combination.
Display unit 140 may include display panel 141, optionally, LCD (Liquid Crystal Display, liquid crystal may be employed
Show device), the forms such as OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) configure display panel
141.Further, touch sensitive surface 131 can cover display panel 141, when touch sensitive surface 131 detects on it or neighbouring touches
After touching operation, processor 180 is sent to determine the type of touch event, is followed by subsequent processing type of the device 180 according to touch event
Corresponding visual output is provided on display panel 141.Although in Figure 5, touch sensitive surface 131 and display panel 141 are conducts
Two independent components realize input and input function, but in some embodiments it is possible to by touch sensitive surface 131 and display
Panel 141 is integrated and realizes and outputs and inputs function.
Terminal 500 may also include at least one sensor 150, such as optical sensor, motion sensor and other sensings
Device.Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein, ambient light sensor can be according to environment
The light and shade of light adjusts the brightness of display panel 141, and proximity sensor can close display when terminal 500 is moved in one's ear
Panel 141 and/or backlight.As one kind of motion sensor, gravity accelerometer can detect in all directions (generally
Three axis) acceleration size, size and the direction of gravity are can detect that when static, available for identification mobile phone posture application (ratio
Such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap);Extremely
In other sensors such as gyroscope, barometer, hygrometer, thermometer, the infrared ray sensors that terminal 500 can also configure, herein
It repeats no more.
Voicefrequency circuit 160, loud speaker 161, microphone 162 can provide the audio interface between user and terminal 500.Audio
The transformed electric signal of the voice data received can be transferred to loud speaker 161, sound is converted to by loud speaker 161 by circuit 160
Sound signal exports;On the other hand, the voice signal of collection is converted to electric signal by microphone 162, after being received by voicefrequency circuit 160
Voice data is converted to, then after voice data output processor 180 is handled, through RF circuits 110 to be sent to such as another end
Voice data is exported to memory 120 to be further processed by end.Voicefrequency circuit 160 is also possible that earphone jack,
To provide the communication of peripheral hardware earphone and terminal 500.
WiFi belongs to short range wireless transmission technology, and terminal 500 can help user's transceiver electronics by WiFi module 170
Mail, browsing webpage and access streaming video etc., it has provided wireless broadband internet to the user and has accessed.Although Fig. 5 is shown
WiFi module 170, but it is understood that, and must be configured into for terminal 500 is not belonging to, completely it can exist as needed
Do not change in the scope of the essence of invention and omit.
Processor 180 is the control centre of terminal 500, utilizes various interfaces and each portion of connection whole mobile phone
Point, it is stored in memory 120 by running or performing the software program being stored in memory 120 and/or module and call
Interior data perform the various functions of terminal 500 and processing data, so as to carry out integral monitoring to terminal.Optionally, processor
180 may include one or more processing cores;Preferably, processor 180 can integrate application processor and modem processor,
Wherein, the main processing operation system of application processor, user interface and application program etc., modem processor mainly handles nothing
Line communicates.It is understood that above-mentioned modem processor can not also be integrated into processor 180.
Terminal 500 is further included to the power supply 190 (such as battery) of all parts power supply, it is preferred that power supply can pass through electricity
Management system and processor 180 are logically contiguous, so as to realize management charging, electric discharge and power consumption by power-supply management system
The functions such as management.Power supply 190 can also include one or more direct current or AC power, recharging system, power supply event
Hinder the random components such as detection circuit, power supply changeover device or inverter, power supply status indicator.
Although being not shown, terminal 500 can also include camera, bluetooth module etc., and details are not described herein.Specifically in this reality
It applies in example, the display unit of terminal 500 is touch-screen display, and terminal 500 has further included memory and one or one
Above program, one of them either more than one program storage in memory and be configured to by one or one with
Upper processor execution states one or more than one program includes the instruction operated below:
Based on default detection cycle, the connection state of detection power & environment supervision host and location-based service component;
When detecting that the power & environment supervision host is not connected normally with the location-based service component, the position is controlled to take
Business component is restarted firmly;
When detecting that the power & environment supervision host is normally connected with the location-based service component, pass through the location-based service
Component establishes network connection with monitoring backstage.
Optionally, it is described when detecting that the power & environment supervision host is not connected normally with the location-based service component, control
The location-based service component is made firmly to restart, including:
When detecting the device node that the corresponding location-based service component is not present under default file catalogue, described in control
Location-based service component is restarted firmly.
Optionally, it is described to work as the device node for detecting and the corresponding location-based service component being not present under default file catalogue
When, the location-based service component is controlled to restart firmly, including:
The device node for corresponding to the location-based service component is not present under default file catalogue when detecting, and the equipment
When node loss duration reaches preset duration, the location-based service component is controlled to restart firmly.
Optionally, it is described when detecting that the power & environment supervision host is not connected normally with the location-based service component, control
The location-based service component is made firmly to restart, including:
When detecting that the device node of correspondence position Service Part under default file catalogue there are during numerical abnormality, controls institute
Rheme is put Service Part and is restarted firmly, wherein, the numerical abnormality is to correspond to the location-based service component under default file catalogue
The number of device node is less than the corresponding default device node number of the location-based service component and more than 0.
Optionally, the method further includes:
When the number for being consecutively detected numerical abnormality reaches preset times threshold value, the power & environment supervision host is performed soft
Restart.
Optionally, the method further includes:
In predetermined time, the network connection status of the power & environment supervision host and the monitoring backstage is detected;
When detecting that the power & environment supervision host disconnects network connection with the monitoring backstage, the location-based service is controlled
Component is restarted firmly.
Optionally, it is described when detecting that the power & environment supervision host disconnects network connection with the monitoring backstage, control
The location-based service component is restarted firmly, including:
When detect public network virtual network port be not present either private network virtual network port be not present or public network virtual network port with
In the presence of private network virtual network port but the location-based service component is not when the monitoring backstage is registered, and controls the position
Service Part is restarted firmly.
In the embodiment of the present invention, power & environment supervision host FSU can periodically to itself whether with location-based service component just
Often connection is detected, and when detecting that FSU is not connected normally with location-based service component, FSU can control position Service Part
Restart firmly, i.e. FSU can give location-based service component to power off, and supply power for again afterwards, after location-based service component is restarted firmly, FSU can
With by location-based service component, monitoring backstage corresponding with power & environment supervision host establishes network connection.In this way, as power & environment supervision master
When machine is not connected normally with location-based service component, FSU can make power & environment supervision host by the way that position Service Part is controlled to restart firmly
It can be normally connected automatically with location-based service component, and then, FSU can re-establish network connection with monitoring backstage, thus, it can
It is offline for a long time to avoid FSU.
One of ordinary skill in the art will appreciate that hardware can be passed through by realizing all or part of step of above-described embodiment
It completes, relevant hardware can also be instructed to complete by program, the program can be stored in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all the present invention spirit and
Within principle, any modifications, equivalent replacements and improvements are made should all be included in the protection scope of the present invention.
Claims (14)
- A kind of 1. method for establishing network connection, which is characterized in that the described method includes:Based on default detection cycle, the connection state of detection power & environment supervision host and location-based service component;When detecting that the power & environment supervision host is not connected normally with the location-based service component, the location-based service portion is controlled Part is restarted firmly;When detecting that the power & environment supervision host is normally connected with the location-based service component, pass through the location-based service component Network connection is established with monitoring backstage.
- 2. according to the method described in claim 1, it is characterized in that, described ought detect the power & environment supervision host and institute's rheme When putting Service Part and not connecting normally, the location-based service component is controlled to restart firmly, including:When detecting under default file catalogue there is no during the device node of the corresponding location-based service component, the position is controlled Service Part is restarted firmly.
- 3. according to the method described in claim 2, it is characterized in that, described ought detect that there is no correspond under default file catalogue During the device node of the location-based service component, the location-based service component is controlled to restart firmly, including:The device node for corresponding to the location-based service component is not present under default file catalogue when detecting, and the device node When loss duration reaches preset duration, the location-based service component is controlled to restart firmly.
- 4. according to the method described in claim 1, it is characterized in that, described ought detect the power & environment supervision host and institute's rheme When putting Service Part and not connecting normally, the location-based service component is controlled to restart firmly, including:When detecting that the device node of correspondence position Service Part under default file catalogue there are during numerical abnormality, controls institute's rheme Service Part is put firmly to restart, wherein, the numerical abnormality is the equipment that the location-based service component is corresponded under default file catalogue The number of node is less than the corresponding default device node number of the location-based service component and more than 0.
- 5. according to the method described in claim 4, it is characterized in that, the method further includes:When the number for being consecutively detected numerical abnormality reaches preset times threshold value, the power & environment supervision host is performed soft heavy It opens.
- 6. according to the method described in claim 1, it is characterized in that, the method further includes:In predetermined time, the network connection status of the power & environment supervision host and the monitoring backstage is detected;When detecting that the power & environment supervision host disconnects network connection with the monitoring backstage, the location-based service component is controlled Restart firmly.
- 7. according to the method described in claim 6, it is characterized in that, described ought detect the power & environment supervision host and the prison When control backstage disconnects network connection, the location-based service component is controlled to restart firmly, including:When detecting that public network virtual network port is not present either private network virtual network port and is not present or public network virtual network port and private network In the presence of virtual network port but the location-based service component is not when the monitoring backstage is registered, and controls the location-based service Component is restarted firmly.
- 8. a kind of device for establishing network connection, which is characterized in that described device includes:Detection module, for being based on default detection cycle, the connection state of detection power & environment supervision host and location-based service component;Control module, for when detecting that the power & environment supervision host is not connected normally with the location-based service component, controlling The location-based service component is restarted firmly;Link block, for when detecting that the power & environment supervision host is normally connected with the location-based service component, passing through institute Rheme puts Service Part and establishes network connection with monitoring backstage.
- 9. device according to claim 8, which is characterized in that the control module is used for:When detecting under default file catalogue there is no during the device node of the corresponding location-based service component, the position is controlled Service Part is restarted firmly.
- 10. device according to claim 9, which is characterized in that the control module is used for:The device node for corresponding to the location-based service component is not present under default file catalogue when detecting, and the device node When loss duration reaches preset duration, the location-based service component is controlled to restart firmly.
- 11. device according to claim 8, which is characterized in that the control module is used for:When detecting that the device node of correspondence position Service Part under default file catalogue there are during numerical abnormality, controls institute's rheme Service Part is put firmly to restart, wherein, the numerical abnormality is the equipment that the location-based service component is corresponded under default file catalogue The number of node is less than the corresponding default device node number of the location-based service component and more than 0.
- 12. according to the devices described in claim 11, which is characterized in that described device further includes:Execution module, for when the number for being consecutively detected numerical abnormality reaches preset times threshold value, to the power & environment supervision Host performs soft reboot.
- 13. device according to claim 8, which is characterized in that the detection module is additionally operable to:In predetermined time, the network connection status of the power & environment supervision host and the monitoring backstage is detected;The control module, is additionally operable to:When detecting that the power & environment supervision host disconnects network connection with the monitoring backstage, the location-based service component is controlled Restart firmly.
- 14. device according to claim 13, which is characterized in that the control module is used for:When detecting that public network virtual network port is not present either private network virtual network port and is not present or public network virtual network port and private network In the presence of virtual network port but the location-based service component is not when the monitoring backstage is registered, and controls the location-based service Component is restarted firmly.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611046908.1A CN108092839B (en) | 2016-11-23 | 2016-11-23 | Method and device for establishing network connection |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611046908.1A CN108092839B (en) | 2016-11-23 | 2016-11-23 | Method and device for establishing network connection |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108092839A true CN108092839A (en) | 2018-05-29 |
CN108092839B CN108092839B (en) | 2020-08-14 |
Family
ID=62171091
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611046908.1A Active CN108092839B (en) | 2016-11-23 | 2016-11-23 | Method and device for establishing network connection |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108092839B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109274531A (en) * | 2018-09-15 | 2019-01-25 | 深圳市海能通信股份有限公司 | Data acquisition equipment method for restarting, system and computer readable storage medium |
CN110912759A (en) * | 2019-12-30 | 2020-03-24 | 山东有人信息技术有限公司 | Automatic connection method and system for VPN network abnormity |
CN112000374A (en) * | 2020-07-13 | 2020-11-27 | 深圳市智微智能软件开发有限公司 | USB touch screen replacing method, device, equipment and medium applied to android system |
CN112312439A (en) * | 2019-07-26 | 2021-02-02 | 西安诺瓦星云科技股份有限公司 | Mobile communication network detection method, device, system and computer readable medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103079219A (en) * | 2011-10-26 | 2013-05-01 | 艾默生网络能源有限公司 | Base station automatic inspection digital management system and method |
CN103747061A (en) * | 2013-12-27 | 2014-04-23 | 高新兴科技集团股份有限公司 | Power environment monitoring system allowing multiple networks to access and operation method thereof |
CN104244300A (en) * | 2013-06-17 | 2014-12-24 | 中国移动通信集团浙江有限公司 | Method and system for achieving base station dynamic environment monitoring |
CN104993961A (en) * | 2015-06-30 | 2015-10-21 | 广州华多网络科技有限公司 | Equipment control methods, devices and system |
CN105357030A (en) * | 2015-09-30 | 2016-02-24 | 北京奇虎科技有限公司 | Offline recovery method, device and system for terminal equipment on test platform |
US20160308716A1 (en) * | 2014-12-01 | 2016-10-20 | Xiaomi Inc. | Method and apparatus for displaying router setup interface |
-
2016
- 2016-11-23 CN CN201611046908.1A patent/CN108092839B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103079219A (en) * | 2011-10-26 | 2013-05-01 | 艾默生网络能源有限公司 | Base station automatic inspection digital management system and method |
CN104244300A (en) * | 2013-06-17 | 2014-12-24 | 中国移动通信集团浙江有限公司 | Method and system for achieving base station dynamic environment monitoring |
CN103747061A (en) * | 2013-12-27 | 2014-04-23 | 高新兴科技集团股份有限公司 | Power environment monitoring system allowing multiple networks to access and operation method thereof |
US20160308716A1 (en) * | 2014-12-01 | 2016-10-20 | Xiaomi Inc. | Method and apparatus for displaying router setup interface |
CN104993961A (en) * | 2015-06-30 | 2015-10-21 | 广州华多网络科技有限公司 | Equipment control methods, devices and system |
CN105357030A (en) * | 2015-09-30 | 2016-02-24 | 北京奇虎科技有限公司 | Offline recovery method, device and system for terminal equipment on test platform |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109274531A (en) * | 2018-09-15 | 2019-01-25 | 深圳市海能通信股份有限公司 | Data acquisition equipment method for restarting, system and computer readable storage medium |
CN112312439A (en) * | 2019-07-26 | 2021-02-02 | 西安诺瓦星云科技股份有限公司 | Mobile communication network detection method, device, system and computer readable medium |
CN110912759A (en) * | 2019-12-30 | 2020-03-24 | 山东有人信息技术有限公司 | Automatic connection method and system for VPN network abnormity |
CN112000374A (en) * | 2020-07-13 | 2020-11-27 | 深圳市智微智能软件开发有限公司 | USB touch screen replacing method, device, equipment and medium applied to android system |
CN112000374B (en) * | 2020-07-13 | 2024-01-02 | 深圳市智微智能软件开发有限公司 | USB touch screen replacement method, device, equipment and medium applied to android system |
Also Published As
Publication number | Publication date |
---|---|
CN108092839B (en) | 2020-08-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103455256B (en) | The method and terminal of Rotation screen display picture | |
CN104639672B (en) | The method and apparatus for carrying out domain name mapping | |
CN107094294A (en) | Method for connecting network and device | |
CN110198550A (en) | A kind of secondary cell group maintenance method, terminal device and network node | |
CN110198545A (en) | A kind of secondary cell group adding method, terminal device and host node | |
CN110366212A (en) | A kind of detection method and terminal of condition switching result | |
CN106484555B (en) | The method and mobile terminal of abnormality detection and recovery | |
CN103472993A (en) | Rotation displaying method, device and terminal equipment | |
CN106068020A (en) | Hinting abnormal states method and device | |
CN104135728B (en) | Method for connecting network and device | |
CN107770768A (en) | A kind of data network restoration methods, mobile terminal | |
CN108092839A (en) | A kind of method and apparatus for establishing network connection | |
CN103399633A (en) | Wireless remote control method and mobile terminal | |
CN103489303A (en) | Remote control method and device | |
CN106775262A (en) | A kind of method and system of mark display management of not interpreting blueprints | |
CN104423822A (en) | Automated test script recording method and device | |
CN107465841A (en) | A kind of fault information reporting method and terminal | |
CN110366198A (en) | A kind of detection method and terminal of secondary cell group change result | |
CN110198553A (en) | A kind of secondary cell group delet method, terminal device and network node | |
CN109067751B (en) | ARP spoofing detection method and device under non-Root environment and terminal | |
CN108282834A (en) | A kind of method and terminal of terminal access LTE network | |
CN105389259A (en) | Method, apparatus and system for performing application testing | |
CN107423099A (en) | Key programming method, server, terminal, key programming system and storage medium | |
CN104253870A (en) | Method and device for controlling data access period | |
CN109831359A (en) | A kind of detection method and its terminal device of data network connection state |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |