CN104022922B - Mobile terminal, heartbeat forwarding server and heartbeat message sending method and system - Google Patents

Mobile terminal, heartbeat forwarding server and heartbeat message sending method and system Download PDF

Info

Publication number
CN104022922B
CN104022922B CN201410302253.4A CN201410302253A CN104022922B CN 104022922 B CN104022922 B CN 104022922B CN 201410302253 A CN201410302253 A CN 201410302253A CN 104022922 B CN104022922 B CN 104022922B
Authority
CN
China
Prior art keywords
application program
heartbeat
heartbeat message
record
information
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.)
Active
Application number
CN201410302253.4A
Other languages
Chinese (zh)
Other versions
CN104022922A (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.)
Beijing University of Posts and Telecommunications
Original Assignee
Beijing University of Posts and Telecommunications
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 Beijing University of Posts and Telecommunications filed Critical Beijing University of Posts and Telecommunications
Priority to CN201410302253.4A priority Critical patent/CN104022922B/en
Publication of CN104022922A publication Critical patent/CN104022922A/en
Application granted granted Critical
Publication of CN104022922B publication Critical patent/CN104022922B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a kind of mobile terminal, heartbeat forwarding server and heartbeat message sending method and system, methods described includes:Mobile terminal, according to the heartbeat message that each application program in the last heartbeat transmission cycle sends, is transmitted after the unified heartbeat data packets of encapsulation when each heartbeat sends the cycle and reaches by the centripetal forwarding server of jumping of terminal wireless baseband module.After heartbeat forwarding server receives unified heartbeat data packets, therefrom parse the mark of mobile terminal, and each application program information;After determining the Application Status table corresponding with the mark of the mobile terminal for parsing, information according to each application program for parsing to application routine status table in the state of each application program be updated;And for each state in Application Status table be online application program, voluntarily the heart beat cycle according to the application program sends the heartbeat message of the application program.The method can save radio channel resource, reduce mobile terminal energy consumption.

Description

