CN104954199B - A kind of information processing method and electronic equipment - Google Patents

A kind of information processing method and electronic equipment Download PDF

Info

Publication number
CN104954199B
CN104954199B CN201510319408.XA CN201510319408A CN104954199B CN 104954199 B CN104954199 B CN 104954199B CN 201510319408 A CN201510319408 A CN 201510319408A CN 104954199 B CN104954199 B CN 104954199B
Authority
CN
China
Prior art keywords
electronic equipment
identifier
server
time
call duration
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
CN201510319408.XA
Other languages
Chinese (zh)
Other versions
CN104954199A (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201510319408.XA priority Critical patent/CN104954199B/en
Publication of CN104954199A publication Critical patent/CN104954199A/en
Application granted granted Critical
Publication of CN104954199B publication Critical patent/CN104954199B/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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route

Abstract

The embodiment of the present application provides a kind of processing method and electronic equipment, realizes the technical effect of the long connection of discovery in time.The method is applied to electronic equipment, comprising: the first identifier of the electronic equipment and the second identifier of server is obtained from the first data packet, first data packet is the data packet that the electronic equipment and the server interact;Based on the first identifier and the second identifier, the last call duration time between the electronic equipment and the server is obtained;Judge whether the interval time between the last call duration time and current time is more than first threshold;When the interval time being more than the first threshold, determine that the electronic equipment is in the long connection status with the server.

Description

A kind of information processing method and electronic equipment
Technical field
The present invention relates to electronic technology field more particularly to a kind of information processing methods and electronic equipment.
Background technique
Server can be established with electronic equipment in order to which message is pushed to client or electronic equipment in time and keep long company It connects.Long connection, which refers to, can continuously transmit multiple data packets in a connection.Such as user uses wechat on an electronic device When, electronic equipment will connect with wechat server and keep long connection.To, user can continue to chat with good friend, and In the state of not chatting, the new chat or other information that wechat server push comes still can receive.
However, for a long time under long connection status, it will bring very high power consumption.
In order to disconnect in time, electronic equipment can by the IP of certain server (agreement interconnected between network, Internet Protocol) address pipes off, and then controlling electronic devices can not service corresponding with blacklist IP address Device connection.But if the IP address of server occurs dynamic and adjusts, electronic equipment can not find that electronic equipment is built with server Long connection is stood, it is more difficult to disconnect long connection in time.
Summary of the invention
The embodiment of the present application provides a kind of electronic equipment, realizes the technical effect of the long connection of discovery in time.
On the one hand, this application provides a kind of information processing methods, are applied to electronic equipment, comprising:
The first identifier of the electronic equipment and the second identifier of server, first number are obtained from the first data packet It is the data packet that the electronic equipment and the server interact according to packet;
Based on the first identifier and the second identifier, obtain last between the electronic equipment and the server Call duration time;
Judge whether the interval time between the last call duration time and current time is more than first threshold;
When the interval time being more than the first threshold, determine that the electronic equipment is in the length with the server Connection status.
Optionally, the last call duration time between the electronic equipment and the server is obtained, comprising:
Judge to whether there is and the first identifier and the second identifier in the communications database of the electronic equipment Matched call duration time obtains the first judging result, wherein the electronic equipment is included at least in the communications database logical Mark and call duration time during letter;
When first judging result, which is, is, using the matched call duration time as the last call duration time.
Optionally, judge the electronic equipment store communications database in the presence or absence of with the first identifier and The matched call duration time of second identifier, before obtaining the first judging result, the method also includes:
Determine that first data packet is the reception packet that the server is sent to the electronic equipment;Or
Determine that first data packet is the transmission packet that the electronic equipment is sent to the server, and the transmission is wrapped It is not used to request to establish the first of connection with the server for the electronic equipment and sends packet.
Optionally, the method also includes:
When it is the first transmission packet that first judging result, which is no and/or described first data packet, described logical The first identifier, the second identifier and current time are recorded in telecommunications databases, wherein using current time as the electricity The call duration time of sub- equipment and the server.
Optionally, after determining that the electronic equipment is in the long connection status with the server, the method is also Include:
It controls the electronic equipment and is switched to notconnect state from the long connection status.
Optionally, judging whether the interval time between the last call duration time and current time is more than first threshold Later, the method also includes:
When the interval time being less than the first threshold, the last call duration time is updated to current time.
Optionally, the first identifier include between the network of the electronic equipment protocol address that interconnects and port compile Number, the second identifier includes the protocol address and port numbering that interconnect between the network of the server.
On the other hand, this application provides a kind of electronic equipment, comprising:
First obtains unit, for obtained from the first data packet the electronic equipment first identifier and server Two marks, first data packet are the data packet that the electronic equipment and the server interact;
Second obtaining unit obtains the electronic equipment and institute for being based on the first identifier and the second identifier State the last call duration time between server;
First judging unit, for judge the interval time between the last call duration time and current time whether be more than First threshold;
First determination unit, for determining at the electronic equipment when the interval time being more than the first threshold In the long connection status with the server.
Optionally, second obtaining unit is used to judge whether deposit in the communications database that the electronic equipment stores With the first identifier and the matched call duration time of the second identifier, obtain the first judging result, wherein the communication number According in library include at least mark and call duration time of the electronic equipment in communication process;It is in first judging result When being, using the matched call duration time as the last call duration time.
Optionally, the electronic equipment further include:
Second determination unit, for judge the electronic equipment store communications database in the presence or absence of with it is described First identifier and the matched call duration time of the second identifier determine first data packet before obtaining the first judging result The reception packet of the electronic equipment is sent to for the server;Or determine first data packet for electronic equipment hair The transmission packet of the server is given, and electronic equipment described in the transmission Bao Buwei connects for requesting to establish with the server First connect sends packet.
Optionally, the electronic equipment further include:
Recording unit is first transmission for being no and/or described first data packet in first judging result Bao Shi records the first identifier, the second identifier and current time, wherein will be current in the communications database Call duration time of the time as the electronic equipment and the server.
Optionally, the electronic equipment further include:
Control unit, for controlling after determining that the electronic equipment is in the long connection status with the server The electronic equipment is switched to notconnect state from the long connection status.
Optionally, the electronic equipment further include:
Updating unit, for judging the interval time between the last call duration time and current time whether more than After one threshold value, when the interval time being less than the first threshold, when the last call duration time is updated to current Between.
Optionally, the first identifier include between the network of the electronic equipment protocol address that interconnects and port compile Number, the second identifier includes the protocol address and port numbering that interconnect between the network of the server.
Said one or multiple technical solutions in the embodiment of the present application at least have following one or more technology effects Fruit:
In technical scheme, the first identifier and server of the electronic equipment are obtained from the first data packet Second identifier, first data packet are the data packet that the electronic equipment and the server interact;Based on described One mark and the second identifier, obtain the last call duration time between the electronic equipment and the server;Described in judgement Whether the interval time between last call duration time and current time is more than first threshold;It is more than described the when the interval time When one threshold value, determine that the electronic equipment is in the long connection status with the server.So the electricity in the embodiment of the present application Sub- equipment obtains the last communication between electronic equipment and server based on the first identifier of itself and the second identifier of server Time, and then according to the interval time between last call duration time and current time, when determining that interval time is more than first threshold There is long connection between electronic equipment and server.So for server corresponding to second identifier in the embodiment of the present application It determines that electronic equipment is in long connection status, rather than is directed to a certain specific identifier.Even if the second identifier of server is sent Variation, the technical solution of the application still are able to find long connection in time.Solves the mark in the prior art due to server Know variation, adjusted as dynamic occurs for IP address, and causes electronic equipment that can not find to establish long connection with the server in time The technical issues of, realize the technical effect of the long connection of discovery in time.
Detailed description of the invention
Fig. 1 is an information processing method flow chart in the embodiment of the present application;
Fig. 2 is another method flow chart in the embodiment of the present application;
Fig. 3 is the electronic devices structure schematic diagram in the embodiment of the present application.
Specific embodiment
The embodiment of the present application provides a kind of electronic equipment, realizes the technical effect of the long connection of discovery in time.
In order to solve the above-mentioned technical problem, technical solution general thought provided by the present application is as follows:
In technical scheme, the first identifier and server of the electronic equipment are obtained from the first data packet Second identifier, first data packet are the data packet that the electronic equipment and the server interact;Based on described One mark and the second identifier, obtain the last call duration time between the electronic equipment and the server;Described in judgement Whether the interval time between last call duration time and current time is more than first threshold;It is more than described the when the interval time When one threshold value, determine that the electronic equipment is in the long connection status with the server.So the electricity in the embodiment of the present application Sub- equipment obtains the last communication between electronic equipment and server based on the first identifier of itself and the second identifier of server Time, and then according to the interval time between last call duration time and current time, when determining that interval time is more than first threshold There is long connection between electronic equipment and server.So for server corresponding to second identifier in the embodiment of the present application It determines that electronic equipment is in long connection status, rather than is directed to a certain specific identifier.Even if the second identifier of server is sent Variation, the technical solution of the application still are able to find long connection in time.Solves the mark in the prior art due to server Know variation, adjusted as dynamic occurs for IP address, and causes electronic equipment that can not find to establish long connection with the server in time The technical issues of, realize the technical effect of the long connection of discovery in time.
Technical solution of the present invention is described in detail below by attached drawing and specific embodiment, it should be understood that the application Specific features in embodiment and embodiment are the detailed description to technical scheme, rather than to present techniques The restriction of scheme, in the absence of conflict, the technical characteristic in the embodiment of the present application and embodiment can be combined with each other.
The terms "and/or", only a kind of incidence relation for describing affiliated partner, indicates that there may be three kinds of passes System, for example, A and/or B, can indicate: individualism A exists simultaneously A and B, these three situations of individualism B.In addition, herein Middle character "/" typicallys represent the relationship that forward-backward correlation object is a kind of "or".
The application first aspect provides a kind of information processing method, as shown in Figure 1, this method comprises:
S101: the first identifier of the electronic equipment and the second identifier of server are obtained from the first data packet.
S102: it is based on the first identifier and the second identifier, is obtained between the electronic equipment and the server Last call duration time.
S103: judge whether the interval time between the last call duration time and current time is more than first threshold.
S104: when the interval time being more than the first threshold, determine that the electronic equipment is in and the service The long connection status of device.
Specifically, electronic equipment in the operating condition, between the internal module of electronic equipment and electronic equipment and its Multiple data packets can be sent between his equipment to carry out to interact, and the first data packet is that electronic equipment and server interact Data packet.The first data packet in the embodiment of the present application can be the data packet of transmission communication data, transmit the number of control signaling It can also be the data packet etc. of maintenance heartbeat, the application is not particularly limited according to packet.Since the first data packet is used for electronic equipment It is interactive with server, therefore the second identifier of the first identifier and server in the first data packet including electronic equipment.
Wherein, the mark in the embodiment of the present application is for the main body in unique identification one communication.Specifically, the first mark Know and be used for unique identification electronic equipment, second identifier is used for unique identification server.Mark can include but is not limited to main body IP address, port numbering, MAC Address etc..In the embodiment of the present application, first identifier includes the IP address of electronic equipment, and With the port numbering of the port of server communication.During specific implementation, first identifier can also include the MAC of electronic equipment (media access control, Media Access Control or Medium Access Control) address, user name or identifying code Deng.And second identifier includes the IP address of server, and the port numbering of port communicated with electronic equipment.It is implementing In the process, second identifier can also include the MAC Address of server, domain name or identifying code etc..The application fields it is common Technical staff can be according to being actually configured, and the application is not particularly limited.
Referring to FIG. 2, before S101, first identifier and second identifier are needed first to obtain the first data packet, that is, are executed S100: the first data packet is obtained.In the embodiment of the present application, electronic equipment can be by grabbing the first data packet, or duplication The copy of the first data packet is obtained, to obtain the first data packet, the application is not particularly limited.
In S101, electronic equipment parses the first data packet, and then obtains first identifier and second from the first data packet Mark.Then, it executes S102: being based on the first identifier and the second identifier, obtain the electronic equipment and the service Last call duration time between device.
Further, after obtaining last call duration time, when obtaining last communication according to last call duration time and current time Between interval time between current time.Current time is specially subtracted into the difference of last call duration time as when interval Between.As an example it is assumed that last call duration time is 00:13:02:33, i.e., 13 points two seconds three or three when 1, current time 00: 15:02:00, i.e., when 1 15 points two seconds it is whole.15:02:00 subtract 13:02:33 difference be 1:59:27, i.e., one point 59 Second two or seven.So interval time is exactly 1:59:27.
Next, judging whether interval time is more than first threshold in S103.Specifically, in the embodiment of the present application One threshold value be 30 seconds to 5 minutes between arbitrary value, such as 40 seconds, 1 point 50 seconds etc..The application those of ordinary skill in the art It can be according to being actually configured, the application is not particularly limited.
Due to still being interacted by the first data packet between current time, electronic equipment and server, table It is bright in last call duration time between current time, connection status is between electronic equipment and server.So, when interval Between be more than first threshold when, then show that the time connected between electronic equipment and server is longer, so in S104 determine electricity Sub- equipment is in the long connection status with server.
Specifically, in the embodiment of the present application, S102 may include steps of:
S1021: judge in the communications database of the electronic equipment with the presence or absence of with the first identifier and described the The two matched call duration times of mark, obtain the first judging result.Wherein, the electronics is included at least in the communications database to set Standby mark and call duration time in communication process;
S1022: when first judging result, which is, is, using the matched call duration time as when the last communication Between.
Specifically, electronic equipment maintenance has communications database.Communications database is set for storing electronic equipment with other Data and information in standby communication process.When communications database includes at least mark and communication of the electronic equipment in communication process Between, it including key, authentication information and can also execute instruction.The application those of ordinary skill in the art can basis It is actually configured, the application is not particularly limited.
Since communications database is safeguarded according to the communication process situation of electronic equipment, electronic equipment It needs first to judge to whether there is and first identifier and the matched communication data of second identifier in communications database.
Specifically, electronic equipment is using first identifier and second identifier as target.Each call duration time is read, and every Two marks corresponding to a call duration time.Then two more currently read identify whether to mark with first identifier and second Know consistent.If consistent, show that the corresponding communication data of currently read two marks is exactly to mark with first identifier and second Know matched call duration time, the first judging result is yes.If it is inconsistent, showing that currently read two marks are corresponding logical The letter time is not first identifier and the matched call duration time of second identifier, then reading next call duration time and two corresponding Mark.After reading whole call duration times, not with first identifier and the matched call duration time of second identifier, then first judges It as a result is no.
Optionally, before S1021, further includes:
Determine that first data packet is the reception packet that the server is sent to the electronic equipment;Or
Determine that first data packet is the transmission packet that the electronic equipment is sent to the server, and the transmission is wrapped It is not used to request to establish the first of connection with the server for the electronic equipment and sends packet.
Specifically, due to the data packet that the first data packet is electronic equipment and server interaction, to electronic equipment For, the first data packet may be the transmission packet that electronic equipment is sent to server, it is also possible to which server is sent to electronics and sets Standby reception packet.Further, when if to send packet be electronic equipment for requesting to establish connection with server, which is the One sends packet.So electronic equipment can first carry out S1011 before S1021: judging whether the first data packet is to receive packet. When the first data packet is to receive packet, S1021 is executed.And when the first data packet is to send packet, it further executes S1012: sentencing It is disconnected to send whether packet is the first transmission packet.
Electronic equipment parses the first data packet, and the first data packet of confirmation is specially to receive packet or send packet.When the first number It when according to packet to send packet, is further instructed according to included in data packet, determines and send whether packet is the first transmission packet.
Assuming that the first data packet of confirmation is to receive packet, or determine that the first data packet is to send packet, but the transmission packet is not Packet is sent for first.When the first data packet is to receive packet, since server would generally be in connection status with electronic equipment Middle transmit and receive to electronic equipment is wrapped, such as the data packet of returned data or maintains long connection based on electronic equipment requests Heartbeat packet, therefore electronic equipment can establish the connection moment just start recording in communications database before receiving the reception packet Call duration time.So executing S1021, and next first judging result will be when the first data packet is to receive packet It is.
Similarly, when the first data packet is transmission packet, and does not send packet for first, show before sending the transmission packet The electronic equipment device that succeeded and serviced establishes connection, so electronic equipment can just be sent to server not be the first transmission packet its He sends packet.So when the first data packet is to send packet, but when not sending packet for first, execute S1021, and next the One judging result will be yes.
When the first judging result, which is, is, electronic equipment will be with first identifier and the matched communication of second identifier in S1022 Last call duration time of the time as electronic equipment and server.
Optionally, in the embodiment of the present application, further includes:
S1023: the first identifier, the second identifier and current time are recorded in the communications database.
Specifically, when the first judging result is no, show that electronic equipment ergodic communication database is not found and the One mark and the matched call duration time of second identifier, in order to record subsequent communications process, electronic equipment will be in communications database First identifier, second identifier and current time are recorded, using current time as the call duration time of electronic equipment and server.And Current time is mapped with first identifier and second identifier in record, to indicate that the call duration time is corresponding as first identifier The call duration time communicated between electronic equipment and the corresponding server of second identifier.
Alternatively, sending packet to be electronic equipment establishing connection for request server due to first, then when the first data packet When sending packet for first, show that electronic equipment is not currently established connection with server and communicated, and then in communications database In would not also record and first identifier and the matched call duration time of second identifier.At this point, in order to mitigate facility load, electronics Equipment can not execute S1021: judge in the communications database of the electronic equipment with the presence or absence of with the first identifier and The matched call duration time of second identifier obtains the first judging result.Also, electronic equipment equally can be will be in communication data First identifier, second identifier and current time are recorded in library, so as to start recording and safeguard the logical of electronic equipment and server Believe the time.
Alternatively, electronic equipment can also execute S1021 and judge in the electronics when the first data packet is the first transmission packet It whether there is in the communications database of equipment and the first identifier and the matched call duration time of the second identifier, acquisition first Judging result.At this point, the first judging result is no.Electronic equipment will further be recorded in communications database first identifier, Second identifier and current time so as to start recording and safeguard the call duration time of electronic equipment and server.
In the embodiment of the present application, when judging that interval time is more than first threshold in S103, electronic equipment is in S104 Middle determining electronic equipment and server are in long connection status.Further, long connection between electronic equipment and server is being determined Later, in order to save the electricity of electronic equipment, further includes:
S105: the electronic equipment is controlled from the long connection status and is switched to notconnect state.
Specifically, electronic equipment can disconnect the connection with server, to switch to notconnect state.It can also will be electric The external connection of sub- equipment is closed, so that electronic equipment can not be connect with any other equipment, and then is switched to disconnected State.The application those of ordinary skill in the art can be according to being actually configured, and the application is not particularly limited.
And when interval time being less than first threshold, after S103, further includes:
S106: when the interval time being less than the first threshold, the last call duration time is updated to currently Time.
Specifically, when interval time being less than first threshold, show to connect between electronic equipment and server when Between it is shorter, do not need to disconnect.It further, will be last for the ease of the communication between follow-up management electronic equipment and server Call duration time is updated to current time.Such as above, it is assumed that first threshold is 2 minutes, interval time 1:59:27, It is less than first threshold every the time, then last communication time is updated to current time 00:15:02:00.
The application second aspect provides a kind of electronic equipment, as shown in Figure 3, comprising:
First obtains unit 301, for obtaining the first identifier and server of the electronic equipment from the first data packet Second identifier, first data packet is the data packet that the electronic equipment and the server interact;
Second obtaining unit 302, for be based on the first identifier and the second identifier, obtain the electronic equipment with Last call duration time between the server;
First judging unit 303, for whether judging the interval time between the last call duration time and current time More than first threshold;
First determination unit 304, for determining the electronic equipment when the interval time being more than the first threshold In the long connection status with the server.
Optionally, in the embodiment of the present application, the second obtaining unit 302 is used to judge to store in the electronic equipment logical It whether there is in telecommunications databases and the first identifier and the matched call duration time of the second identifier, acquisition the first judgement knot Fruit, wherein mark and call duration time of the electronic equipment in communication process are included at least in the communications database;? First judging result is when being, using the matched call duration time as the last call duration time.
Optionally, electronic equipment can also include:
Second determination unit, for judge the electronic equipment store communications database in the presence or absence of with it is described First identifier and the matched call duration time of the second identifier determine first data packet before obtaining the first judging result The reception packet of the electronic equipment is sent to for the server;Or determine first data packet for electronic equipment hair The transmission packet of the server is given, and electronic equipment described in the transmission Bao Buwei connects for requesting to establish with the server First connect sends packet.
Further, in the embodiment of the present application, electronic equipment further include:
Recording unit is first transmission for being no and/or described first data packet in first judging result Bao Shi records the first identifier, the second identifier and current time, wherein will be current in the communications database Call duration time of the time as the electronic equipment and the server.
Further, when the first determination unit 304 determines that electronic equipment is in the long connection status with server, electronics is set It is standby to include:
Control unit, for controlling after determining that the electronic equipment is in the long connection status with the server The electronic equipment is switched to notconnect state from the long connection status.
Alternatively, the electronic equipment in the embodiment of the present application further comprises:
Updating unit, for judging the interval time between the last call duration time and current time whether more than After one threshold value, when the interval time being less than the first threshold, when the last call duration time is updated to current Between.
In the embodiment of the present application, first identifier includes the protocol address that interconnects and end between the network of the electronic equipment Mouthful number, the second identifier includes the protocol address and port numbering that interconnect between the network of the server.
Said one or multiple technical solutions in the embodiment of the present application at least have following one or more technology effects Fruit:
In technical scheme, the first identifier and server of the electronic equipment are obtained from the first data packet Second identifier, first data packet are the data packet that the electronic equipment and the server interact;Based on described One mark and the second identifier, obtain the last call duration time between the electronic equipment and the server;Described in judgement Whether the interval time between last call duration time and current time is more than first threshold;It is more than described the when the interval time When one threshold value, determine that the electronic equipment is in the long connection status with the server.So the electricity in the embodiment of the present application Sub- equipment obtains the last communication between electronic equipment and server based on the first identifier of itself and the second identifier of server Time, and then according to the interval time between last call duration time and current time, when determining that interval time is more than first threshold There is long connection between electronic equipment and server.So for server corresponding to second identifier in the embodiment of the present application It determines that electronic equipment is in long connection status, rather than is directed to a certain specific identifier.Even if the second identifier of server is sent Variation, the technical solution of the application still are able to find long connection in time.Solves the mark in the prior art due to server Know variation, adjusted as dynamic occurs for IP address, and causes electronic equipment that can not find to establish long connection with the server in time The technical issues of, realize the technical effect of the long connection of discovery in time.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Specifically, the corresponding computer program instructions of two kinds of information processing methods in the embodiment of the present application can be deposited It stores up on CD, hard disk, the storage mediums such as USB flash disk, when the computer corresponding with the first information processing method in storage medium Program instruction is read or is performed by an electronic equipment, includes the following steps:
The first identifier of the electronic equipment and the second identifier of server, first number are obtained from the first data packet It is the data packet that the electronic equipment and the server interact according to packet;
Based on the first identifier and the second identifier, obtain last between the electronic equipment and the server Call duration time;
Judge whether the interval time between the last call duration time and current time is more than first threshold;
When the interval time being more than the first threshold, determine that the electronic equipment is in the length with the server Connection status.
Optionally, what is stored in the storage medium obtains between the electronic equipment and the server most with step Call duration time afterwards, corresponding computer instruction specifically comprise the following steps: during being specifically performed
Judge to whether there is and the first identifier and the second identifier in the communications database of the electronic equipment Matched call duration time obtains the first judging result, wherein the electronic equipment is included at least in the communications database logical Mark and call duration time during letter;
When first judging result, which is, is, using the matched call duration time as the last call duration time.
Optionally, be also stored with other computer instruction in the storage medium, these computer instructions with step It is rapid: to judge to whether there is and the first identifier and the second identifier in the communications database that the electronic equipment stores The call duration time matched is performed before obtaining the first judging result, includes the following steps: when executed
Determine that first data packet is the reception packet that the server is sent to the electronic equipment;Or
Determine that first data packet is the transmission packet that the electronic equipment is sent to the server, and the transmission is wrapped It is not used to request to establish the first of connection with the server for the electronic equipment and sends packet.
Optionally, it is also stored with other computer instruction in the storage medium, when executed includes following step It is rapid:
When it is the first transmission packet that first judging result, which is no and/or described first data packet, described logical The first identifier, the second identifier and current time are recorded in telecommunications databases, wherein using current time as the electricity The call duration time of sub- equipment and the server.
Optionally, be also stored with other computer instruction in the storage medium, these computer instructions with step It is rapid: to determine and be performed after the electronic equipment is in the long connection status with the server, when executed include as follows Step:
It controls the electronic equipment and is switched to notconnect state from the long connection status.
Optionally, be also stored with other computer instruction in the storage medium, these computer instructions with step It is rapid: judge whether the interval time between the last call duration time and current time is more than that first threshold is performed later, It is performed and includes the following steps:
When the interval time being less than the first threshold, the last call duration time is updated to current time.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (13)

1. a kind of information processing method is applied to electronic equipment, which comprises
The first identifier of the electronic equipment and the second identifier of server, first data packet are obtained from the first data packet The data packet interacted for the electronic equipment and the server;
Based on the first identifier and the second identifier, the last communication between the electronic equipment and the server is obtained Time;
Judge the interval time between the last call duration time and the current time of the electronic equipment whether more than the first threshold Value;
When the interval time being more than the first threshold, determines that the electronic equipment is in and connected with the long of the server State.
2. the method as described in claim 1, which is characterized in that obtain last between the electronic equipment and the server Call duration time, comprising:
Judging whether there is in the communications database of the electronic equipment matches with the first identifier and the second identifier Call duration time, obtain the first judging result, wherein in the communications database include at least the electronic equipment communicating Mark and call duration time in journey;
When first judging result, which is, is, using the matched call duration time as the last call duration time.
3. method according to claim 2, which is characterized in that judging in the communications database that the electronic equipment stores With the presence or absence of with the first identifier and the matched call duration time of the second identifier, obtain the first judging result before, it is described Method further include:
Determine that first data packet is the reception packet that the server is sent to the electronic equipment;Or determine described first Data packet is the transmission packet that the electronic equipment is sent to the server, and electronic equipment described in the transmission Bao Buwei is used for The first transmission that request establishes connection with the server is wrapped.
4. method as claimed in claim 3, which is characterized in that the method also includes:
When it is the first transmission packet that first judging result, which is no and/or described first data packet, in the communication number According to recording the first identifier, the second identifier and current time in library, wherein set current time as the electronics The standby call duration time with the server.
5. the method as described in any claim of claim 1-4, which is characterized in that determine the electronic equipment be in it is described After the long connection status of server, the method also includes:
It controls the electronic equipment and is switched to notconnect state from the long connection status.
6. the method as described in any claim of claim 1-4, which is characterized in that judging the last call duration time and current After whether interval time between the time is more than first threshold, the method also includes:
When the interval time being less than the first threshold, the last call duration time is updated to current time.
7. the method as described in claim 1, which is characterized in that the first identifier includes between the network of the electronic equipment The protocol address and port numbering of interconnection, the second identifier include between the network of the server protocol address that interconnects and Port numbering.
8. a kind of electronic equipment, comprising:
First obtains unit, for obtaining the first identifier of the electronic equipment and the second mark of server from the first data packet Know, first data packet is the data packet that the electronic equipment and the server interact;
Second obtaining unit obtains the electronic equipment and the clothes for being based on the first identifier and the second identifier Last call duration time between business device;
First judging unit, when for judging the interval between the last call duration time and the current time of the electronic equipment Between whether be more than first threshold;
First determination unit, for when the interval time be more than the first threshold when, determine the electronic equipment be in The long connection status of the server.
9. equipment as claimed in claim 8, which is characterized in that second obtaining unit is for judging in the electronic equipment It whether there is in the communications database of storage and the first identifier and the matched call duration time of the second identifier, acquisition first Judging result, wherein mark and communication of the electronic equipment in communication process are included at least in the communications database Time;When first judging result, which is, is, using the matched call duration time as the last call duration time.
10. equipment as claimed in claim 9, which is characterized in that the electronic equipment further include:
Second determination unit, for judging to whether there is and described first in the communications database that the electronic equipment stores Mark and the matched call duration time of the second identifier determine first data packet for institute before obtaining the first judging result State the reception packet that server is sent to the electronic equipment;Or determine that first data packet is that the electronic equipment is sent to The transmission packet of the server, and electronic equipment described in the transmission Bao Buwei establishes connection with the server for requesting First sends packet.
11. equipment as claimed in claim 10, which is characterized in that the electronic equipment further include:
Recording unit is the first transmission packet for being no and/or described first data packet in first judging result When, the first identifier, the second identifier and current time are recorded in the communications database, wherein when will be current Between call duration time as the electronic equipment and the server.
12. such as the described in any item equipment of claim 8-11, which is characterized in that the electronic equipment further include:
Control unit, for determining the electronic equipment after the long connection status with the server, described in control Electronic equipment is switched to notconnect state from the long connection status.
13. such as the described in any item equipment of claim 8-11, which is characterized in that the electronic equipment further include:
Updating unit, for judging the interval time between the last call duration time and current time whether more than the first threshold After value, when the interval time being less than the first threshold, the last call duration time is updated to current time.
CN201510319408.XA 2015-06-11 2015-06-11 A kind of information processing method and electronic equipment Active CN104954199B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510319408.XA CN104954199B (en) 2015-06-11 2015-06-11 A kind of information processing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510319408.XA CN104954199B (en) 2015-06-11 2015-06-11 A kind of information processing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN104954199A CN104954199A (en) 2015-09-30
CN104954199B true CN104954199B (en) 2019-01-15

Family

ID=54168573

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510319408.XA Active CN104954199B (en) 2015-06-11 2015-06-11 A kind of information processing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN104954199B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106921992B (en) * 2016-07-06 2020-06-26 阿里巴巴集团控股有限公司 Method for determining wireless network connection state, client and server

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102685209A (en) * 2012-04-01 2012-09-19 百度在线网络技术(北京)有限公司 Method, device and facility for assisting user equipment to receive and dispatch instant message
US20140366094A1 (en) * 2013-06-05 2014-12-11 Tencent Technology (Shenzhen) Company Limited Communication method, communication apparatus and terminal

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102685209A (en) * 2012-04-01 2012-09-19 百度在线网络技术(北京)有限公司 Method, device and facility for assisting user equipment to receive and dispatch instant message
US20140366094A1 (en) * 2013-06-05 2014-12-11 Tencent Technology (Shenzhen) Company Limited Communication method, communication apparatus and terminal

Also Published As

Publication number Publication date
CN104954199A (en) 2015-09-30

Similar Documents

Publication Publication Date Title
CN104935583B (en) A kind of cloud service platform, information processing method and data processing system
US9774642B2 (en) Method and device for pushing multimedia resource and display terminal
CN103428261B (en) Pass through the method for hardware aid in treatment http header
CN104980514B (en) A kind of remote playing control method and device of wireless sound box
CN107888695B (en) The method and cloud platform equipment of cloud platform creation mirror image
CN102523314B (en) Identify the method and apparatus of efficient destination server
CN103873505B (en) Method, system and the device uploaded offline to cloud storage service device
EP2824872B1 (en) Host providing system and communication control method
CN108881354A (en) A kind of pushed information storage method, device, server and computer storage medium
CN105516302B (en) A kind of data processing method and the network equipment
CN104809369B (en) Packet sets method, client, server and the system of equipment access rights
CN105471700B (en) A kind of methods, devices and systems of Message Processing
CN114500633B (en) Data forwarding method, related device, program product and data transmission system
JP5834864B2 (en) Server apparatus, SIP server apparatus, computer program, and message distribution method
CN114222086B (en) Method, system, medium and electronic device for scheduling audio and video code stream
CN105099952B (en) A kind of resource allocation methods and device
CN105224541B (en) Uniqueness control method, information storage means and the device of data
CN103581317A (en) Method for sharing network resources
CN105450997A (en) Cloud storage based video monitoring system
CN109391473A (en) A kind of method, apparatus and storage medium of Electronic Signature
CN104954199B (en) A kind of information processing method and electronic equipment
CN109936539B (en) Account information transmission method
CN109710502A (en) Log transmission method, apparatus and storage medium
RU2014145704A (en) INFORMATION PROCESSING DEVICE, INFORMATION PROCESSING METHOD AND PROGRAM
CN109981694A (en) A kind of synchronous method, server and terminal

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