CN110365598A - Method, apparatus, server, terminal and the storage medium that heartbeat message is sent - Google Patents

Method, apparatus, server, terminal and the storage medium that heartbeat message is sent Download PDF

Info

Publication number
CN110365598A
CN110365598A CN201910559395.1A CN201910559395A CN110365598A CN 110365598 A CN110365598 A CN 110365598A CN 201910559395 A CN201910559395 A CN 201910559395A CN 110365598 A CN110365598 A CN 110365598A
Authority
CN
China
Prior art keywords
heartbeat
message
heartbeat message
target
offset
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
Application number
CN201910559395.1A
Other languages
Chinese (zh)
Other versions
CN110365598B (en
Inventor
王涛
林繁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENZHEN MONTNETS TECHNOLOGY Co Ltd
Original Assignee
SHENZHEN MONTNETS TECHNOLOGY Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by SHENZHEN MONTNETS TECHNOLOGY Co Ltd filed Critical SHENZHEN MONTNETS TECHNOLOGY Co Ltd
Priority to CN201910559395.1A priority Critical patent/CN110365598B/en
Publication of CN110365598A publication Critical patent/CN110365598A/en
Application granted granted Critical
Publication of CN110365598B publication Critical patent/CN110365598B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/32Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention is suitable for field of computer technology, it is proposed a kind of heartbeat message sending method, for server, comprising: if the concurrent heartbeat message sum received is greater than preset saturation threshold, each heartbeat message that will be greater than preset saturation threshold is determined as target heartbeat message;Based on the receiving time of concurrent the heartbeat message sum and target heartbeat message that receive in current heartbeat cycle, the heartbeat offset of target heartbeat message is determined;Heartbeat feedback message is sent to the terminal for sending target heartbeat message, heartbeat feedback message includes the heartbeat offset.By determining the heartbeat offset of target heartbeat message, and instruction terminal adjusts the time for sending heartbeat message next time according to the heartbeat offset.It is able to solve due to terminal in a short time while sending heartbeat message, the problem of caused network data periodicity congestion, improve the overall performance of server.The present invention also proposes a kind of heartbeat message sending device, server, terminal and storage medium.

Description

Method, apparatus, server, terminal and the storage medium that heartbeat message is sent
Technical field
A kind of sent the invention belongs to field of computer technology more particularly to heartbeat message method, server, terminal, Calculate equipment and storage medium.
Background technique
With the continuous development of development of Mobile Internet technology, the various applications in terminal also flourish, in addition to browsing webpage, There is many emerging instant messaging class applications, game class application etc. in receiving and dispatching mail etc..The characteristics of these emerging applications be for Realize interconnection, the permanent functions such as online, it is desirable to send small data packets, this kind of small data packets to server to terminal periodic Message is commonly referred to as heartbeat message.
In practical applications it is possible that the factors such as Server Restart or Network Abnormal, lead to great amount of terminals while falling The case where line, if the terminal quantity currently to go offline is more, since the waiting time for carrying out reconnection after each terminal disconnection is identical, So causing to have great amount of terminals progress reconnection within the same period, it be easy to cause server instantaneous pressure excessive, Jin Erzao It crashes at server or restarts again;Simultaneously after the terminal to go offline reconnects successfully, due to the heart beat cycle of each terminal It is identical, so also result in great amount of terminals in a short time while sending heartbeat message, it not only will increase server stress, and It also will cause network data periodicity congestion, and then influence server overall performance.
Summary of the invention
In view of this, the embodiment of the invention provides the sending method of heartbeat message, server, terminal, calculate equipment and Storage medium, to solve in the prior art since terminal sends heartbeat message, caused network data week simultaneously in a short time The problem of phase property congestion, improves the overall performance of server.
The first aspect of the embodiment of the present invention provides a kind of heartbeat message sending method, is used for server, comprising:
If the concurrent heartbeat message sum received is greater than preset saturation threshold, preset saturation threshold will be greater than Each heartbeat message is determined as target heartbeat message;
Based on connecing for the concurrent heartbeat message sum and the target heartbeat message received in the current heartbeat cycle Between time receiving, the heartbeat offset of the target heartbeat message is determined;
Heartbeat feedback message is sent to the terminal for sending the target heartbeat message, the heartbeat feedback message includes described Heartbeat offset;The heartbeat offset be used to indicate terminal adjustment send next time the target heartbeat message when Between.
Optionally, described based on the concurrent heartbeat message sum and the target heart that are received in the current heartbeat cycle The receiving time for jumping message, determines the heartbeat offset of the target heartbeat message, comprising:
Obtain the concurrent heartbeat message sum and the target heart that each reception in the current heartbeat cycle arrives Jump the receiving time of message;
Target heartbeat message sequence is generated according to preset target heartbeat message sequence create-rule;
If in tiThe concurrent heartbeat message sum that reception arrives is less than the preset saturation threshold, then the target heart Jump the heartbeat offset of n-th of target heartbeat message in message sequence are as follows:
T=t0+ti-ts
Wherein, t is the heartbeat offset of n-th of target heartbeat message in the target heartbeat message sequence, t0It is described The initial time of current heartbeat cycle, tsFor the receiving time of n-th of target heartbeat message in the target heartbeat message sequence, tiFor i-th of moment in the current heartbeat cycle.
It is optionally, described that target heartbeat message sequence is generated according to preset target heartbeat message create-rule, comprising:
Target heartbeat message sequence is generated according to the sequencing of the receiving time of the target heartbeat message.
Optionally, if described in tiThe concurrent heartbeat message sum that reception arrives is less than the preset saturation threshold And the concurrent heartbeat message sum received is minimum, it is determined that n-th of target heartbeat message in the target heartbeat message sequence Heartbeat offset are as follows: t=t0+ti-tsLater, further includes:
If the heartbeat offset of n-th of target heartbeat message is greater than preset maximum inclined in the target heartbeat message sequence Shifting amount, it is determined that the heartbeat offset of (n+1)th target heartbeat message in the target heart sequence are as follows:
T=t0+ti-ts+1
Wherein, ts+1For the receiving time of (n+1)th target heartbeat message in the target heartbeat message sequence.
Second aspect of the present invention provides a kind of heartbeat message sending method, is used for terminal, comprising:
The heartbeat feedback message that server is sent is received, the heartbeat feedback message includes the heartbeat offset of heartbeat message Amount;The heartbeat feedback message is detecting that it is pre- that concurrent heartbeat message sum that current time receives is greater than by the server If saturation threshold, and determine heartbeat offset when send;
According to the heartbeat offset, adjustment sends the sending time of the heartbeat message to the server next time;
According to the sending time adjusted for sending the heartbeat message, Xiang Suoshu server sends heartbeat message.
Third aspect present invention provides a kind of heartbeat message sending device, comprising:
First determining module, if for being greater than preset saturation threshold in the concurrent heartbeat message sum received, it will Each heartbeat message greater than preset saturation threshold is target heartbeat message;
Second determining module, for based on the concurrent heartbeat message sum that is received in the current heartbeat cycle and described The receiving time of target heartbeat message determines the heartbeat offset of the target heartbeat message;
First sending module, for sending heartbeat feedback message, the heart to the terminal for sending the target heartbeat message Jumping feedback message includes the heartbeat offset;The heartbeat offset is used to indicate described in the terminal adjustment transmission next time The time of target heartbeat message.
Fourth aspect present invention provides a kind of heartbeat message sending device, comprising:
Receiving module, for receiving the heartbeat feedback message of server transmission, the heartbeat feedback message includes the target heart Jump the heartbeat offset of message;The heartbeat feedback message is being detected that current time receives and is being made up one's mind by the server It is sent when jumping message sum and be greater than preset saturation threshold, and determining heartbeat offset;
Module is adjusted, for according to the heartbeat offset, adjustment to send the target heart to the server next time Jump the sending time of message;
Second sending module, for the sending time according to the transmission heartbeat message adjusted, to the clothes Business device sends heartbeat message.
Fifth aspect present invention provides a kind of server, including memory, processor and is stored in the memory In and the computer program that can run on the processor, which is characterized in that the processor executes the computer program The step of heartbeat message sending method described in Shi Shixian first aspect as above.
Sixth aspect present invention provides a kind of terminal, including memory, processor and storage are in the memory And the computer program that can be run on the processor, which is characterized in that when the processor executes the computer program The step of realizing heartbeat message sending method described in second aspect as above.
Seventh aspect present invention provides a kind of computer readable storage medium, the computer-readable recording medium storage There is computer program, which is characterized in that the computer program realizes heartbeat described in first aspect as above when being executed by processor The step of message method, or the step of realizing heartbeat message sending method described in second aspect as above.
Existing beneficial effect is the embodiment of the present invention compared with prior art: by the concurrent heartbeat message received Sum is greater than preset saturation threshold, based on the concurrent heartbeat message sum received in current heartbeat cycle and is greater than preset The receiving time of each heartbeat message of saturation threshold determines that the heartbeat for being greater than each heartbeat message of preset saturation threshold is inclined Shifting amount;And instruction terminal adjusts the time for sending heartbeat message next time according to the heartbeat offset.It is able to solve due to end The problem of end sends heartbeat message simultaneously in a short time, caused network data periodicity congestion, improves the entirety of server Performance.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is the implementation process for the heartbeat message sending method that first embodiment of the invention provides;
Fig. 2 is the specific implementation process of S102 in Fig. 1;
Fig. 3 is another specific implementation process of S102 in Fig. 1;
Fig. 4 is the implementation process for the heartbeat message sending method that second embodiment of the invention provides;
Fig. 5 is the schematic device for the heartbeat message sending device that third embodiment of the invention provides;
Fig. 6 is the schematic device for the heartbeat message sending device that fourth embodiment of the invention provides;
Fig. 7 is server schematic diagram provided by the invention;
Fig. 8 is terminal schematic diagram provided by the invention.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.As shown in Figure 1, It is the implementation process for the heartbeat message sending method that first embodiment of the invention provides, the executing subject of the present embodiment is service Device.Details are as follows:
S101 will be greater than preset saturation if the concurrent heartbeat message sum received is greater than preset saturation threshold Each heartbeat message of threshold value is determined as target heartbeat message.
Server can receive the heartbeat message that great amount of terminals is sent in a heart beat cycle The working efficiency for guaranteeing server, the phenomenon that avoiding the occurrence of the heartbeat message congestion received in the short time, server is usual One heart beat cycle is divided into multiple periods, the concurrent heartbeat message sum that each period receives is counted, when some When the concurrent heartbeat message sum that T is received at the time of in period is more, when being greater than preset saturation threshold, when by this Between in section or extra heartbeat message that moment T is received, the heartbeat message for being greater than preset saturation threshold are determined as Target heartbeat message.Specifically, can be using each moment in a heart beat cycle as statistical unit, statistical server is when per Carve the concurrent heartbeat message sum received.
S102, based on the concurrent heartbeat message sum and the target heartbeat message received in the current heartbeat cycle Receiving time, determine the heartbeat offset of the target heartbeat message.
Optionally, since the processing speed of server is limited, so that there is the limitation of maximum number of concurrent in server, therefore, In order to avoid the instantaneous pressure of server is excessive, the concurrent heartbeat message for needing to consider to receive is total.Usual server is one The heartbeat message sum that different moments in a heart beat cycle receive is often different, the hair of different moments corresponding heartbeat message End of making arrangements for his funeral also tends to difference.Therefore, it is necessary to further determine that the receiving time of target heartbeat message, based on the current heartbeat week The receiving time of the concurrent heartbeat message sum and the target heartbeat message that receive in phase, determines the target heartbeat message Heartbeat offset, can more accurately judge the terminal for needing to adjust heartbeat message sending time.
Specifically, as shown in Fig. 2, being the specific implementation process of S102 in Fig. 1.As shown in Figure 2, S102 includes:
It is total and described to obtain the concurrent heartbeat message that each reception in the current heartbeat cycle arrives by S1021 The receiving time of target heartbeat message.
In the present embodiment, as unit of the moment, the current heartbeat cycle is divided, is further worked as described in acquisition The concurrent heartbeat message sum that each reception arrives in preceding heart beat cycle.It is understood that can with it is preset when it is a length of Unit carries out the current heartbeat cycle to be divided into different short time periods, when the heart received in some short time period When jump message sum is more, it is possible to influence the processing speed of server in the short time period, can be existed at this time by calculating Instantaneous heartbeat density in short time period determines the need for the sending time of adjustment heartbeat message.
Further, it is deposited between the receiving time of the target heartbeat message and the sending time of the target heartbeat message In certain mapping relations, when server can determine the transmission of target heartbeat message by the receiving time of target heartbeat message Between.
S1022 generates target heartbeat message sequence according to preset target heartbeat message sequence create-rule.
Optionally, preset target heartbeat message sequence create-rule is by the target heartbeat message according to receiving time It is ranked up, generates the process of target heartbeat message sequence.Specifically, in the present embodiment, disappeared according to preset target heartbeat Breath sequence create-rule generates the elder generation that target heartbeat message sequence includes the default receiving time according to the target heartbeat message After be sequentially generated target heartbeat message sequence.
S1023, if in the i-th moment tiThe concurrent heartbeat message sum that reception arrives is less than the preset saturation threshold And the concurrent heartbeat message sum received is minimum, then is based on the i-th moment tiMoment and the target heartbeat message sequence Determine the heartbeat offset of n-th of target heartbeat message in the target heartbeat message sequence.
Specifically, in the target heartbeat message sequence n-th of target heartbeat message heartbeat offset are as follows:
T=t0+ti-ts
Wherein, t is the heartbeat offset of n-th of target heartbeat message in the target heartbeat message sequence, t0It is described The initial time of current heartbeat cycle, tsFor the receiving time of n-th of target heartbeat message in the target heartbeat message sequence, tiFor i-th of moment in the current heartbeat cycle.
It is to be appreciated that server is in a heart beat cycle, it can be in the concurrent heartbeat message that multiple receptions arrive Sum is respectively less than the preset saturation threshold, in the present embodiment, in order to more accurately determine heartbeat offset, current The concurrent heartbeat message sum received in heart beat cycle is less than the preset saturation threshold and the concurrent heartbeat received disappears T at the time of breath sum is minimumi, as the initial time of target heartbeat offset, it is based on moment tiTo determine that the target heartbeat disappears Cease the heartbeat offset of arbitrary target heartbeat message in sequence.
By above-mentioned analysis it is found that in the present embodiment, passing through the concurrent heartbeat received in determining current heartbeat cycle It is the initial time of heartbeat offset at the time of message sum is minimum, each target heart is determined according to heartbeat offset calculation formula The heartbeat offset for jumping message, can determine in current heartbeat cycle each reception to concurrent heartbeat message sum become In average.
Specifically, as shown in figure 3, being another specific implementation process of S102 in Fig. 1.From the figure 3, it may be seen that the present embodiment and figure 2 illustrated embodiments are compared, and the specific implementation process of S2021 is identical as S1021, specific implementation process and the S1022 phase of S2022 Together, the specific implementation process of S2023 is identical as S1023, and difference further includes mainly S2024 in the present embodiment.Specifically, The implementation process of S2024 is as follows.
S2024, if the heartbeat offset of n-th of target heartbeat message is greater than preset in the target heartbeat message sequence Maximum offset then determines the heart of (n+1)th target heartbeat message in the target heart sequence based on the maximum offset Jump offset.
Specifically, the maximum offset determines the heartbeat of (n+1)th target heartbeat message in the target heart sequence Offset are as follows:
T=t0+ti-ts+1
Wherein, ts+1For the receiving time of (n+1)th target heartbeat message in the target heartbeat message sequence.
By being analyzed above it is found that in the embodiment of this programme, heartbeat offset is as unit of the time, optionally, with one It is unit at the time of in a heart beat cycle.When the sum of target heartbeat message is more and is more than that the heartbeat message number of saturation threshold is big When assignable moment number in a heart beat cycle, according to
T=t0+ti-ts
It determines that heartbeat offset will will appear assignment problem, therefore, in the present embodiment, has preset maximum offset, when The heartbeat offset of n-th of target heartbeat message is greater than preset maximum offset in the target heartbeat message sequence, again With tiThe heartbeat offset of (n+1)th target heartbeat message in the target heart sequence is determined for initial time.
By above-mentioned analysis it is found that on the basis of the present embodiment embodiment shown in Fig. 2, by presetting maximum offset, Come solve the problem of when target heartbeat message sum it is more and be more than saturation threshold when how to determine heartbeat offset, can Further ensure that each moment connects in current heartbeat cycle when the sum of target heartbeat message is more than preset saturation threshold The concurrent heartbeat message sum received tends to be average.
S103 sends heartbeat feedback message, the heartbeat feedback message packet to the terminal for sending the target heartbeat message Include the heartbeat offset;The heartbeat offset is used to indicate the terminal adjustment and sends the target heartbeat message next time Time.
The heartbeat message that different terminals are sent carries the identification information of terminal, and server can be according to the target heartbeat The terminal identification information that message carries determines the terminal for sending the target heartbeat message, to the transmission target heartbeat message Terminal sends heartbeat feedback message.Specifically, heartbeat feedback message is the heartbeat message that server sends the terminal received Response message, in this example, the heartbeat feedback message includes the heartbeat offset, and the heartbeat offset is for referring to Show that the terminal adjustment sends the time of the target heartbeat message next time.
By above-mentioned analysis it is found that heartbeat message sending method proposed by the present invention, by the concurrent heartbeat received When message sum is greater than preset saturation threshold, based on the concurrent heartbeat message sum received in current heartbeat cycle and it is greater than The receiving time of each heartbeat message of preset saturation threshold determines each heartbeat message for being greater than preset saturation threshold Heartbeat offset;And instruction terminal adjusts the time for sending heartbeat message next time according to the heartbeat offset.It is able to solve Since terminal sends heartbeat message simultaneously in a short time, the problem of caused network data periodicity congestion, server is improved Overall performance.
As shown in figure 4, being the implementation process for the heartbeat message sending method that second embodiment of the invention provides, the present embodiment Executing subject be terminal.Details are as follows:
S401 receives the heartbeat feedback message that server is sent, and the heartbeat feedback message includes the heartbeat of heartbeat message Offset;The heartbeat feedback message is big in the concurrent heartbeat message sum for detecting that current time receives by the server It is sent in preset saturation threshold, and when determining heartbeat offset.
After server, which determines, has terminal to need to adjust the time for sending heartbeat message, heartbeat can be sent to corresponding terminal Feedback message, the heartbeat feedback message include the offset of heartbeat message.
S402, according to the heartbeat offset, adjustment sends the transmission of the heartbeat message to the server next time Time.
Terminal can extract the heartbeat offset, and according to institute after the heartbeat feedback message for receiving server transmission State the time that the adjustment of heartbeat offset sends the heartbeat message to the server next time.
S403, according to the sending time adjusted for sending the heartbeat message, Xiang Suoshu server sends heartbeat Message.
By above-mentioned analysis it is found that heartbeat message sending method proposed by the present invention, by according to heartbeat offset, adjustment The time for sending heartbeat message to server next time is sent, a large amount of heartbeat can be sent in the same time to avoid terminal and disappeared Breath, and then solve the problems, such as network data periodicity congestion, improve the overall performance of server.
Fig. 5 is the schematic device for the heartbeat message sending device that third embodiment of the invention provides.As shown in figure 5, should The heartbeat message sending device 5 of embodiment includes: the first determining module 510, the second determining module 520, the first sending module 530.Wherein,
First determining module 510, if for being greater than preset saturation threshold in the concurrent heartbeat message sum received, The each heartbeat message that will be greater than preset saturation threshold is target heartbeat message;
Second determining module 520, for based on the concurrent heartbeat message sum that is received in the current heartbeat cycle and The receiving time of the target heartbeat message determines the heartbeat offset of the target heartbeat message;
First sending module 530, it is described for sending heartbeat feedback message to the terminal for sending the target heartbeat message Heartbeat feedback message includes the heartbeat offset;The heartbeat offset is used to indicate the terminal adjustment and sends institute next time State the time of target heartbeat message.
Fig. 6 is the schematic device for the heartbeat message sending device that fourth embodiment of the invention provides.As shown in fig. 6, should The heartbeat message sending device 6 of embodiment includes: receiving module 610, adjusts module 620, the second sending module 630;Wherein,
Receiving module 610, for receiving the heartbeat feedback message of server transmission, the heartbeat feedback message includes target The heartbeat offset of heartbeat message;The heartbeat feedback message is detecting that current time receives concurrent by the server Heartbeat message sum is greater than preset saturation threshold, and sends when determining heartbeat offset;
Module 620 is adjusted, for according to the heartbeat offset, adjustment to send the target to the server next time The sending time of heartbeat message;
Second sending module 630, for according to the sending time adjusted for sending the heartbeat message, Xiang Suoshu Server sends heartbeat message.Fig. 7 is server schematic diagram provided by the invention.As shown in fig. 7, the server packet of the embodiment It includes: processor 70, memory 71 and being stored in the computer that can be run in the memory 71 and on the processor 70 Program 72, such as heartbeat message send program.The processor 70 realizes above-mentioned each heart when executing the computer program 72 The step in message method embodiment, such as step 101 shown in FIG. 1 are jumped to 103.Alternatively, the processor 70 executes The function of each module/unit in above-mentioned server example, such as module 510 shown in Fig. 5 are realized when the computer program 72 To 530 function.
Illustratively, the computer program 72 can be divided into one or more module/units, it is one or Multiple module/units are stored in the memory 71, and are executed by the processor 70, to complete the present invention.Described one A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for Implementation procedure of the computer program 72 in the server 7 is described.For example, the computer program 72 can be divided Module, extraction module (module in virtual bench), each specific function of module are recorded at module, determining module, audio signal is obtained It can be as follows:
First determining module, if for being greater than preset saturation threshold in the concurrent heartbeat message sum received, it will Each heartbeat message greater than preset saturation threshold is target heartbeat message;
Second determining module, for based on the concurrent heartbeat message sum that is received in the current heartbeat cycle and described The receiving time of target heartbeat message determines the heartbeat offset of the target heartbeat message;
First sending module, for sending heartbeat feedback message, the heart to the terminal for sending the target heartbeat message Jumping feedback message includes the heartbeat offset;The heartbeat offset is used to indicate described in the terminal adjustment transmission next time The time of target heartbeat message.
Fig. 8 is terminal schematic diagram provided by the invention.As shown in figure 8, the terminal of the embodiment includes: processor 80, deposits Reservoir 81 and it is stored in the computer program 82 that can be run in the memory 81 and on the processor 80, such as heartbeat Message sends program.The processor 80 realizes that above-mentioned each heartbeat message sending method is real when executing the computer program 82 Apply the step in example, such as step 401 shown in Fig. 4 is to 403.Alternatively, the processor 80 executes the computer program 82 The function of each module/unit in the above-mentioned server example of Shi Shixian, such as the function of module 610 to 630 shown in Fig. 6.
Illustratively, the computer program 82 can be divided into one or more module/units, it is one or Multiple module/units are stored in the memory 81, and are executed by the processor 80, to complete the present invention.Described one A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for Implementation procedure of the computer program 82 in the server 8 is described.For example, the computer program 82 can be divided At receiving module, adjustment module, the second sending module (module in virtual bench), each module concrete function is as follows:
Receiving module, for receiving the heartbeat feedback message of server transmission, the heartbeat feedback message includes the target heart Jump the heartbeat offset of message;The heartbeat feedback message is being detected that current time receives and is being made up one's mind by the server It is sent when jumping message sum and be greater than preset saturation threshold, and determining heartbeat offset;
Module is adjusted, for according to the heartbeat offset, adjustment to send the target heart to the server next time Jump the sending time of message;
Second sending module, for the sending time according to the transmission heartbeat message adjusted, to the clothes Business device sends heartbeat message.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method, it can be with It realizes by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute The division of module or unit is stated, only a kind of logical function partition, there may be another division manner in actual implementation, such as Multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Separately A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, device Or the INDIRECT COUPLING or communication connection of unit, it can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple On communication unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or In use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned implementation All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program generation Code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium It may include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic that can carry the computer program code Dish, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that described The content that computer-readable medium includes can carry out increasing appropriate according to the requirement made laws in jurisdiction with patent practice Subtract, such as does not include electric carrier signal and electricity according to legislation and patent practice, computer-readable medium in certain jurisdictions Believe signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of heartbeat message sending method, which is characterized in that be used for server, comprising:
If the concurrent heartbeat message sum received is greater than preset saturation threshold, each of preset saturation threshold will be greater than Heartbeat message is determined as target heartbeat message;
When reception based on the concurrent heartbeat message sum and the target heartbeat message that are received in the current heartbeat cycle Between, determine the heartbeat offset of the target heartbeat message;
Heartbeat feedback message is sent to the terminal for sending the target heartbeat message, the heartbeat feedback message includes the heartbeat Offset;The heartbeat offset is used to indicate the time that the terminal adjustment sends the target heartbeat message next time.
2. heartbeat message sending method as described in claim 1, which is characterized in that described based in the current heartbeat cycle The receiving time of the concurrent heartbeat message sum and the target heartbeat message that receive, determines the heart of the target heartbeat message Jump offset, comprising:
Obtain each reception in the current heartbeat cycle to concurrent heartbeat message sum and the target heartbeat disappear The receiving time of breath;
Target heartbeat message sequence is generated according to preset target heartbeat message sequence create-rule;
If in tiThe concurrent heartbeat message sum that reception arrives is less than the preset saturation threshold, then the target heartbeat disappears Cease the heartbeat offset of n-th of target heartbeat message in sequence are as follows:
T=t0+ti-ts
It wherein, is the heartbeat offset of n-th of target heartbeat message in the target heartbeat message sequence, t0Work as front center to be described The initial time of hop cycle, tsFor the receiving time of n-th of target heartbeat message in the target heartbeat message sequence, tiFor institute State i-th of moment in current heartbeat cycle.
3. heartbeat message sending method as claimed in claim 2, which is characterized in that described according to preset target heartbeat message Create-rule generates target heartbeat message sequence, comprising:
Target heartbeat message sequence is generated according to the sequencing of the receiving time of the target heartbeat message.
4. heartbeat message sending method as claimed in claim 3, which is characterized in that if described in tiIt is that reception arrives and It sends out heartbeat message sum and is less than the preset saturation threshold, it is determined that n-th of target heart in the target heartbeat message sequence Jump the heartbeat offset of message are as follows: t=t0+ti-tsLater, further includes:
If the heartbeat offset of n-th of target heartbeat message is greater than preset peak excursion in the target heartbeat message sequence Amount, it is determined that the heartbeat offset of (n+1)th target heartbeat message in the target heart sequence are as follows:
T=t0+ti-ts+1
Wherein, ts+1For the receiving time of (n+1)th target heartbeat message in the target heartbeat message sequence.
5. a kind of heartbeat message sending method, which is characterized in that be used for terminal, comprising:
The heartbeat feedback message that server is sent is received, the heartbeat feedback message includes the heartbeat offset of heartbeat message;Institute It states heartbeat feedback message and is detecting that it is preset that concurrent heartbeat message sum that current time receives is greater than by the server Saturation threshold, and sent when determining heartbeat offset;
According to the heartbeat offset, adjustment sends the sending time of the heartbeat message to the server next time;
According to the sending time adjusted for sending the heartbeat message, Xiang Suoshu server sends heartbeat message.
6. a kind of heartbeat message sending device characterized by comprising
First determining module, if will be greater than for being greater than preset saturation threshold in the concurrent heartbeat message sum received Each heartbeat message of preset saturation threshold is target heartbeat message;
Second determining module, for based on the concurrent heartbeat message sum received in the current heartbeat cycle and the target The receiving time of heartbeat message determines the heartbeat offset of the target heartbeat message;
First sending module, for sending heartbeat feedback message to the terminal for sending the target heartbeat message, the heartbeat is anti- Presenting message includes the heartbeat offset;The heartbeat offset is used to indicate the terminal adjustment and sends the target next time The time of heartbeat message.
7. a kind of heartbeat message sending device characterized by comprising
Receiving module, for receiving the heartbeat feedback message of server transmission, the heartbeat feedback message includes that target heartbeat disappears The heartbeat offset of breath;The heartbeat feedback message is disappeared by the server in the concurrent heartbeat for detecting that current time receives Breath sum is greater than preset saturation threshold, and sends when determining heartbeat offset;
Module is adjusted, for according to the heartbeat offset, adjustment to send the target heartbeat to the server next time and disappears The sending time of breath;
Second sending module, for according to the sending time adjusted for sending the heartbeat message, Xiang Suoshu server Send heartbeat message.
8. a kind of server, including memory, processor and storage can transport in the memory and on the processor Capable computer program, which is characterized in that the processor is realized when executing the computer program as claim 1-4 is any The step of item heartbeat message sending method.
9. a kind of terminal, including memory, processor and storage can be run in the memory and on the processor Computer program, which is characterized in that the processor realizes heartbeat as claimed in claim 5 when executing the computer program The step of message method.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In realizing the heartbeat message sending method as described in any one of Claims 1-4 when the computer program is executed by processor Step, or the step of realizing heartbeat message sending method as claimed in claim 5.
CN201910559395.1A 2019-06-26 2019-06-26 Heartbeat message sending method, device, server, terminal and storage medium Active CN110365598B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910559395.1A CN110365598B (en) 2019-06-26 2019-06-26 Heartbeat message sending method, device, server, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910559395.1A CN110365598B (en) 2019-06-26 2019-06-26 Heartbeat message sending method, device, server, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN110365598A true CN110365598A (en) 2019-10-22
CN110365598B CN110365598B (en) 2023-05-02

Family

ID=68216944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910559395.1A Active CN110365598B (en) 2019-06-26 2019-06-26 Heartbeat message sending method, device, server, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN110365598B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111309521A (en) * 2020-01-19 2020-06-19 深圳市恒扬数据股份有限公司 FPGA reloading method, FPGA card type equipment and host
CN112767936A (en) * 2021-01-06 2021-05-07 镁佳(北京)科技有限公司 Voice conversation method, device, storage medium and electronic equipment
CN115087087A (en) * 2021-03-15 2022-09-20 中国电信股份有限公司 Service synchronization method, dual-card terminal and non-transitory computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012174934A1 (en) * 2011-06-21 2012-12-27 中兴通讯股份有限公司 Adaptive method and device for heartbeat period
US20160192306A1 (en) * 2013-09-09 2016-06-30 Huawei Technologies Co., Ltd. Method, device and system for adjusting timing guidance
CN106685748A (en) * 2015-11-05 2017-05-17 中移(杭州)信息技术有限公司 Heartbeat information sending methods, server and terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012174934A1 (en) * 2011-06-21 2012-12-27 中兴通讯股份有限公司 Adaptive method and device for heartbeat period
US20160192306A1 (en) * 2013-09-09 2016-06-30 Huawei Technologies Co., Ltd. Method, device and system for adjusting timing guidance
CN106685748A (en) * 2015-11-05 2017-05-17 中移(杭州)信息技术有限公司 Heartbeat information sending methods, server and terminal

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111309521A (en) * 2020-01-19 2020-06-19 深圳市恒扬数据股份有限公司 FPGA reloading method, FPGA card type equipment and host
CN111309521B (en) * 2020-01-19 2024-02-09 深圳市恒扬数据股份有限公司 FPGA reloading method, FPGA card type equipment and host
CN112767936A (en) * 2021-01-06 2021-05-07 镁佳(北京)科技有限公司 Voice conversation method, device, storage medium and electronic equipment
CN115087087A (en) * 2021-03-15 2022-09-20 中国电信股份有限公司 Service synchronization method, dual-card terminal and non-transitory computer readable storage medium

Also Published As

Publication number Publication date
CN110365598B (en) 2023-05-02

Similar Documents

Publication Publication Date Title
CN107196869B (en) The adaptive load balancing method, apparatus and system of Intrusion Detection based on host actual loading
CN110365598A (en) Method, apparatus, server, terminal and the storage medium that heartbeat message is sent
CN106470123B (en) Log collecting method, client, server and electronic equipment
CN110519711A (en) A kind of information push method, device, storage medium and server
CN105338061A (en) Lightweight message oriented middleware realization method and system
CN108667719A (en) A kind of real-time Message Passing method and system
CN107148066A (en) Network resource optimization device and method and WAP
CN108228363A (en) A kind of message method and device
CN106390451B (en) Method and device for testing capacity of game server
CN104468187B (en) The acquisition methods and device of heart beat cycle
CN109729519A (en) The method and relevant apparatus of data downloading
CN104301241B (en) A kind of SOA dynamic load distributing methods and system
CN104253737B (en) A kind of method and device for measuring social channel communication effect
CN107908481A (en) A kind of method of data synchronization, device and system
CN103685388A (en) Method and device for information management
CN108551485A (en) A kind of streaming medium content caching method, device and computer storage media
CN105610886A (en) Information pushing control method and information pushing platform
CN107249192A (en) A kind of method for monitoring state and device of shared network section
CN109829759A (en) A kind of Internet advertising alliance system based on block chain
CN109597734A (en) The monitoring method and device of report operation duration
CN108446125A (en) Application program installation kit generation method, device, equipment and system
CN105491649B (en) A kind of the carrier aggregation mode setting method and communication terminal of communication terminal
CN112436982B (en) Network flow automatic mixed running test method, system, terminal and storage medium
CN108304301A (en) Record the method and device of user behavior track
CN110266814B (en) Transmission method and transmission device

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