Mobile terminal, heartbeat forwarding server and heartbeat message sending method and system
Technical field
The present invention relates to network field, more particularly to a kind of mobile terminal, heartbeat forwarding server and heartbeat message hair Delivery method and system.
Background technology
With the fast development of mobile terminal intelligence degree, the network service application that can be used for mobile terminal is also more next It is more.These network service applications to application server in order to show presence and update the address of place mobile terminal, Each network service application is required for sending heartbeat message (or status information) to application server timing.Such as, it is provided with The mobile terminal of Tencent QQ application program sends the heartbeat messages such as the online of QQ, off-line state message to QQ application servers;Peace Mobile terminal equipped with microblogging application program sends the heartbeats such as the online of microblogging, off-line state message to microblogging application server to be believed Breath.
Existing heartbeat message send the framework of system as shown in figure 1, including:Mobile terminal 1 01 and application server 102.Heartbeat message sending method based on the system is typically:Mobile terminal 1 01 is for each network service in this terminal Using the heart beat cycle according to the network service application calls terminal wireless baseband module, and the net is sent to application server 102 The heartbeat message that network is served by.Specifically, mobile terminal 1 01 can be including mobile phone, panel computer etc..
In actual applications, the network service application being typically different possesses different heart beat cycles, and these are different Network service application often wakes up mobile terminal according to respective heart beat cycle, so that mobile terminal calls terminal wireless base band mould Block carries out the transmission of heartbeat message.However, when the network service application operation on mobile terminal is more, required for mobile terminal The heartbeat message of transmission is more and more frequent, causes mobile terminal frequently to call terminal wireless baseband module so that wireless channel is accounted for With rate also more and more higher, the dormancy ratio (i.e. the ratio of dormancy time and wakeup time) of mobile intelligent terminal is more and more lower, most Radio channel resource is caused to waste serious and mobile terminal energy consumption eventually too fast.
To sum up, existing heartbeat message sending method can cause radio channel resource to waste and mobile terminal energy consumption mistake Hurry up.
The content of the invention
For the defect that above-mentioned prior art is present, a kind of mobile terminal, heartbeat forwarding clothes are the embodiment of the invention provides Business device and heartbeat message sending method and system, are used to save radio channel resource, reduce mobile terminal energy consumption.
A kind of heartbeat message sending method is the embodiment of the invention provides, including:
Mobile terminal sends when each heartbeat sends the cycle and reaches according to each application program in the last heartbeat transmission cycle Heartbeat message, be transmitted by the centripetal jump forwarding server of terminal wireless baseband module after the unified heartbeat data packets of encapsulation;
After the heartbeat forwarding server receives the unified heartbeat data packets, the mark of mobile terminal is therefrom parsed Know, and each application program information;Determine the Application Status table corresponding with the mark of the mobile terminal for parsing Afterwards, the information according to each application program for parsing is carried out more to the state of each application program in the Application Status table Newly;And for each state in the Application Status table be online application program, voluntarily according to the heart of the application program Hop cycle sends the heartbeat message of the application program.
It is preferred that the heartbeat message sent according to each application program in the last heartbeat transmission cycle, the unified heart of encapsulation Packet is jumped, is specifically included:
For the heartbeat message that each application program in the last heartbeat transmission cycle sends, by the heartbeat message to that should answer Recorded to conduct in local heartbeat message database is newly-increased with the number record of program;Wherein, the application program sends Heartbeat message includes:Heart time, terminal address, server address, the heart beat cycle of the application program;
For each newly-increased record, after obtaining the numbering and comparison information of application program in the newly-increased record, institute is searched State previous bar in heartbeat message database to should application program number record heartbeat message;If the comparison in newly-increased record Information is different from the comparison information in the heartbeat message for finding out, then be to send first by the newly-increased recording mark;Wherein, it is described Comparison information includes:Terminal address, server address;
It is not marked with the newly-increased record for sending first extracting numbering and the heart time conduct of application program from each After brief information, by the mark of the mobile terminal, labeled as the newly-increased record for sending first, and the brief information envelope extracted It is attached in the unified heartbeat data packets.
It is preferred that the information of each application program that the basis is parsed is to each application in the Application Status table The state of program is updated, and specifically includes:
If the heartbeat forwarding server parses the heartbeat message of application program from the unified heartbeat data packets, Address information in the heartbeat message of the application program that will be parsed, to should application program number record to parse In the corresponding heartbeat message cache table of mark of mobile terminal;Heartbeat week in the heartbeat message of the application program that will be parsed Phase, to should application program number record to the application program essential information corresponding with the mark of the mobile terminal for parsing In table;Using the heart time in the heartbeat message of the application program for parsing, correspondence in the Application Status table is updated The time of the number record of the application program, and to should the state of the number record of the application program application program be online;
If the heartbeat forwarding server parses the brief information of application program from the unified heartbeat data packets, Using the heart time in the brief information of the application program for parsing, to that should apply in the renewal Application Status table The time of the number record of program, and to should the state of the number record of the application program application program be online;
The heartbeat forwarding server is not for being updated each application program of time in the Application Status table Numbering, obtain the maximum rating renewal time with the numbering corresponding record of the application program, and judging to apply journey with this After maximum rating renewal time of the time of the numbering corresponding record of sequence with the difference of current time more than acquisition, will be to that should answer Status modifier with the application program of the number record of program is offline.
The embodiment of the present invention additionally provides a kind of heartbeat message and sends system, including:
Mobile terminal, for when each heartbeat sends the cycle and reaches, according to respectively applying journey in the last heartbeat transmission cycle The heartbeat message that sequence sends, is transmitted after the unified heartbeat data packets of encapsulation by terminal wireless baseband module;
Heartbeat forwarding server, after receiving the unified heartbeat data packets that the mobile terminal sends, therefrom parses Go out the mark of mobile terminal, and each application program information;Determine corresponding with the mark of the mobile terminal for parsing After Application Status table, information according to each application program for parsing to the Application Status table in respectively apply journey The state of sequence is updated;And for each state in the Application Status table be online application program, voluntarily basis The heart beat cycle of the application program sends the heartbeat message of the application program.
It is preferred that the mobile terminal for last heartbeat specifically for when each heartbeat sends the cycle and reaches, sending The heartbeat message that each application program sends in cycle, by the heartbeat message to should application program number record to local As newly-increased record in heartbeat message database;For each newly-increased record, the volume of the application program in the newly-increased record is obtained Number and comparison information after, search previous bar in the heartbeat message database to should application program number record heartbeat letter Breath;If the comparison information in newly-increased record is different from the comparison information in the heartbeat message for finding out, by the newly-increased record mark It is designated as sending first;It is not marked with the newly-increased record for sending first extracting the numbering and heart time of application program from each After as brief information, by the mark of the mobile terminal, labeled as the newly-increased record for sending first, and the brief letter for extracting Breath is encapsulated into the unified heartbeat data packets;Wherein, the heartbeat message that the application program sends includes:Heart time, end End address, server address, the heart beat cycle of the application program;The comparison information includes:Terminal address, server address; And
If the heartbeat forwarding server from the unified heartbeat data packets for receiving specifically for parsing application program Heartbeat message, then the address information in the heartbeat message of the application program that will be parsed, to should application program number record To in the heartbeat message cache table corresponding with the mark of the mobile terminal for parsing;The heartbeat letter of the application program that will be parsed Heart beat cycle in breath, to should application program number record to the application corresponding with the mark of the mobile terminal for parsing In program Basic Information Table;Using the heart time in the heartbeat message of the application program for parsing, the application program is updated In state table to should application program number record time, and to should the number record of the application program application program State is online;If parsing the brief information of application program from the unified heartbeat data packets, should using what is parsed With the heart time in the brief information of program, update in the Application Status table to should application program number record Time, and to should the state of the number record of the application program application program be online;And the heartbeat forwarding service Device is obtained and the application program for not being updated the numbering of each application program of time in the Application Status table The maximum rating of numbering corresponding record updates the time, and judge with time of the numbering corresponding record of the application program with ought After the difference of preceding time is more than the maximum rating renewal time for obtaining, by should this of number record of application program apply journey The status modifier of sequence is offline;Afterwards, it is online application program for each state in the Application Status table, voluntarily Heart beat cycle according to the application program sends the heartbeat message of the application program.
It is preferred that the mobile terminal is specifically included:
Heartbeat message logging modle, for when each heartbeat sends the cycle and reaches, in the last heartbeat transmission cycle The heartbeat message that each application program sends, by the heartbeat message to should application program number record to local heartbeat letter As newly-increased record in breath database;Wherein, the heartbeat message that the application program sends includes:Heart time, terminal address, The heart beat cycle of server address, the application program;
Judge module is sent first, for in heartbeat message logging modle storage to heartbeat message database Each newly-increased record, after obtaining the numbering and comparison information of application program in the newly-increased record, searches the heartbeat message number According to previous bar in storehouse to should application program number record heartbeat message;If comparison information in newly-increased record with find out Heartbeat message in comparison information it is different, then judge that this newly-increased is recorded as sending first;Otherwise, judging the newly-increased record is not Send first;Wherein, the comparison information includes:Terminal address, server address;
Packet encapsulation module, the judged result for sending judge module first according to, is never to send first Newly-increased record in extract application program numbering and heart time as brief information after, by the mark of the mobile terminal, Labeled as the newly-increased record for sending first, and the brief information extracted is encapsulated into the unified heartbeat data packets.
It is preferred that the heartbeat forwarding server is specifically included:
Heartbeat data packets parsing module, for being parsed to the unified heartbeat data packets for receiving, exports analysis result;
Heartbeat message processing module, is located as follows for the heartbeat message to the application program in the analysis result Reason:Address information in the heartbeat message of the application program that will be parsed, to should application program number record to parsing In the corresponding heartbeat message cache table of mark of the mobile terminal for going out;The heart in the heartbeat message of the application program that will be parsed Hop cycle, to should application program number record it is basic to the application program corresponding with the mark of the mobile terminal for parsing In information table;Using the heart time in the heartbeat message of the application program for parsing, in the renewal Application Status table To should application program number record time, and to should the number record of the application program application program state be Line;
Brief information processing module, is located as follows for the brief information to the application program in the analysis result Reason:Using the heart time in the brief information of the application program for parsing, update in the Application Status table to should The time of the number record of application program, and to should the state of the number record of the application program application program be online;
State update module, for each application program for not being updated the time in the Application Status table Numbering, obtains and updates the time with the maximum rating of the numbering corresponding record of the application program, and judging and the application program Numbering corresponding record time and current time difference more than the maximum rating renewal time for obtaining after, will be to that should apply The status modifier of the application program of the number record of program is offline;
Heartbeat message sending module, is online application program for each state in the Application Status table, from Row sends the heartbeat message of the application program according to the heart beat cycle of the application program.
The embodiment of the present invention additionally provides a kind of mobile terminal, including:
Heartbeat message logging modle, for when each heartbeat sends the cycle and reaches, in the last heartbeat transmission cycle The heartbeat message that each application program sends, by the heartbeat message to should application program number record to local heartbeat letter As newly-increased record in breath database;Wherein, the heartbeat message that the application program sends includes:Heart time, terminal address, The heart beat cycle of server address, the application program;
Judge module is sent first, for in heartbeat message logging modle storage to heartbeat message database Each newly-increased record, after obtaining the numbering and comparison information of application program in the newly-increased record, searches the heartbeat message number According to previous bar in storehouse to should application program number record heartbeat message;If comparison information in newly-increased record with find out Heartbeat message in comparison information it is different, then judge that this newly-increased is recorded as sending first;Otherwise, judging the newly-increased record is not Send first;Wherein, the comparison information includes:Terminal address, server address;
Packet encapsulation module, the judged result for sending judge module first according to, is never to send first Newly-increased record in extract application program numbering and heart time as brief information after, by the mark of the mobile terminal, Labeled as the newly-increased record for sending first, and the brief information extracted is encapsulated into the unified heartbeat data packets.
The embodiment of the present invention additionally provides a kind of heartbeat forwarding server, including:
Heartbeat data packets parsing module, for being parsed to the unified heartbeat data packets for receiving, exports analysis result;
Heartbeat message processing module, is located as follows for the heartbeat message to the application program in the analysis result Reason:Address information in the heartbeat message of the application program that will be parsed, to should application program number record to parsing In the corresponding heartbeat message cache table of mark of the mobile terminal for going out;The heart in the heartbeat message of the application program that will be parsed Hop cycle, to should application program number record it is basic to the application program corresponding with the mark of the mobile terminal for parsing In information table;Using the heart time in the heartbeat message of the application program for parsing, in the renewal Application Status table To should application program number record time, and to should the number record of the application program application program state be Line;
Brief information processing module, is located as follows for the brief information to the application program in the analysis result Reason:Using the heart time in the brief information of the application program for parsing, update in the Application Status table to should The time of the number record of application program, and to should the state of the number record of the application program application program be online;
State update module, for each application program for not being updated the time in the Application Status table Numbering, obtains and updates the time with the maximum rating of the numbering corresponding record of the application program, and judging and the application program Numbering corresponding record time and current time difference more than the maximum rating renewal time for obtaining after, will be to that should apply The status modifier of the application program of the number record of program is offline;
Heartbeat message sending module, is online application program for each state in the Application Status table, from Row sends the heartbeat message of the application program according to the heart beat cycle of the application program.
In technical scheme, last heartbeat is sent week by mobile terminal when each heartbeat sends the cycle and reaches The heartbeat message that each application program sends in phase is encapsulated as unifying heartbeat data packets, will be encapsulated by terminal wireless baseband module The centripetal forwarding server of jumping of unified heartbeat data packets is transmitted.After heartbeat forwarding server receives unified heartbeat data packets, The state of each application program in application routine status table is updated;And be for each state in Application Status table Online application program, voluntarily the heart beat cycle according to the application program send the heartbeat message of the application program.Due to movement Terminal only needs to, when the heartbeat of the fixation for setting sends the cycle and reaches, call terminal wireless baseband module to carry out heartbeat message Send, it is to avoid to frequently calling for terminal wireless baseband module, so that, radio channel resource can be saved, mobile terminal is reduced Energy consumption.
Brief description of the drawings
Fig. 1 sends the Organization Chart of system for the heartbeat message of prior art;
Fig. 2 sends the Organization Chart of system for the heartbeat message of the embodiment of the present invention;
Fig. 3 is the flow chart of the heartbeat message sending method of the embodiment of the present invention;
Fig. 4 is the schematic diagram of the content in the unified heartbeat data packets of the embodiment of the present invention;
Fig. 5 is the internal structure block diagram of the mobile terminal of the embodiment of the present invention;
Fig. 6 is the internal structure block diagram of the heartbeat forwarding server of the embodiment of the present invention.
Specific embodiment
To make the objects, technical solutions and advantages of the present invention become more apparent, referring to the drawings and preferred reality is enumerated Example is applied, the present invention is described in more detail.However, it is necessary to explanation, many details listed in specification are only to be The reader is set to have a thorough explanation to one or more aspects of the invention, can also even without these specific details Realize the aspects of the invention.
The term such as " module " used in this application, " system " is intended to include the entity related to computer, for example but does not limit In hardware, firmware, combination thereof, software or executory software.For example, module can be, it is not limited to:Treatment Process, processor, object, executable program, the thread for performing, program and/or the computer run on device.For example, count The application program and this computing device run in calculation equipment can be modules.One or more modules may be located at executory In one process and/or thread.
Main thought of the invention is heartbeat forwarding server to be set between mobile terminal and application server, and set Put mobile terminal and call terminal wireless baseband module according to a fixed heartbeat transmission cycle.So, mobile terminal is by one The heartbeat message that different application (i.e. web server application) sends in the heartbeat transmission cycle carries out uniform packing, next When heartbeat sends cycle arrival, call terminal wireless baseband module that the heartbeat message after packing is sent into heartbeat forwarding service Device, so as to avoid frequently calling to terminal wireless baseband module;Heartbeat forwarding server is according to application program in wire State, voluntarily heart beat cycle according to application program send the heartbeat message of application program.Because mobile terminal only needs to setting Fixation heartbeat send the cycle reach when, call terminal wireless baseband module to carry out the transmission of heartbeat message.Due to that can keep away Exempt from frequently calling to terminal wireless baseband module, so as to save radio channel resource, reduce mobile terminal energy consumption.
The technical scheme that the invention will now be described in detail with reference to the accompanying drawings.
A kind of heartbeat message provided in an embodiment of the present invention send system, its framework as shown in Fig. 2 including:Mobile terminal 201st, heartbeat forwarding server 202.
The multiple application programs for needing to send heartbeat message can be run in mobile terminal 201;Mobile terminal 201 is used for every When individual heartbeat sends cycle arrival, the heartbeat message that each application program in the last heartbeat transmission cycle sends is encapsulated as unifying the heart Packet is jumped, calls terminal wireless baseband module to send the centripetal forwarding server 202 of jumping of unified heartbeat data packets.Specifically, Mobile terminal 201 can be mobile phone, panel computer etc..
Heartbeat forwarding server 202 receives the heartbeat data packets that mobile terminal 201 sends, and therefrom parses mobile terminal After 201 mark, and the information of each application program, the application journey corresponding with the mark of the mobile terminal for parsing is found out Sequence state table, information according to each application program for parsing to application routine status table in the state of each application program carry out Update;And for each state in Application Status table be online application program, voluntarily according to the heartbeat of the application program Cycle sends the heartbeat message of the application program.Specifically, as shown in Fig. 2 heartbeat forwarding server 202 is by the heart of application program Hop-information is sent to the corresponding apps server 203 of the application program;For example, the heartbeat message of QQ application programs is sent To QQ application servers, the heartbeat message of microblogging application program is sent to microblogging application server.
System, the flow of the heartbeat message sending method of the embodiment of the present invention, such as Fig. 3 are sent based on above-mentioned heartbeat message It is shown, specifically include following steps:
S301:Mobile terminal 201 when each heartbeat sends the cycle and reaches, according to respectively being applied in the last heartbeat transmission cycle The heartbeat message that program sends, the unified heartbeat data packets of encapsulation.
Specifically, mobile terminal 201 each heartbeat send the cycle reach when, in the last heartbeat transmission cycle each The heartbeat message that application program sends, by the heartbeat message to should application program number record to local heartbeat message number Recorded as newly-increased according in storehouse;Wherein, the heartbeat message that application program sends includes:Heart time, terminal address, server ground Location, the heart beat cycle of the application program;For each newly-increased record, the numbering and ratio of application program in the newly-increased record are obtained After information, search heartbeat message database in previous bar to should application program number record heartbeat message;If newly-increased Comparison information in record is different from the comparison information in the heartbeat message for finding out, then be to send out first by the newly-increased recording mark Send;It is not marked with the newly-increased record for sending first extracting the numbering and heart time of application program as briefly letter from each After breath, by the mark of mobile terminal 201, labeled as the newly-increased record for sending first, and the brief information extracted is encapsulated into system In one heartbeat data packets.Comparison information includes terminal address, server address.
In fact, for different application programs, the heartbeat message that application program sends can also include application program Some specific data;For example, for QQ application programs, these specific data can be QQ numbers, QQ version numbers etc..Correspondingly, Comparison information can also include some other information, for example, the QQ numbers of QQ application programs, QQ version numbers etc.;So, should by QQ With the terminal address in the newly-increased record of program, server address, QQ numbers, QQ version numbers etc., respectively with heartbeat message data Terminal address, server address, QQ numbers, QQ version numbers in storehouse in the heartbeat message of previous bar QQ application programs etc. are compared It is right, if all same such as terminal address, server address, QQ numbers, QQ version numbers for comparing, it is determined that what the application program sent Heartbeat message is not to send first;Otherwise, it determines the heartbeat message that the application program sends is to send first, and this is applied into journey The newly-increased recording mark of sequence is to send first.
For example, Fig. 4 shows the schematic diagram of the content in packaged unified heartbeat data packets.
S302:The unified heartbeat data packets for encapsulating are redirected hair by mobile terminal 201 by the way that terminal wireless baseband module is centripetal Server 202 sends.
Specifically, mobile terminal 201 calls terminal wireless baseband module, and the unified heartbeat data packets that will be encapsulated pass through terminal The centripetal forwarding server 202 of jumping of radio base band module sends.
S303:After heartbeat forwarding server 202 receives the unified heartbeat data packets of the transmission of mobile terminal 201, therefrom solve Separate out mobile terminal mark, and each application program information.
Specifically, the information of each application program for parsing can include:The heartbeat message of application program, application program Brief information.
S304:Heartbeat forwarding server 202 finds out the application journey corresponding with the mark of the mobile terminal 201 for parsing After sequence state table, the state of information according to each application program for parsing to each application program in the Application Status table It is updated.
Specifically, for each mobile terminal, there is the Application Status table corresponding with the mark of the mobile terminal, Can also there are the heartbeat message cache table corresponding with the mark of mobile terminal, application program Basic Information Table.
If parsing application program in the unified heartbeat data packets that heartbeat forwarding server 202 sends from mobile terminal 201 Heartbeat message, then the address information in the heartbeat message of the application program that will be parsed, to should application program numbering note In recording the heartbeat message cache table corresponding with the mark of the mobile terminal for parsing;The heartbeat of the application program that will be parsed Heart beat cycle in information, to should application program number record to it is corresponding with the mark of the mobile terminal for parsing should With in program Basic Information Table;Using the heart time in the heartbeat message of the application program for parsing, update and parse In the corresponding Application Status table of mark of mobile terminal to should application program number record time, and to should The state of the number record of the application program application program is online.Address information is specially terminal address and server address.
If parsing application program in the unified heartbeat data packets that heartbeat forwarding server 202 sends from mobile terminal 201 Brief information, then using the heart time in the brief information of the application program for parsing, update and the mobile end for parsing In the corresponding Application Status table of mark at end to should application program number record time, and to journey should be applied The state of the number record of the sequence application program is online.
Afterwards, heartbeat forwarding server 202 is not for being updated each application program of time in Application Status table Numbering, obtain the maximum rating renewal time with the numbering corresponding record of the application program, and judging to apply journey with this After maximum rating renewal time of the time of the numbering corresponding record of sequence with the difference of current time more than acquisition, will be to that should answer Status modifier with the application program of the number record of program is offline;If additionally, judging the numbering with the application program The maximum rating that the time of corresponding record is not more than acquisition with the difference of current time updates the time, then do not make any treatment.
In fact, being directed to each mobile terminal, there is the Application Status table corresponding with the mark of the mobile terminal, Can also there is heartbeat message cache table and the application program Basic Information Table corresponding with the mark of mobile terminal.
Afterwards, heartbeat forwarding server 202 is for the application program corresponding with the mark of the mobile terminal 201 for parsing State is each online application program in state table, and voluntarily the heart beat cycle according to the application program sends the application program Heartbeat message.Specifically, heartbeat forwarding server 202 is that each online applies journey for state in Application Status table Sequence, voluntarily the heart beat cycle according to the application program is to the application program corresponding transmission of application server 203 application program Heartbeat message;It is not each application program of online (offline) for state in Application Status table, no longer applies this The heartbeat message of program is sent to the corresponding application server of the application program, and signaling storm generation can be reduced to a certain extent Possibility.
The internal structure block diagram of above-mentioned mobile terminal 201, as shown in figure 5, including:Heartbeat message logging modle 501, head It is secondary to send judge module 502 and packet encapsulation module 503.
Heartbeat message logging modle 501 is used to, when each heartbeat sends the cycle and reaches, the cycle was sent for last heartbeat The heartbeat message that interior each application program sends, by the heartbeat message to should application program number record to local heartbeat As newly-increased record in information database;Wherein, the heartbeat message that application program sends includes:Heart time, terminal address, clothes Business device address, the heart beat cycle of the application program.
In sending judge module 502 first and being used to store heartbeat message database for heartbeat message logging modle 502 Each newly-increased record, after obtaining the numbering and comparison information of application program in the newly-increased record, search heartbeat message data In storehouse previous bar to should application program number record heartbeat message;If comparison information in newly-increased record with find out Comparison information in heartbeat message is different, then judge that this is increased newly and be recorded as sending first;Otherwise, judge that the newly-increased record is not first Secondary transmission.Wherein, comparison information includes terminal address, server address.
Packet encapsulation module 503 is used for according to the judged result for sending judge module 502 first, is never to send first Newly-increased record in extract application program numbering and heart time as brief information after, by the mark of the mobile terminal, Labeled as the newly-increased record for sending first, and the brief information extracted is encapsulated into unified heartbeat data packets.
The internal structure block diagram of above-mentioned heartbeat forwarding server 202, as shown in fig. 6, including:Heartbeat data Packet analyzing mould Block 601, heartbeat message processing module 602, brief information processing module 603, state update module 604 and heartbeat message send mould Block 605.
Heartbeat data packets parsing module 601 is used to parse the unified heartbeat data packets for receiving, and exports analysis result.
The application that heartbeat message processing module 602 is used in the analysis result to the output of heartbeat data packets parsing module 601 The heartbeat message of program is handled as follows:Address information in the heartbeat message of the application program that will be parsed, to that should answer With in the number record of program to the heartbeat message cache table corresponding with the mark of the mobile terminal for parsing;By what is parsed Heart beat cycle in the heartbeat message of application program, to should application program number record to the mobile terminal for parsing In the corresponding application program Basic Information Table of mark;Using the heart time in the heartbeat message of the application program for parsing, Update Application Status table in should application program number record time, and to should application program number record The state of the application program is online.
The application that brief information processing module 603 is used in the analysis result to the output of heartbeat data packets parsing module 601 The brief information of program is handled as follows:Using the heart time in the brief information of the application program for parsing, updating should With in routine status table to should application program number record time, and to should the number record of the application program application The state of program is online.
State update module 604 is used for the volume for not being updated each application program of time in Application Status table Number, obtain and update the time with the maximum rating of the numbering corresponding record of the application program, and judging and the application program After maximum rating renewal time of the time of numbering corresponding record with the difference of current time more than acquisition, will be to journey should be applied The status modifier of the application program of the number record of sequence is offline.
It is online application program that heartbeat message sending module 605 is used for for each state in Application Status table, Voluntarily the heart beat cycle according to the application program sends the heartbeat message of the application program.
In technical scheme, last heartbeat is sent week by mobile terminal when each heartbeat sends the cycle and reaches The heartbeat message that each application program sends in phase is encapsulated as unifying heartbeat data packets, will be encapsulated by terminal wireless baseband module The centripetal forwarding server of jumping of unified heartbeat data packets is transmitted.After heartbeat forwarding server receives unified heartbeat data packets, The state of each application program in application routine status table is updated;And be for each state in Application Status table Online application program, voluntarily the heart beat cycle according to the application program send the heartbeat message of the application program.Due to movement Terminal only needs to, when the heartbeat of the fixation for setting sends the cycle and reaches, call terminal wireless baseband module to carry out heartbeat message Send, it is to avoid to frequently calling for terminal wireless baseband module, so that, radio channel resource can be saved, mobile terminal is reduced Energy consumption.
One of ordinary skill in the art will appreciate that all or part of step in realizing above-described embodiment method can be The hardware of correlation is instructed to complete by program, the program can be stored in computer read/write memory medium, such as:ROM/ RAM, magnetic disc, CD etc..
The above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications also should It is considered as protection scope of the present invention.

