CN109361561A - Heartbeat mechanism keeping method, device and storage medium - Google Patents
Heartbeat mechanism keeping method, device and storage medium Download PDFInfo
- Publication number
- CN109361561A CN109361561A CN201810970468.1A CN201810970468A CN109361561A CN 109361561 A CN109361561 A CN 109361561A CN 201810970468 A CN201810970468 A CN 201810970468A CN 109361561 A CN109361561 A CN 109361561A
- Authority
- CN
- China
- Prior art keywords
- softswitch
- cycle time
- heartbeat
- response
- comparison result
- 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.)
- Pending
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
- H04L43/103—Active monitoring, e.g. heartbeat, ping or trace-route with adaptive polling, i.e. dynamically adapting the polling rate
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/143—Termination or inactivation of sessions, e.g. event-controlled end of session
- H04L67/145—Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
Abstract
The embodiment of the invention discloses a kind of heartbeat mechanism keeping method, device and storage mediums, are related to field of communication technology.The method comprise the steps that the initial heart cycle time is arranged in Softswitch when gateway initiates registration request for the first time, it include registration information IP packet in the request;The gateway sends long connection packet according to the initial heart cycle time, to the Softswitch;The source IP address and port information of the registration information IP packet are compared the Softswitch between the source IP address and port information of the long connection packet;It is that the two is identical in response to comparison result, the Softswitch is based on the initial heart cycle time, increases heartbeat cycle time;Alternatively, being that the two is different in response to comparison result, the Softswitch is based on the initial heart cycle time, reduces heartbeat cycle time.The present invention can reduce the data processing pressure of Softswitch.
Description
Technical field
The present invention relates to field of communication technology more particularly to a kind of heartbeat mechanism keeping methods, device and storage medium.
Background technique
Heartbeat mechanism is that timing sends heartbeat packet between Softswitch and gateway, and other side is allowed to know that oneself is current
Working condition it is whether normal, with the mechanism for ensuring effectively to connect between Softswitch and gateway.
It is found by process, when the gateway quantity that a Softswitch has under its command is huger, each gateway is set
It is standby to require to keep long connection with Softswitch, and be all periodically is sent according to the equal length time long connection wrap to
Softswitch causes have a large amount of long connection packets to be sent to Softswitch simultaneously, has both expended the processing capacity of Softswitch,
The obstruction of bandwidth is easily caused again, further will affect the quality of business.
Summary of the invention
The embodiment of the present invention provides a kind of heartbeat mechanism keeping method, device and storage medium, is able to solve a large amount of nets
Consuming problem of the heartbeat mechanism to Softswitch between pass equipment and Softswitch.
In order to achieve the above objectives, the embodiment of the present invention adopts the following technical scheme that
In a first aspect, the embodiment of the present invention provides a kind of heartbeat mechanism keeping method, comprising:
When gateway initiates registration request for the first time, initial heart cycle time, the request is arranged in Softswitch
In include registration information IP packet;
The gateway sends long connection packet according to the initial heart cycle time, to the Softswitch;
The source IP address and port information of the registration information IP packet are connect packet with the length by the Softswitch
It is compared between source IP address and port information;
It is that the two is identical in response to comparison result, the Softswitch is based on the initial heart cycle time, increases
Heartbeat cycle time;Alternatively,
It is that the two is different in response to comparison result, the Softswitch is based on the initial heart cycle time, reduces
Heartbeat cycle time.
With reference to first aspect, in the first possible implementation of the first aspect, described to be in response to comparison result
The two is identical, and the Softswitch is based on the initial heart cycle time, increases heartbeat cycle time, comprising:
It is that the two is identical in response to comparison result, the Softswitch is based on the initial heart cycle time, by the heart
The hop cycle time is increased to 2T, and the T is the initial heart cycle time.
The possible implementation of with reference to first aspect the first, in the first possible implementation of second aspect
In, described identical for the two in response to comparison result, the Softswitch is based on the initial heart cycle time, by heartbeat
Cycle time is increased to after 2T, further includes:
Softswitch iteration, which executes, compares step and heart beat cycle set-up procedure;
It is that the two is identical in response to comparison result, heartbeat cycle time is increased to nT by the Softswitch, and n is positive
Integer;
It is that the two is different in response to comparison result, heartbeat cycle time is reduced to n/2T+n/ by the Softswitch
4T。
With reference to first aspect, in a third possible implementation of the first aspect, described to be in response to comparison result
The two is different, and the Softswitch is based on the initial heart cycle time, reduces heartbeat cycle time, comprising:
It is that the two is different in response to comparison result, the Softswitch is based on the initial heart cycle time, by the heart
The hop cycle time is reduced to T/2, and the T is the initial heart cycle time.
The third possible implementation with reference to first aspect, in the 4th kind of possible implementation of first aspect
In, described different for the two in response to comparison result, the Softswitch is based on the initial heart cycle time, by heartbeat
Cycle time is reduced to after T/2, further includes:
Softswitch iteration, which executes, compares step and heart beat cycle set-up procedure;
It is that the two is different in response to comparison result, heartbeat cycle time is reduced to T/m by the Softswitch, and m is positive
Integer;
It is that the two is identical in response to comparison result, heartbeat cycle time is increased to T/m+T/2m by the Softswitch.
Second aspect, the embodiment of the present invention provide a kind of heartbeat mechanism holding meanss, comprising:
Setup module, for when gateway initiates registration request for the first time, initial heart cycle to be arranged in Softswitch
Time includes registration information IP packet in the request;
Sending module is sent out for the gateway according to the initial heart cycle time to the Softswitch
Send long connection packet;
Comparison module, for the Softswitch by the source IP address and port information of the registration information IP packet, with
It is compared between the source IP address and port information of the long connection packet;
The setup module is also used in response to comparison result be that the two is identical, and the Softswitch is based on described first
Beginning heartbeat cycle time increases heartbeat cycle time;Alternatively, be that the two is different in response to comparison result, the Softswitch
Based on the initial heart cycle time, reduce heartbeat cycle time.
In conjunction with second aspect, in the first possible implementation of the second aspect,
The setup module is also used in response to comparison result be that the two is identical, and the Softswitch is based on described first
Heartbeat cycle time is increased to 2T by beginning heartbeat cycle time, and the T is the initial heart cycle time.
In conjunction with the first possible implementation of second aspect, in second of possible implementation of second aspect
In, described device further include:
Iteration module compares step and heart beat cycle set-up procedure for being executed by Softswitch iteration;
The setup module, be also used in response to comparison result for both it is identical, the Softswitch is by heart beat cycle
Time is increased to nT, and n is positive integer;
The setup module, be also used in response to comparison result for both it is different, the Softswitch is by heart beat cycle
Time is reduced to n/2T+n/4T.
In conjunction with second aspect, in the third possible implementation of the second aspect,
The setup module is also used in response to comparison result be the two difference, and the Softswitch is based on described first
Heartbeat cycle time is reduced to T/2 by beginning heartbeat cycle time, and the T is the initial heart cycle time.
In conjunction with the third possible implementation of second aspect, in the 4th kind of possible implementation of second aspect
In,
The iteration module is also used to execute comparison step and heart beat cycle set-up procedure by Softswitch iteration;
The setup module, be also used in response to comparison result for both it is different, the Softswitch is by heart beat cycle
Time is reduced to T/m, and m is positive integer;
The setup module, be also used in response to comparison result for both it is identical, the Softswitch is by heart beat cycle
Time is increased to T/m+T/2m.
The third aspect, the embodiment of the present invention provide a kind of computer readable storage medium, are stored thereon with computer journey
Sequence, which is characterized in that the step of method that first aspect provides is realized when described program is executed by processor.
Heartbeat mechanism keeping method, device and storage medium provided in an embodiment of the present invention, by working as gateway for the first time
When initiating registration request, the initial heart cycle time is arranged in Softswitch, includes registration information IP packet in the request;It is described
Gateway sends long connection packet according to the initial heart cycle time, to the Softswitch;The Softswitch
The source IP address and port information of the registration information IP packet are connect between the source IP address and port information of packet with the length
It is compared;It is that the two is identical in response to comparison result, the Softswitch is based on the initial heart cycle time, increases
Heartbeat cycle time;Alternatively, being that the two is different in response to comparison result, the Softswitch is based on the initial heart cycle
Time reduces heartbeat cycle time.Since each NAT device refresh time is different, each gateway reaches soft friendship
The long connection packet time of exchange device is different, by the above-mentioned comparison step of iteration and to the set-up procedure of heartbeat cycle time,
Long connection cycle time and the NAT device refresh time of its first line of a couplet that each gateway may be implemented are closest, to realize
The concurrent pressure due to caused by multiple gateway equipment is avoided, to mitigate the data processing pressure of Softswitch.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to needed in the embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for ability
For the those of ordinary skill of domain, without creative efforts, it can also be obtained according to these attached drawings other attached
Figure.
Fig. 1 is the flow diagram of the heartbeat mechanism keeping method of the embodiment of the present invention;
Fig. 2 is another flow diagram of the heartbeat mechanism keeping method of the embodiment of the present invention;
Fig. 3 is the heartbeat mechanism holding meanss structural schematic diagram of the embodiment of the present invention;
Fig. 4 is another structural schematic diagram of the heartbeat mechanism holding meanss of the embodiment of the present invention;
Fig. 5 is the structural schematic diagram of the heartbeat mechanism holding meanss 500 of the embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts all other
Embodiment shall fall within the protection scope of the present invention.
One embodiment of the invention provides a kind of heartbeat mechanism keeping method, as shown in Figure 1, which comprises
101, when gateway initiates registration request for the first time, the initial heart cycle time is arranged in Softswitch, described
It include registration information IP packet in request.
102, the gateway sends long connection to the Softswitch according to the initial heart cycle time
Packet.
103, the source IP address and port information of the registration information IP packet are connect by the Softswitch with the length
It is compared between the source IP address and port information of packet.
It 104, is that the two is identical in response to comparison result, the Softswitch is based on the initial heart cycle time,
Increase heartbeat cycle time;Alternatively, being that the two is different in response to comparison result, the Softswitch is based on the initial heart
Cycle time reduces heartbeat cycle time.
Compared with prior art, since each NAT device refresh time is different, each gateway reaches soft friendship
The long connection packet time of exchange device is different, and the embodiment of the present invention can be by the above-mentioned comparison step of iteration and to heart beat cycle
The NAT device refresh time of the long connection cycle time and its first line of a couplet of each gateway may be implemented in the set-up procedure of time
It is closest, the concurrent pressure due to caused by multiple gateway equipment is avoided to realize, to mitigate the data processing of Softswitch
Pressure.
Further embodiment of this invention provides a kind of heartbeat mechanism keeping method, as shown in Figure 2, which comprises
201, when gateway initiates registration request for the first time, the initial heart cycle time is arranged in Softswitch, described
It include registration information IP packet in request.
202, the gateway sends long connection to the Softswitch according to the initial heart cycle time
Packet.
203, the source IP address and port information of the registration information IP packet are connect by the Softswitch with the length
It is compared between the source IP address and port information of packet.
The step 204a that is executed after step 203, in response to comparison result for both it is identical, the Softswitch is based on institute
The initial heart cycle time is stated, heartbeat cycle time is increased to 2T, the T is the initial heart cycle time.
Step 205a, Softswitch iteration execution comparison step and the heart beat cycle adjustment step executed after step 204a
Suddenly.
The step 206a that is executed after step 205a, in response to comparison result for both it is identical, the Softswitch is by the heart
The hop cycle time is increased to nT, and n is positive integer.
The step 207a that is executed after step 206a, in response to comparison result for both it is different, the Softswitch is by the heart
The hop cycle time is reduced to n/2T+n/4T.
After step 203, and from the step 204b that step 204a is executed side by side, in response to comparison result be both it is different,
The Softswitch is based on the initial heart cycle time, heartbeat cycle time is reduced to T/2, the T is described first
Beginning heartbeat cycle time.
Step 205b, Softswitch iteration execution comparison step and the heart beat cycle adjustment step executed after step 204b
Suddenly.
The step 206b that is executed after step 205b, in response to comparison result for both it is different, the Softswitch is by the heart
The hop cycle time is reduced to T/m, and m is positive integer.
The step 207b that is executed after step 206b, in response to comparison result for both it is identical, the Softswitch is by the heart
The hop cycle time is increased to T/m+T/2m.
For the embodiment of the present invention, a kind of tool of heartbeat mechanism is kept between the gateway under Softswitch and NAT
It is as follows that body executes process:
(1) distribution private IP address gateway issues registration information to Softswitch.
(2) address conversion is carried out to IP packet on the NAT device of the gateway first line of a couplet, distributes corresponding share communally
Location: IP packet is transmitted to Softswitch by port numbers pair.
It (3) include the initial period in response message to NAT device returning response information after Softswitch certification passes through
Time T.
(3) response message is transmitted to gateway by NAT device.
(5) when gateway issues long connection packet after timet.
(6) when time T is less than the refresh time of NAT device, NAT device distributed to the public network of gateway according to last time
IP address and port numbers carry out address conversion, and IP packet is transmitted to Softswitch.
(7) after Softswitch receives long connection data, the source IP address of registration information IP packet and long connection packet is compared
And port, the two is identical, shows that time T is less than the refresh time of NAT, Softswitch is fed back to using 2T as cycle time
Gateway.
(8) gateway is when issuing long connection packet after time 2T.
(9a) when time 2T is less than the refresh time of NAT device, NAT device distributed to the public affairs of gateway according to last time
Net IP address and port numbers carry out address conversion, and IP packet is transmitted to Softswitch.
(10) Softswitch compares source IP address and the port that length connection IP Bao Heshang vice-minister connects packet, the two phase
Together, show that time 2T is less than the refresh time of NAT, Softswitch feeds back to gateway using 4T as cycle time.
(11) so analogize, when cycle time is nT, Softswitch compares length connection IP Bao Heshang vice-minister connection
The source IP address of packet and port, the two is not identical, shows that the nT time is greater than the refresh time of NAT, then Softswitch is (n/2T
+ n/4T) it is used as cycle time, feed back to gateway.
(12) gateway is when issuing long connection packet after the time (n/2T+n/4T).
(13) when time (n/2T+n/4T) is greater than the refresh time of NAT device, NAT device is useless according to upper sub-distribution
Public network IP address and port numbers to gateway carry out address conversion, but distribute new public network IP address and port numbers pair,
IP packet is transmitted to Softswitch.
(14) Softswitch compares source IP address and the port that length connection IP Bao Heshang vice-minister connects packet, the two not phase
Together, showing that time (n/2T+n/4T) is greater than the refresh time of NAT, Softswitch assigns (n/2T+n/8T) as cycle time,
Feed back to gateway.
(15) so analogize, find the time span of a refresh time closest to NAT device as cycle time.
(16) if in time in initial period T, Softswitch is with comparing the source IP of registration information IP packet and long connection packet
Location and port, the two is not identical, shows that time T is greater than the refresh time of NAT device, Softswitch is using T/2 as when the period
Between, feed back to gateway.
(17) gateway is when issuing long connection packet after time T/2.
(18) when time T/2 is greater than the refresh time of NAT device, NAT device is useless to be distributed to gateway according to last time and sets
Standby public network IP address and port numbers carry out address conversion, but distribute new public network IP address and port numbers pair, and IP packet is turned
Issue Softswitch.
(19) Softswitch compares source IP address and the port that length connection IP Bao Heshang vice-minister connects packet, the two not phase
Together, show that time T/2 is greater than the refresh time of NAT device, Softswitch feeds back to gateway and set using T/4 as cycle time
It is standby.
(20) so analogize, when cycle time is T/m, Softswitch compares length connection IP Bao Heshang vice-minister connection
The source IP address of packet and port show that the T/m time is less than the refresh time of NAT, then Softswitch is (T/m+ if identical
T/2m it) is used as cycle time, feeds back to gateway;
(21) gateway is when issuing long connection packet after the time (T/m+T/2m).
(22) when time (T/m+T/2m) is less than the refresh time of NAT device, NAT device distributed to gateway according to last time
The public network IP address and port numbers of equipment carry out address conversion, and IP packet is transmitted to Softswitch.
(23) Softswitch compares source IP address and the port that length connection IP Bao Heshang vice-minister connects packet, the two phase
Together, show that (T/m+T/2m) time is less than the refresh time of NAT, then Softswitch assigns (T/m+T/2m+T/4m) as the period
Time feeds back to gateway.
(24) so analogize, find the time span of a refresh time closest to NAT device as cycle time.
Compared with prior art, since each NAT device refresh time is different, each gateway reaches soft friendship
The long connection packet time of exchange device is different, and the embodiment of the present invention can be by the above-mentioned comparison step of iteration and to heart beat cycle
The NAT device refresh time of the long connection cycle time and its first line of a couplet of each gateway may be implemented in the set-up procedure of time
It is closest, the concurrent pressure due to caused by multiple gateway equipment is avoided to realize, to mitigate the data processing of Softswitch
Pressure.
Further embodiment of this invention provides a kind of heartbeat mechanism holding meanss, as shown in figure 3, described device includes:
Setup module 31, for when gateway initiates registration request for the first time, initial heart week to be arranged in Softswitch
Time phase includes registration information IP packet in the request;
Sending module 32, for the gateway according to the initial heart cycle time, to the Softswitch
Send long connection packet;
Comparison module 33, for the Softswitch by the source IP address and port information of the registration information IP packet,
It is compared between the source IP address and port information of the long connection packet;
The setup module 31 is also used in response to comparison result be that the two is identical, and the Softswitch is based on described
The initial heart cycle time increases heartbeat cycle time;Alternatively, being that the two is different in response to comparison result, the soft switch is set
It is standby to be based on the initial heart cycle time, reduce heartbeat cycle time.
The setup module 31 is also used in response to comparison result be that the two is identical, and the Softswitch is based on described
Heartbeat cycle time is increased to 2T by the initial heart cycle time, and the T is the initial heart cycle time.
Further, as shown in figure 4, the heartbeat mechanism holding meanss further include:
Iteration module 41 compares step and heart beat cycle set-up procedure for being executed by Softswitch iteration;
The setup module 31 is also used in response to comparison result be that the two is identical, and the Softswitch is all by heartbeat
Time phase is increased to nT, and n is positive integer;
The setup module 31 is also used in response to comparison result be the two difference, and the Softswitch is all by heartbeat
Time phase is reduced to n/2T+n/4T.
The setup module 31 is also used in response to comparison result be the two difference, and the Softswitch is based on described
Heartbeat cycle time is reduced to T/2 by the initial heart cycle time, and the T is the initial heart cycle time.
The iteration module 41 is also used to execute comparison step and heart beat cycle set-up procedure by Softswitch iteration;
The setup module 31 is also used in response to comparison result be the two difference, and the Softswitch is all by heartbeat
Time phase is reduced to T/m, and m is positive integer;
The setup module 31 is also used in response to comparison result be that the two is identical, and the Softswitch is all by heartbeat
Time phase is increased to T/m+T/2m.
Compared with prior art, since each NAT device refresh time is different, each gateway reaches soft friendship
The long connection packet time of exchange device is different, and the embodiment of the present invention can be by the above-mentioned comparison step of iteration and to heart beat cycle
The NAT device refresh time of the long connection cycle time and its first line of a couplet of each gateway may be implemented in the set-up procedure of time
It is closest, the concurrent pressure due to caused by multiple gateway equipment is avoided to realize, to mitigate the data processing of Softswitch
Pressure.
The embodiment of the present invention also provides another computer readable storage medium, which can be
Computer readable storage medium included in memory in above-described embodiment;It is also possible to individualism, eventually without supplying
Computer readable storage medium in end.The computer-readable recording medium storage has one or more than one program, institute
State that one or more than one program by one or more than one processor are used to execute Fig. 1, embodiment illustrated in fig. 2 provides
Heartbeat mechanism keeping method.
The embodiment of the method for above-mentioned offer, specific function may be implemented in heartbeat mechanism holding meanss provided in an embodiment of the present invention
It is able to achieve the explanation referred in embodiment of the method, details are not described herein.Heartbeat mechanism holding side provided in an embodiment of the present invention
Method, device and storage medium can be adapted for executing heartbeat mechanism between gateway and Softswitch, but be not limited only to
This.
As shown in figure 5, heartbeat mechanism holding meanss 500 can be mobile phone, computer, digital broadcast terminal, message
Transceiver, game console, tablet device, personal digital assistant etc..
Referring to Fig. 5, heartbeat mechanism holding meanss 500 may include following one or more components: processing component 502 is deposited
Reservoir 504, power supply module 506, multimedia component 508, audio component 510, the interface 512 of input/output (I/O), sensor
Component 514 and communication component 516.
Processing component 502 usually control unmanned aerial vehicle (UAV) control device 500 integrated operation, such as with display, call, number
According to communication, camera operation and record operate associated operation.Processing component 502 may include one or more processors 520
To execute instruction.
In addition, processing component 502 may include one or more modules, convenient between processing component 502 and other assemblies
Interaction.For example, processing component 502 may include multi-media module, with facilitate multimedia component 508 and processing component 502 it
Between interaction.
Memory 504 is configured as storing various types of data to support the operation in unmanned aerial vehicle (UAV) control device 500.This
The example of a little data includes the instruction of any application or method for operating on unmanned aerial vehicle (UAV) control device 500, connection
Personal data, telephone book data, message, picture, video etc..Memory 504 can be by any kind of volatibility or non-volatile
It stores equipment or their combination is realized, such as static random access memory (SRAM), the read-only storage of electrically erasable
Device (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM), read-only memory
(ROM), magnetic memory, flash memory, disk or CD.
Power supply module 506 provides electric power for the various assemblies of unmanned aerial vehicle (UAV) control device 500.Power supply module 506 may include
Power-supply management system, one or more power supplys and other with for unmanned aerial vehicle (UAV) control device 500 generate, manage, and distribute electric power phase
Associated component.
Multimedia component 508 includes one output interface of offer between the unmanned aerial vehicle (UAV) control device 500 and user
Screen.In some embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes
Touch panel, screen may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more
A touch sensor is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch
Or the boundary of sliding action, but also detect duration and pressure associated with the touch or slide operation.In some realities
It applies in example, multimedia component 508 includes a front camera and/or rear camera.At unmanned aerial vehicle (UAV) control device 500
In operation mode, such as in a shooting mode or a video mode, front camera and/or rear camera can receive external more matchmakers
Volume data.Each front camera and rear camera can be a fixed optical lens system or have focal length and optics
Zoom capabilities.
Audio component 510 is configured as output and/or input audio signal.For example, audio component 510 includes a Mike
Wind (MIC), when unmanned aerial vehicle (UAV) control device 500 is in operation mode, when such as call mode, recording mode, and voice recognition mode,
Microphone is configured as receiving external audio signal.The received audio signal can be further stored in memory 504 or
It is sent via communication component 516.In some embodiments, audio component 510 further includes a loudspeaker, for exporting audio letter
Number.
I/O interface 512 provides interface between processing component 502 and peripheral interface module, and above-mentioned peripheral interface module can
To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock
Determine button.
Sensor module 514 includes one or more sensors, for providing various aspects for unmanned aerial vehicle (UAV) control device 500
Status assessment.For example, sensor module 514 can detecte the state that opens/closes of unmanned aerial vehicle (UAV) control device 500, component
Relative positioning, such as the component is the display and keypad of unmanned aerial vehicle (UAV) control device 500, and sensor module 514 may be used also
To detect the position change of 500 1 components of unmanned aerial vehicle (UAV) control device 500 or unmanned aerial vehicle (UAV) control device, user and unmanned aerial vehicle (UAV) control
The existence or non-existence that device 500 contacts, 500 orientation of unmanned aerial vehicle (UAV) control device or acceleration/deceleration and unmanned aerial vehicle (UAV) control device 500
Temperature change.Sensor module 514 may include proximity sensor, be configured to without any physical contact
It detects the presence of nearby objects.Sensor module 514 can also include that optical sensor is used for such as CMOS or ccd image sensor
It is used in imaging applications.In some embodiments, which can also include acceleration transducer, gyroscope
Sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 516 is configured to facilitate wired or wireless way between unmanned aerial vehicle (UAV) control device 500 and other equipment
Communication.Unmanned aerial vehicle (UAV) control device 500 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or they
Combination.In one exemplary embodiment, communication component 516 is received via broadcast channel from external broadcasting management system
Broadcast singal or broadcast related information.In one exemplary embodiment, the communication component 516 further includes near-field communication
(NFC) module, to promote short range communication.For example, radio frequency identification (RFID) technology, Infrared Data Association can be based in NFC module
(IrDA) technology, ultra wide band (UWB) technology, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, unmanned aerial vehicle (UAV) control device 500 can be by one or more application specific integrated circuit
(ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), scene can
Gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are programmed to realize.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for equipment reality
For applying example, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to embodiment of the method
Part explanation.
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 program can be stored in a computer-readable storage medium
In, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic
Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access
Memory, RAM) etc..
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
In the technical scope disclosed by the present invention, any changes or substitutions that can be easily thought of by those familiar with the art, all answers
It is included within the scope of the present invention.Therefore, protection scope of the present invention should be subject to the protection scope in claims.
Claims (11)
1. a kind of heartbeat mechanism keeping method characterized by comprising
When gateway initiates registration request for the first time, the initial heart cycle time is arranged in Softswitch, wraps in the request
The packet of IP containing registration information;
The gateway sends long connection packet according to the initial heart cycle time, to the Softswitch;
The source IP address and port information of the registration information IP packet are connect the source IP of packet with the length by the Softswitch
It is compared between address and port information;
It is that the two is identical in response to comparison result, the Softswitch is based on the initial heart cycle time, increases heartbeat
Cycle time;Alternatively,
It is that the two is different in response to comparison result, the Softswitch is based on the initial heart cycle time, reduces heartbeat
Cycle time.
2. heartbeat mechanism keeping method according to claim 1, which is characterized in that it is described in response to comparison result be both
Identical, the Softswitch is based on the initial heart cycle time, increases heartbeat cycle time, comprising:
It is that the two is identical in response to comparison result, the Softswitch is based on the initial heart cycle time, by heartbeat week
Time phase is increased to 2T, and the T is the initial heart cycle time.
3. heartbeat mechanism keeping method according to claim 2, which is characterized in that it is described in response to comparison result be both
Identical, the Softswitch is based on the initial heart cycle time, after heartbeat cycle time is increased to 2T, also wraps
It includes:
Softswitch iteration, which executes, compares step and heart beat cycle set-up procedure;
It is that the two is identical in response to comparison result, heartbeat cycle time is increased to nT by the Softswitch, and n is positive integer;
It is that the two is different in response to comparison result, heartbeat cycle time is reduced to n/2T+n/4T by the Softswitch.
4. heartbeat mechanism keeping method according to claim 1, which is characterized in that it is described in response to comparison result be both
Difference, the Softswitch are based on the initial heart cycle time, reduce heartbeat cycle time, comprising:
It is that the two is different in response to comparison result, the Softswitch is based on the initial heart cycle time, by heartbeat week
Time phase is reduced to T/2, and the T is the initial heart cycle time.
5. heartbeat mechanism keeping method according to claim 4, which is characterized in that it is described in response to comparison result be both
Difference, the Softswitch are based on the initial heart cycle time, after heartbeat cycle time is reduced to T/2, also wrap
It includes:
Softswitch iteration, which executes, compares step and heart beat cycle set-up procedure;
It is that the two is different in response to comparison result, heartbeat cycle time is reduced to T/m by the Softswitch, and m is positive integer;
It is that the two is identical in response to comparison result, heartbeat cycle time is increased to T/m+T/2m by the Softswitch.
6. a kind of heartbeat mechanism holding meanss characterized by comprising
Setup module, for when gateway initiates registration request for the first time, the initial heart cycle time is arranged in Softswitch,
It include registration information IP packet in the request;
Sending module sends to the Softswitch and grows for the gateway according to the initial heart cycle time
Connection packet;
Comparison module, it is and described for the Softswitch by the source IP address and port information of the registration information IP packet
It is compared between the source IP address and port information of long connection packet;
The setup module is also used in response to comparison result be that the two is identical, and the Softswitch is based on the initial heart
The hop cycle time increases heartbeat cycle time;Alternatively, being that the two is different in response to comparison result, the Softswitch is based on
The initial heart cycle time reduces heartbeat cycle time.
7. heartbeat mechanism holding meanss according to claim 6, which is characterized in that
The setup module is also used in response to comparison result be that the two is identical, and the Softswitch is based on the initial heart
Heartbeat cycle time is increased to 2T by the hop cycle time, and the T is the initial heart cycle time.
8. heartbeat mechanism holding meanss according to claim 7, which is characterized in that described device further include:
Iteration module compares step and heart beat cycle set-up procedure for being executed by Softswitch iteration;
The setup module, be also used in response to comparison result for both it is identical, the Softswitch is by heartbeat cycle time
It is increased to nT, n is positive integer;
The setup module, be also used in response to comparison result for both it is different, the Softswitch is by heartbeat cycle time
It is reduced to n/2T+n/4T.
9. heartbeat mechanism holding meanss according to claim 6, which is characterized in that
The setup module is also used in response to comparison result be the two difference, and the Softswitch is based on the initial heart
Heartbeat cycle time is reduced to T/2 by the hop cycle time, and the T is the initial heart cycle time.
10. device according to claim 9, which is characterized in that
The iteration module is also used to execute comparison step and heart beat cycle set-up procedure by Softswitch iteration;
The setup module, be also used in response to comparison result for both it is different, the Softswitch is by heartbeat cycle time
It is reduced to T/m, m is positive integer;
The setup module, be also used in response to comparison result for both it is identical, the Softswitch is by heartbeat cycle time
It is increased to T/m+T/2m.
11. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that described program is processed
The step of claim 1-5 the method is realized when device executes.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810970468.1A CN109361561A (en) | 2018-08-23 | 2018-08-23 | Heartbeat mechanism keeping method, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810970468.1A CN109361561A (en) | 2018-08-23 | 2018-08-23 | Heartbeat mechanism keeping method, device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109361561A true CN109361561A (en) | 2019-02-19 |
Family
ID=65350257
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810970468.1A Pending CN109361561A (en) | 2018-08-23 | 2018-08-23 | Heartbeat mechanism keeping method, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109361561A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110336708A (en) * | 2019-05-24 | 2019-10-15 | 重庆科技学院 | A kind of elastic keep-alive system and method for Virtual cross-domain communication |
CN113676487A (en) * | 2021-08-31 | 2021-11-19 | 中国电信股份有限公司 | Port connection control method, management method, device and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030120810A1 (en) * | 2001-12-26 | 2003-06-26 | Takayuki Ohta | Interconnecting device, address conversion controlling method and computer program thereof |
CN1633102A (en) * | 2003-12-24 | 2005-06-29 | 华为技术有限公司 | Method for implementing NAT traversing and system thereof |
CN101026567A (en) * | 2007-01-29 | 2007-08-29 | 华为技术有限公司 | Address repeat listing keeping-alive method and system |
CN101800683A (en) * | 2010-04-26 | 2010-08-11 | 中兴通讯股份有限公司 | Method and device for probing survival time of address translation entries on NAT equipment |
-
2018
- 2018-08-23 CN CN201810970468.1A patent/CN109361561A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030120810A1 (en) * | 2001-12-26 | 2003-06-26 | Takayuki Ohta | Interconnecting device, address conversion controlling method and computer program thereof |
CN1633102A (en) * | 2003-12-24 | 2005-06-29 | 华为技术有限公司 | Method for implementing NAT traversing and system thereof |
CN101026567A (en) * | 2007-01-29 | 2007-08-29 | 华为技术有限公司 | Address repeat listing keeping-alive method and system |
CN101800683A (en) * | 2010-04-26 | 2010-08-11 | 中兴通讯股份有限公司 | Method and device for probing survival time of address translation entries on NAT equipment |
Non-Patent Citations (1)
Title |
---|
温彬民: "一种基于自适应心跳机制的MQTT通信协议的研究与应用", 《中国优秀硕士学位论文全文数据库》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110336708A (en) * | 2019-05-24 | 2019-10-15 | 重庆科技学院 | A kind of elastic keep-alive system and method for Virtual cross-domain communication |
CN113676487A (en) * | 2021-08-31 | 2021-11-19 | 中国电信股份有限公司 | Port connection control method, management method, device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022041245A1 (en) | Paging cause sending method and apparatus, and paging cause acquisition method and apparatus | |
WO2020133614A1 (en) | Wireless communication method, terminal, audio component, apparatus, and storage medium | |
JP6186090B2 (en) | Connection method, apparatus, program, and recording medium | |
WO2016192323A1 (en) | Video communication method and device | |
WO2016086581A1 (en) | Instant communication method and device | |
JP6383109B2 (en) | Network connection method, network connection device, terminal, communication device, network connection system, program, and recording medium | |
CN105094732A (en) | Screen display method and apparatus | |
WO2017219503A1 (en) | Method for switching right of control, and control terminal | |
WO2016134600A1 (en) | Method and apparatus for detecting intelligent device | |
WO2017161857A1 (en) | Virtual desktop access method and mobile terminal | |
US20220312550A1 (en) | Method for accessing network by network node, and electronic equipment | |
WO2022021292A1 (en) | Random access method and apparatus, and configuration indication method and apparatus | |
WO2019047143A1 (en) | Paging message receiving method and device, and paging configuration method and device | |
CN109451880A (en) | Method for connecting network and device | |
JP2017501598A (en) | Method and apparatus for broadcasting stream media data | |
WO2019024053A1 (en) | Unmanned aerial vehicle control method and device, unmanned aerial vehicle and remote control device | |
CN106507072A (en) | A kind of wireless display device, system and method | |
WO2019023885A1 (en) | Method, device, equipment, and base station for implementing full-duplex transmission in cellular network | |
CN105141880B (en) | Call answering method and device | |
CN109361561A (en) | Heartbeat mechanism keeping method, device and storage medium | |
JP2017504303A (en) | Power supply circuit and electronic device | |
CN105163391B (en) | Data transmission method, terminal and wireless access points | |
CN105578391B (en) | Information processing method, device and system and terminal equipment | |
WO2020097846A1 (en) | Method and apparatus for broadcasting configuration information of synchronizing signal block, and method and apparatus for receiving configuration information of synchronizing signal block | |
CN114513571A (en) | Device connection method and device, electronic device and readable storage medium |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190219 |
|
RJ01 | Rejection of invention patent application after publication |