Claims (8)

1. a kind of heartbeat message sending method, it is characterised in that including:
Mobile terminal when each heartbeat sends the cycle and reaches, according to the heart that each application program in the last heartbeat transmission cycle sends Hop-information, is transmitted after the unified heartbeat data packets of encapsulation by the centripetal forwarding server of jumping of terminal wireless baseband module;
After the heartbeat forwarding server receives the unified heartbeat data packets, the mark of mobile terminal is therefrom parsed, with And the information of each application program;After determining the Application Status table corresponding with the mark of the mobile terminal for parsing, root The state of each application program in the Application Status table is updated according to the information of each application program for parsing;And It is online application program for each state in the Application Status table, voluntarily according to the heart beat cycle of the application program Send the heartbeat message of the application program;
Wherein, the heartbeat message sent according to each application program in the last heartbeat transmission cycle, the unified heartbeat data of encapsulation Bag, specifically includes:
For the heartbeat message that each application program in the last heartbeat transmission cycle sends, by the heartbeat message to journey should be applied The number record of sequence is recorded to conduct in local heartbeat message database is newly-increased;Wherein, the heartbeat that the application program sends Information includes:Heart time, terminal address, server address, the heart beat cycle of the application program;
For each newly-increased record, after obtaining the numbering and comparison information of application program in the newly-increased record, the heart is searched In hop-information database previous bar to should application program number record heartbeat message;If the comparison information in newly-increased record It is different from the comparison information in the heartbeat message for finding out, then it is to send first by the newly-increased recording mark;Wherein, the comparison Information includes:Terminal address, server address;
The numbering and heart time of extracting application program are not marked with the newly-increased record for sending first as brief from each After information, by the mark of the mobile terminal, labeled as the newly-increased record for sending first, and the brief information extracted is encapsulated into In the unified heartbeat data packets.
2. the method for claim 1, it is characterised in that the information of each application program that the basis is parsed is to described The state of each application program in Application Status table is updated, and specifically includes:
If the heartbeat forwarding server parses the heartbeat message of application program from the unified heartbeat data packets, will solution Address information in the heartbeat message of the application program of precipitation, to should application program number record to the movement for parsing In the corresponding heartbeat message cache table of mark of terminal;Heart beat cycle in the heartbeat message of the application program that will be parsed, To should application program number record to the application program Basic Information Table corresponding with the mark of the mobile terminal for parsing In;Using the heart time in the heartbeat message of the application program for parsing, update in the Application Status table to should The time of the number record of application program, and to should the state of the number record of the application program application program be online;
If the heartbeat forwarding server parses the brief information of application program from the unified heartbeat data packets, use Heart time in the brief information of the application program for parsing, updates in the Application Status table to should application program Number record time, and to should the state of the number record of the application program application program be online;
The heartbeat forwarding server is not for being updated the volume of each application program of time in the Application Status table Number, obtain and update the time with the maximum rating of the numbering corresponding record of the application program, and judging and the application program After maximum rating renewal time of the time of numbering corresponding record with the difference of current time more than acquisition, will be to journey should be applied The status modifier of the application program of the number record of sequence is offline.
3. a kind of heartbeat message sends system, it is characterised in that including:
Mobile terminal, for when each heartbeat sends the cycle and reaches, according to each application program hair in the last heartbeat transmission cycle The heartbeat message for sending, is transmitted after the unified heartbeat data packets of encapsulation by terminal wireless baseband module, is specifically included:The shifting Dynamic terminal for each application program in the last heartbeat transmission cycle specifically for when each heartbeat sends the cycle and reaches, sending Heartbeat message, using the heartbeat message to should application program number record in local heartbeat message database as new Increase record;For each newly-increased record, after obtaining the numbering and comparison information of application program in the newly-increased record, search described In heartbeat message database previous bar to should application program number record heartbeat message;If the comparison letter in newly-increased record Cease different from the comparison information in the heartbeat message for finding out, be then to send first by the newly-increased recording mark;Do not have from each Labeled as in the newly-increased record for sending first extract application program numbering and heart time as brief information after, by the shifting Move the mark of terminal, be encapsulated into the unified beats labeled as the newly-increased record for sending first, and the brief information of extraction According in bag;Wherein, the heartbeat message that the application program sends includes:Heart time, terminal address, server address, should should With the heart beat cycle of program;The comparison information includes:Terminal address, server address;
Heartbeat forwarding server, after receiving the unified heartbeat data packets that the mobile terminal sends, therefrom parses shifting The mark of dynamic terminal, and each application program information;Determine the application corresponding with the mark of the mobile terminal for parsing After routine status table, the information according to each application program for parsing is to each application program in the Application Status table State is updated;And for each state in the Application Status table be online application program, voluntarily according to should The heartbeat message of the application program is sent with the heart beat cycle of program.
4. system as claimed in claim 3, it is characterised in that
If the heartbeat forwarding server from the unified heartbeat data packets for receiving specifically for parsing the heartbeat of application program Information, then the address information in the heartbeat message of the application program that will be parsed, to should application program number record to In the corresponding heartbeat message cache table of mark of the mobile terminal for parsing;In the heartbeat message of the application program that will be parsed Heart beat cycle, to should application program number record to the application program corresponding with the mark of the mobile terminal for parsing In Basic Information Table;Using the heart time in the heartbeat message of the application program for parsing, the Application Status are updated In table to should application program number record time, and to should the number record of the application program application program state For online;If parsing the brief information of application program from the unified heartbeat data packets, the application journey for parsing is used Heart time in the brief information of sequence, update in the Application Status table to should application program number record when Between, and to should the state of the number record of the application program application program be online;And the heartbeat forwarding server pair The numbering of each application program of time is not updated in the Application Status table, the numbering with the application program is obtained The maximum rating of corresponding record updates the time, and judge with time of the numbering corresponding record of the application program with it is current when Between difference more than the maximum rating renewal time for obtaining after, by should application program number record the application program Status modifier is offline;Afterwards, it is online application program for each state in the Application Status table, voluntarily basis The heart beat cycle of the application program sends the heartbeat message of the application program.
5. system as claimed in claim 4, it is characterised in that the mobile terminal is specifically included:
Heartbeat message logging modle, for each heartbeat send the cycle reach when, in the last heartbeat transmission cycle each The heartbeat message that application program sends, by the heartbeat message to should application program number record to local heartbeat message number Recorded as newly-increased according in storehouse;Wherein, the heartbeat message that the application program sends includes:Heart time, terminal address, service Device address, the heart beat cycle of the application program;
Judge module is sent first, for for heartbeat message logging modle storage to each in heartbeat message database Newly-increased record, after obtaining the numbering and comparison information of application program in the newly-increased record, searches the heartbeat message database In previous bar to should application program number record heartbeat message;If comparison information and the heart for finding out in newly-increased record Comparison information in hop-information is different, then judge that this is increased newly and be recorded as sending first;Otherwise, judge that the newly-increased record is not first Send;Wherein, the comparison information includes:Terminal address, server address;
Packet encapsulation module, is never send first new for the judged result according to the judge module of transmission first After increasing numbering and heart time that application program is extracted in recording as brief information, by the mark of the mobile terminal, mark It is the newly-increased record for sending first, and the brief information extracted is encapsulated into the unified heartbeat data packets.
6. system as claimed in claim 4, it is characterised in that the heartbeat forwarding server is specifically included:
Heartbeat data packets parsing module, for being parsed to the unified heartbeat data packets for receiving, exports analysis result;
Heartbeat message processing module, is handled as follows for the heartbeat message to the application program in the analysis result:Will Address information in the heartbeat message of the application program for parsing, to should application program number record to the shifting for parsing In the corresponding heartbeat message cache table of the mark of dynamic terminal;Heartbeat week in the heartbeat message of the application program that will be parsed Phase, to should application program number record to the application program essential information corresponding with the mark of the mobile terminal for parsing In table;Using the heart time in the heartbeat message of the application program for parsing, correspondence in the Application Status table is updated The time of the number record of the application program, and to should the state of the number record of the application program application program be online;
Brief information processing module, is handled as follows for the brief information to the application program in the analysis result:Make With the heart time in the brief information of the application program for parsing, to journey should be applied in the renewal Application Status table The time of the number record of sequence, and to should the state of the number record of the application program application program be online;
State update module, for the volume of each application program for not being updated the time in the Application Status table Number, obtain and update the time with the maximum rating of the numbering corresponding record of the application program, and judging and the application program After maximum rating renewal time of the time of numbering corresponding record with the difference of current time more than acquisition, will be to journey should be applied The status modifier of the application program of the number record of sequence is offline;
Heartbeat message sending module, is online application program for each state in the Application Status table, voluntarily root The heartbeat message of the application program is sent according to the heart beat cycle of the application program.
7. a kind of mobile terminal, it is characterised in that including:
Heartbeat message logging modle, for each heartbeat send the cycle reach when, in the last heartbeat transmission cycle each The heartbeat message that application program sends, by the heartbeat message to should application program number record to local heartbeat message number Recorded as newly-increased according in storehouse;Wherein, the heartbeat message that the application program sends includes:Heart time, terminal address, service Device address, the heart beat cycle of the application program;
Judge module is sent first, for for heartbeat message logging modle storage to each in heartbeat message database Newly-increased record, after obtaining the numbering and comparison information of application program in the newly-increased record, searches the heartbeat message database In previous bar to should application program number record heartbeat message;If comparison information and the heart for finding out in newly-increased record Comparison information in hop-information is different, then judge that this is increased newly and be recorded as sending first;Otherwise, judge that the newly-increased record is not first Send;Wherein, the comparison information includes:Terminal address, server address;
Packet encapsulation module, is never send first new for the judged result according to the judge module of transmission first After increasing numbering and heart time that application program is extracted in recording as brief information, by the mark of the mobile terminal, mark It is the newly-increased record for sending first, and the brief information extracted is encapsulated into unified heartbeat data packets.
8. a kind of heartbeat forwarding server, it is characterised in that including:
Heartbeat data packets parsing module, for being parsed to the unified heartbeat data packets for receiving, exports analysis result;
Heartbeat message processing module, is handled as follows for the heartbeat message to the application program in the analysis result:Will Address information in the heartbeat message of the application program for parsing, to should application program number record to the shifting for parsing In the corresponding heartbeat message cache table of the mark of dynamic terminal;Heartbeat week in the heartbeat message of the application program that will be parsed Phase, to should application program number record to the application program essential information corresponding with the mark of the mobile terminal for parsing In table;Using the heart time in the heartbeat message of the application program for parsing, correspondence in the Application Status table is updated The time of the number record of the application program, and to should the state of the number record of the application program application program be online;
Brief information processing module, is handled as follows for the brief information to the application program in the analysis result:Make With the heart time in the brief information of the application program for parsing, to journey should be applied in the renewal Application Status table The time of the number record of sequence, and to should the state of the number record of the application program application program be online;
State update module, for the volume of each application program for not being updated the time in the Application Status table Number, obtain and update the time with the maximum rating of the numbering corresponding record of the application program, and judging and the application program After maximum rating renewal time of the time of numbering corresponding record with the difference of current time more than acquisition, will be to journey should be applied The status modifier of the application program of the number record of sequence is offline;
Heartbeat message sending module, is online application program for each state in the Application Status table, voluntarily root The heartbeat message of the application program is sent according to the heart beat cycle of the application program.
CN201410302253.4A 2014-06-27 2014-06-27 Mobile terminal, heartbeat forwarding server and heartbeat message sending method and system Active CN104022922B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410302253.4A CN104022922B (en) 2014-06-27 2014-06-27 Mobile terminal, heartbeat forwarding server and heartbeat message sending method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410302253.4A CN104022922B (en) 2014-06-27 2014-06-27 Mobile terminal, heartbeat forwarding server and heartbeat message sending method and system

Publications (2)

Publication Number Publication Date
CN104022922A CN104022922A (en) 2014-09-03
CN104022922B true CN104022922B (en) 2017-06-13

Family

ID=51439503

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410302253.4A Active CN104022922B (en) 2014-06-27 2014-06-27 Mobile terminal, heartbeat forwarding server and heartbeat message sending method and system

Country Status (1)

Country Link
CN (1) CN104022922B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105577758B (en) * 2015-12-15 2019-06-07 金蝶软件(中国)有限公司 A kind of page heartbeat message processing method and client
CN105827697A (en) * 2016-03-14 2016-08-03 广州趣丸网络科技有限公司 User off-line detection method and user off-line detection system
CN108768763A (en) * 2018-05-04 2018-11-06 北京小米移动软件有限公司 Heartbeat message sending method and device
CN110891328B (en) * 2018-09-07 2022-04-12 华为技术有限公司 Method and mobile device for aligning wake-up
CN109450734A (en) * 2018-11-27 2019-03-08 四川长虹电器股份有限公司 Zigbee coordinator heartbeat management method
CN109711779A (en) * 2018-12-26 2019-05-03 广东嘉腾机器人自动化有限公司 A kind of order allocation method and storage device and order distribution system
CN112953786B (en) * 2019-12-11 2022-09-16 中国电信股份有限公司 Information processing method, device, system and computer readable storage medium
CN111405331B (en) * 2020-03-27 2022-04-01 海信视像科技股份有限公司 Bluetooth Mesh device state updating method and display device
CN113411237B (en) * 2021-08-18 2021-11-30 成都丰硕智能数字科技有限公司 Method, storage medium and system for detecting terminal state with low delay
CN114390453B (en) * 2022-02-09 2023-09-08 福建天泉教育科技有限公司 Message pushing optimization method and terminal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102572939A (en) * 2011-01-04 2012-07-11 中国移动通信有限公司 Heartbeat packet sending method, device thereof and system thereof
CN102790776A (en) * 2012-08-03 2012-11-21 中国联合网络通信集团有限公司 Heartbeat connection normalizing processing method, terminal, server and communication system
CN103634409A (en) * 2013-12-12 2014-03-12 中国联合网络通信集团有限公司 Method and system for realizing always-online internet application

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6804232B1 (en) * 2000-03-27 2004-10-12 Bbnt Solutions Llc Personal area network with automatic attachment and detachment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102572939A (en) * 2011-01-04 2012-07-11 中国移动通信有限公司 Heartbeat packet sending method, device thereof and system thereof
CN102790776A (en) * 2012-08-03 2012-11-21 中国联合网络通信集团有限公司 Heartbeat connection normalizing processing method, terminal, server and communication system
CN103634409A (en) * 2013-12-12 2014-03-12 中国联合网络通信集团有限公司 Method and system for realizing always-online internet application

Also Published As

Publication number Publication date
CN104022922A (en) 2014-09-03

Similar Documents

Publication Publication Date Title
CN104022922B (en) Mobile terminal, heartbeat forwarding server and heartbeat message sending method and system
US10831641B2 (en) Method and apparatus for determining a performance impact by a software upgrade of a mobile user endpoint device
CN103152374B (en) Know the method and apparatus of terminal presence
CN102404858B (en) Radio resource optimizing method, device and system
CN104581785B (en) wireless network test method, test device and mobile terminal
US8761757B2 (en) Identification of communication devices in telecommunication networks
US20130166738A1 (en) Web Page Download Time Analysis
CN109684052B (en) Transaction analysis method, device, equipment and storage medium
US20150113131A1 (en) Scheduling A Service Event In A Network
CN110647531A (en) Data synchronization method, device, equipment and computer readable storage medium
CN112584422B (en) Method and device for acquiring performance of 5G terminal
CN107678918A (en) The OSD heartbeat mechanisms method to set up and device of a kind of distributed file system
CN101662389B (en) Method for carrying out statistics on performance data and device applying same
CN108055166B (en) Nested application layer protocol state machine extraction system and extraction method thereof
CN110149299A (en) A kind of method for optimizing video, device and system, terminal and the network equipment
CN110061931A (en) Clustering method, device, system and the computer storage medium of industry control agreement
US11075989B2 (en) Cellular network hierarchical operational data storage
CN108039956A (en) Using monitoring method, system and computer-readable recording medium
CN104883705B (en) A kind of the problem of data service is complained localization method and device
CN103517292A (en) Mobile terminal information reporting method and apparatus
CN108460044B (en) Data processing method and device
CN111315026B (en) Channel selection method, device, gateway and computer readable storage medium
CN106254534B (en) Distributed type assemblies monitoring agent and method based on mixed architecture
CN107862040A (en) The update method of data, device and a kind of cluster in a kind of caching of application example
CN107947974A (en) A kind of network key chain circuit detecting method of cloud platform business

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant