CN104486291B - Establish the method, apparatus and system of connection - Google Patents

Establish the method, apparatus and system of connection Download PDF

Info

Publication number
CN104486291B
CN104486291B CN201410681799.5A CN201410681799A CN104486291B CN 104486291 B CN104486291 B CN 104486291B CN 201410681799 A CN201410681799 A CN 201410681799A CN 104486291 B CN104486291 B CN 104486291B
Authority
CN
China
Prior art keywords
server
task
terminal
connection
short
Prior art date
Application number
CN201410681799.5A
Other languages
Chinese (zh)
Other versions
CN104486291A (en
Inventor
王东玉
Original Assignee
北京奇安信科技有限公司
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 北京奇安信科技有限公司 filed Critical 北京奇安信科技有限公司
Priority to CN201410681799.5A priority Critical patent/CN104486291B/en
Publication of CN104486291A publication Critical patent/CN104486291A/en
Application granted granted Critical
Publication of CN104486291B publication Critical patent/CN104486291B/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network-specific arrangements or communication protocols supporting networked applications
    • H04L67/14Network-specific arrangements or communication protocols supporting networked applications for session management
    • H04L67/141Network-specific arrangements or communication protocols supporting networked applications for session management provided for setup of an application session

Abstract

The invention discloses a kind of method, apparatus and system for establishing connection, are related to Internet technical field, solve the problems, such as that server task issues not in time.The present invention main technical schemes include:It is established with server and keeps long connection;Include task notifications message in assignment instructions based on the long assignment instructions for connecting and receiving server and issuing;Task notifications message is parsed, the attribute information of task is obtained;Short connection is established with server, and attribute information is reported based on short connect to server, to obtain the task that server issues.During carrying out the whole network scanning in LAN.

Description

Establish the method, apparatus and system of connection
Technical field
The present invention relates to a kind of Internet technical fields, more particularly to a kind of method, apparatus and system for establishing connection.
Background technology
Hypertext transfer protocol (Hypertext is generally basede in LAN environment, between terminal and server Transfer Protocol, abbreviation HTTP) communication connection is established, realize the interaction of uplink and downlink data.More due to HTTP message Complexity, and safeguard that the Internet resources needed for HTTP connection status are larger, therefore HTTP is usually used as short connection in practical application, HTTP connections are established when terminal to server reports request message, HTTP companies are disconnected after server responds the request message It connects.In the short connections of HTTP, server only could respond terminal after terminal sends request message, and server can not Task actively is issued to terminal, to lead to the problem of mission dispatching not in time.For example, when carrying out the whole network virus scan or the whole network When loophole is repaired, if terminal does not report request message, server that can not appoint scan task or reparation to server Business is handed down to terminal, can not the virus of killing in time or patching bugs so as to cause terminal.In certain in emergency circumstances (such as authorities In the net of domain when there is serious loophole), the delay of mission dispatching may the safety of local area network cause to seriously affect.
Invention content
In view of this, the embodiment of the present invention provides a kind of method, apparatus and system for establishing connection, it being capable of settlement server Mission dispatching not in time the problem of.
According to the present invention on one side, a kind of method for establishing connection is provided, including:
It is established with server and keeps long connection;
Include task notifications message in assignment instructions based on the long assignment instructions for connecting and receiving server and issuing;
Task notifications message is parsed, the attribute information of task is obtained;
Short connection is established with server, and attribute information is reported based on short connect to server, to obtain under server The task of hair.
According to another aspect of the present invention, a kind of device for establishing connection is provided, including:
First establishing unit, for being established with server and keeping long connection;
Receiving unit, the long connection for being established and being kept based on first establishing unit are received the task that server issues and referred to It enables, includes task notifications message in assignment instructions;
Resolution unit, the task notifications message for being received to receiving unit parse, and obtain the attribute information of task;
Second establishes unit, for after the attribute information that resolution unit obtains task, short connection to be established with server;
Reporting unit, the short connection for establishing unit foundation based on second report the category that resolution unit obtains to server Property information, to obtain the task that server issues.
According to another aspect of the present invention, a kind of system for establishing connection is provided, including:
Terminal and server, wherein terminal includes device as described above;
Server is used for:
It is established with terminal and keeps long connection;
Assignment instructions are issued to terminal based on long connection, include task notifications message in assignment instructions;
Short connection is established with terminal, the attribute information that terminal reports is received based on short connection, is searched and is appointed according to attribute information It is engaged in and is handed down to terminal;
Wherein, attribute information is that terminal is obtained by parsing task notifications message.
By above-mentioned technical proposal, the method, apparatus and system provided by the invention for establishing connection can be in terminal and clothes It is established on the basis of short connection between business device, long connection is further established and keep, when server needs to issue task to terminal When, assignment instructions can be handed down to terminal by the long connection of holding, after receiving the assignment instructions that server issues, eventually End can establish short connection with server, and be believed the attribute for parsing the task that the assignment instructions obtain by the short connection of foundation Breath is reported to server, and server searches task according to the attribute information and is handed down to terminal.In the present invention, due to terminal and clothes Long connection is always maintained between business device, therefore, server to various tasks can actively issue at any time, with the prior art Compare, the present invention can in time, active by various mission dispatchings to terminal, there is no mission dispatchings to postpone.
Above description is only the general introduction of technical solution of the present invention, in order to better understand the technical means of the present invention, And can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, below the special specific implementation mode for lifting the present invention.
Description of the drawings
By reading the detailed description of hereafter preferred embodiment, various other advantages and benefit are common for this field Technical staff will become clear.Attached drawing only for the purpose of illustrating preferred embodiments, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of method flow diagram for establishing connection provided in an embodiment of the present invention;
Fig. 2 shows a kind of device composition frame charts for establishing connection provided in an embodiment of the present invention;
Fig. 3 shows a kind of block diagram of system for establishing connection provided in an embodiment of the present invention.
Specific implementation mode
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure Completely it is communicated to those skilled in the art.
An embodiment of the present invention provides a kind of methods for establishing connection, as shown in Figure 1, this method includes:
101, it establishes with server and keeps long connection.
When terminal and server, which are established, to be connected, terminal establishes long connection with server, and terminal needs to send to server The request bag of connection, waiting for server confirm;When server receives the request bag of terminal transmission and confirms the request data package Afterwards, the data packet of the request data package and server itself is sent to terminal;When terminal receives the data of server transmission The data packet that simultaneously confirmed service device is sent is wrapped, while being sent to server and confirming data packet, thus terminal and server is just completed Long establishment of connection., can be continuously to opposite end transmission data packet after terminal and server establishes long connection, and terminal kimonos Business device can be always maintained at long connection.Long connection is established and keeps by using terminal and server, so that server can be timely Data packet is actively issued to terminal.
102, the assignment instructions that server issues are received based on long connection, includes task notifications message in assignment instructions.
Assignment instructions in this step are generated by server, and are handed down to terminal in time, and terminal is according in the assignment instructions Notification message respond the assignment instructions.When server issues assignment instructions to terminal, pass through terminal in step 101 and service The long connection that device is established issues assignment instructions to terminal in time, includes task notifications message in the assignment instructions, passes through the task Notification message informs this task definition of terminal.If server to terminal issue assignment instructions be it is multiple when, elder generation may be used Send one of assignment instructions to terminal, etc. after terminals have responded the assignment instructions, issue other tasks to terminal again Instruction;Or it is all sent to terminal using by the multiple tasks instruction of server end, terminal selects first according to the demand of itself Which assignment instructions first responded.Specifically the mode embodiment of the present invention of assignment instructions is issued to terminal to this not about server It is limited.
Wherein, about the task notifications message embodiment of the present invention can including but not limited to the following contents, for example, this Business notification message is patch reparation, or system or application program updating etc., the specific embodiment of the present invention is to this It is not limited.
103, task notifications message is parsed, obtains the attribute information of task.
The task notifications message that server issues in terminal receiving step 102 has recorded service in the task notifications message Device issues the attribute information of assignment instructions, and terminal needs, by parsing the task notifications message, to obtain the category of the task Property information.Wherein the attribute information includes at least:Identity ID, order, time, packet length, type, check bit word etc., tool The embodiment of the present invention of body is not limited.
Wherein, it may include when parsing task notifications message but be not limited to mode below and realize:It is logical to the task Know that the content in message is parsed one by one, obtains the attribute information of all tasks;Alternatively, only parsing executes the task notifications Content necessary to message executes the content that the task notifications message must obtain for example, rule of thumb searching, will find Content field parsed, and the attribute information of the task definition field is obtained, wherein the above-mentioned execution task notifications message Necessary content, the terminal and server by establishing connection consult to decide;Alternatively, traversing the task notifications message, selector Divide and executes the part attribute information etc. that the content that the task notifications message must obtain is parsed, and obtains the task. About the resolving to task notifications message, it is not limited by the embodiments of the present invention.
104, short connection is established with server, and attribute information is reported based on short connect to server, to be serviced The task that device issues.
Terminal establishes the process of short connection with server, please refers to terminal and server in above-mentioned steps 101 and establishes long connect The process connect specifically establishes the process embodiment of the present invention of short connection to this without repeating, eventually about terminal and server End and server establish short connection, and server, after responding terminal request, terminal or server can interrupt this time eventually The connection at end and server.
After the attribute information of the task of acquisition, terminal and server establishes short connection, due to the terminal in a step 101 with Server is established and keeps long connection, in this step, in order to reduce the occupancy of Internet resources, while times that server issues Business instruction is disposable effective under normal conditions, and terminal establishes short connection with server;It short is connected on server based on this The attribute information that parses in report step 103, server is searched according to the attribute information and issues task to terminal, thus complete At a server task is issued to terminal in time.
The method provided by the invention for establishing connection, on the basis of short connection can be established between terminal and server, Long connection is further established and kept, when server needs to issue task to terminal, can will be appointed by the long connection of holding Business instruction is handed down to terminal, and after receiving the assignment instructions that server issues, terminal can establish short connection with server, and The attribute information for parsing the task that the assignment instructions obtain is reported to server by the short connection of foundation, server is according to this Attribute information searches task and is handed down to terminal.It is long due to being always maintained between terminal and server in the embodiment of the present invention Connection, therefore, server to various tasks can actively issue at any time, compared with prior art, energy of the embodiment of the present invention It is enough in time, active by various mission dispatchings to terminal, there is no mission dispatchings to postpone.
Further, in another embodiment of the invention, it is established with server in execution above-mentioned steps 101 and keeps long When connection, following manner can also be used:Terminal first passage is short connect to server request data when, terminal and server The connection of this terminal and server will not be interrupted, but after the request data that server responds terminal, terminal is again to this Server sends the request for establishing long connection, is established with server and keeps long connection.
Further, in assignment instructions include task in above-mentioned steps 102 as the refinement and extension to above-described embodiment Notification message can be presented in the form of formatting message, and terminal disappears according to the content formatted in message, parsing task notifications Breath, to obtain the attribute information of task.
In implementation process, message is formatted in addition to content field, can also include:Identity id field, command word Section, time field, the long field of packet, type field, verification bit field;Wherein, different tasks corresponds to different identity ID By server sets itself, for example, when server issues first task of patch reparation, this can be arranged in field, id field Id field is XF001, and when server issues second task of patch reparation, it is XF002 that the id field, which can be arranged, works as service When device issues first task of upgrading, it is SJ001 that the id field, which can be arranged, when server issues second task of upgrading When, it is SJ002 etc., the exemplary only citing of set-up mode of above-mentioned id field, this specific hair that the id field, which can be arranged, Bright embodiment is not limited this.
Illustratively, command field is that server-side instruction terminal needs the order executed, for example, unloading, upgrading, patch are repaiied It is multiple etc.;Time field may include but be not limited to have recorded server in content below, such as time field and issue to appoint Be engaged in instruction the time either assignment instructions generated time can also be server requirement terminal which time or when Between time of the assignment instructions is executed in section, the specific embodiment of the present invention is not limited;Wrap the long field record task The size of instruction, for example, wrapping a length of 10K, 8K etc., the embodiment of the present invention does not limit the size of the assignment instructions specifically It is fixed;Type field is for which type of operation, for example, upgrading, patch reparation, update unloading etc., in practical operation It is set according to actual conditions, the specific embodiment of the present invention is to this without limiting;It is according to content word to verify bit field What section, identity id field, command field, time field, the long field of packet, type field etc. were calculated, according to above-mentioned The difference of field and it is different.
Optionally, the embodiment of the present invention is when terminal and server establish long connection, using the TCP long based on proprietary protocol Connection, this kind of connection type do not have special unified standard, and easy to maintain;Certainly, it can also use and be based in practical application The TCP long connections of publicly-owned agreement, it is not limited by the embodiments of the present invention for specific long connection type.
Optionally, when terminal and server carry out establishing short connection, it may be employed without limitation of mode below real It is existing, it is connected for example, terminal is established with server by the short connections of HTTP, terminal and service can also be established by the short connections of TCP Connection between device.The embodiment of the present invention is not limited the type of specific short connection.
Above-mentioned example is the explanation carried out so that terminal and server establishes a long connection as an example, and similarly, one is taken Business device is established with more station terminals and is protected for long connection, and the identity mark in message can will be formatted when issuing task to terminal Know id field to be configured according to different terminals, for example, when a server is established with terminal 1, terminal 2, terminal 3 ... And long connection is kept, when issuing assignment instructions to above-mentioned terminal, it may be used such as under type:When server issues benefit to terminal 1 When first task of fourth reparation, it is 001XF001 that the id field, which can be arranged, when server issues the of patch reparation to terminal 2 When one task, it is 002XF001 that the id field, which can be arranged, when server issues to terminal 3 first task of patch reparation When, it is 003XF001 that the id field, which can be arranged,;When server issues second task of patch reparation to terminal 1, can be arranged The id field is 001XF002, and when server issues second task of patch reparation to terminal 2, the id field, which can be arranged, is 002XF002, when server issues second task of patch reparation to terminal 3, it is 003XF002 that the id field, which can be arranged,; When server issues first task of upgrading to terminal 1, it is 001SJ001 that the id field, which can be arranged, when server is to terminal 2 when issuing first task of upgrading, and it is 002SJ001 that the id field, which can be arranged, when server issues the of upgrading to terminal 3 When one task, it is 003SJ001 that the id field, which can be arranged,;It, can when server issues second task of upgrading to terminal 1 It is 001SJ002 that the id field, which is arranged, and when server issues second task of upgrading to terminal 2, the id field, which can be arranged, is 002SJ002, when server issues second task of upgrading to terminal 3, it is 003SJ002 etc. that the id field, which can be arranged,. The exemplary only citing of set-up mode of above-mentioned id field, specific it is not limited by the embodiments of the present invention.
One server issues assignment instructions to more station terminals, receives more station terminals of the assignment instructions to the assignment instructions It is parsed, wherein the parsing for the assignment instructions that related end-on receives and establish short connection with server, and based on short The process for reporting attribute information to server is connected, above-mentioned steps 103, the specific descriptions with step 104 are please referred to, the present invention is real Example is applied to this without repeating.
Based on above method embodiment, the embodiment of the present invention also provides a kind of device for establishing connection, as shown in Fig. 2, should Device includes:
First establishing unit 21, for long connection to be established and kept with server, when terminal and server foundation connection, Terminal establishes long connection with server, and terminal needs to send the request bag of connection to server, and waiting for server confirms;Work as service After device receives the request bag of terminal transmission and confirms the request data package, by the data of the request data package and server itself Packet is sent to terminal;When the data packet that terminal receives the data packet of server transmission and confirmed service device is sent, while to clothes Business device, which is sent, confirms data packet, and thus terminal and server just completes long establishment of connection.Terminal and server establishes long connect , can be continuously to opposite end transmission data packet after connecing, and terminal and server can be always maintained at long connection.By using terminal with Long connection is established and kept to server, so that server actively can issue data packet to terminal in time;
Receiving unit 22, the long connection for being established and being kept based on first establishing unit 21 receive times that server issues Business instructs, and includes task notifications message in assignment instructions, which is generated by server, and is handed down to terminal in time, eventually End responds the assignment instructions according to the notification message in the assignment instructions.When server issues assignment instructions to terminal, pass through Terminal issues assignment instructions to terminal in time with the long connection that server is established, and includes task notifications message in the assignment instructions, This task definition of terminal is informed by the task notifications message;
Resolution unit 23, the task notifications message for being received to receiving unit 22 parse, and obtain the attribute of task Information, terminal receive the task notifications message that issues of server, have recorded server in the task notifications message and issue task and refer to The attribute information of order, terminal need, by parsing the task notifications message, to obtain the attribute information of the task.Wherein should Attribute information includes at least:Identity ID, order, time, packet length, type, check bit word etc., the specific present invention is implemented Example is not limited;
Second establishes unit 24, for after the attribute information that resolution unit 23 obtains task, short company to be established with server It connects, after the attribute information of the task of acquisition, terminal and server establishes short connection, due to the terminal in first establishing unit 21 Long connection is established and kept with server, and in order to reduce the occupancy of Internet resources, while the assignment instructions that server issues are logical It is disposable effective in the case of often, terminal establishes short connection with server;
Reporting unit 25, the short connection for establishing the foundation of unit 24 based on second report resolution unit 23 to obtain to server Attribute information establish the short connection of the foundation of unit 24 to server based on second to obtain the task that server issues Resolution unit 23 is reported to parse obtained attribute information, server is searched according to the attribute information and issues task to terminal, by This completes a server and issues task to terminal in time.
Further, the first establishing unit 21 be used for first passage is short connect to server request data when, establish And keep long connection.
Further, the task notifications message for including in the assignment instructions which receives is to format message.
Further, the resolution unit 23 obtains the ground of task for being read out to the content field for formatting message Location information.
Further, the formatting message which receives further includes following field:Identity id field, life Enable field, time field, the long field of packet, type field, verification bit field.
Further, which establishes and the length kept is connected as transmission control protocol TCP length connection, should Second, which establishes the short of the foundation of unit 24, is connected as the short connections of hypertext transfer protocol HTTP.
Further, the embodiment of the present invention also provides a kind of system for establishing connection, as shown in figure 3, the system includes:Eventually End 31 and server 32, wherein the terminal 31 is device as shown in Figure 2 above;
Server 32, is used for:
It is established with terminal 31 and keeps long connection;
Assignment instructions are issued to terminal 31 based on long connection, include task notifications message in assignment instructions;
Short connection is established with terminal 31, the attribute information that terminal 31 reports is received based on short connection, is looked into according to attribute information It looks for task and is handed down to terminal 31;
Wherein, attribute information is that terminal 31 is obtained by parsing task notifications message.
The apparatus and system provided by the invention for establishing connection, can establish the base of short connection between terminal and server On plinth, long connection is further established and kept, when server needs to issue task to terminal, can be connected by the long of holding Assignment instructions are handed down to terminal, after receiving the assignment instructions that server issues, terminal can establish short company with server It connects, and the attribute information for parsing the task that the assignment instructions obtain is reported to by server, server by the short connection of foundation Task is searched according to the attribute information and is handed down to terminal.In the embodiment of the present invention, due to being protected always between terminal and server Long connection is hold, therefore, server to various tasks can actively issue at any time, and compared with prior art, the present invention is real Apply example can in time, active by various mission dispatchings to terminal, there is no mission dispatchings to postpone.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, it may refer to the associated description of other embodiment.
It is understood that the correlated characteristic in the above method and device can be referred to mutually.In addition, in above-described embodiment " first ", " second " etc. be and not represent the quality of each embodiment for distinguishing each embodiment.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
Algorithm and display be not inherently related to any certain computer, virtual system or miscellaneous equipment provided herein. Various general-purpose systems can also be used together with teaching based on this.As described above, it constructs required by this kind of system Structure be obvious.In addition, the present invention is not also directed to any certain programmed language.It should be understood that can utilize various Programming language realizes the content of invention described herein, and the description done above to language-specific is to disclose this hair Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention Example can be put into practice without these specific details.In some instances, well known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this description.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of each inventive aspect, Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:It is i.e. required to protect Shield the present invention claims the more features of feature than being expressly recited in each claim.More precisely, as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific implementation mode are expressly incorporated in the specific implementation mode, wherein each claim itself All as a separate embodiment of the present invention.
Those skilled in the art, which are appreciated that, to carry out adaptively the module in the equipment in embodiment Change and they are arranged in the one or more equipment different from the embodiment.It can be the module or list in embodiment Member or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it may be used any Combination is disclosed to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so to appoint Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power Profit requires, abstract and attached drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included certain features rather than other feature, but the combination of the feature of different embodiments means in of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed One of meaning mode can use in any combination.
The all parts embodiment of the present invention can be with hardware realization, or to run on one or more processors Software module realize, or realized with combination thereof.It will be understood by those of skill in the art that can use in practice Microprocessor or digital signal processor (DSP) come realize the method, apparatus according to the ... of the embodiment of the present invention for establishing connection and The some or all functions of some or all components in system.The present invention is also implemented as being retouched here for executing The some or all equipment or program of device (for example, computer program and computer program product) for the method stated. It is such to realize that the program of the present invention may be stored on the computer-readable medium, or can have one or more signal Form.Such signal can be downloaded from internet website and be obtained, either provide on carrier signal or with it is any its He provides form.
It should be noted that the present invention will be described rather than limits the invention for above-described embodiment, and ability Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference mark between bracket should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" before element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real It is existing.In the unit claims listing several devices, several in these devices can be by the same hardware branch To embody.The use of word first, second, and third does not indicate that any sequence.These words can be explained and be run after fame Claim.

Claims (11)

1. a kind of method for establishing connection, which is characterized in that including:
It is established with server and keeps long connection;
It is described to be established with server and keep the long connection to include:
First passage is short connect to the server request data when, establish and keep the long connection;
The assignment instructions that the server issues are received based on the long connection, are disappeared comprising task notifications in the assignment instructions Breath;
The task notifications message is parsed, the attribute information of task is obtained;
Short connection is established with the server, and the attribute information is reported based on short connect to the server, so as to Obtain the task that the server issues.
2. according to the method described in claim 1, it is characterized in that, the task notifications message for including in the assignment instructions is lattice Formula message.
3. according to the method described in claim 2, it is characterized in that, described parse the task notifications message, obtain The attribute information of task includes:
The content field for formatting message is read out, the address information of the task is obtained.
4. according to the method in claim 2 or 3, which is characterized in that the formatting message further includes following field:Identity Identify id field, command field, time field, the long field of packet, type field, verification bit field.
5. according to the method in any one of claims 1 to 3, it is characterised in that:
The length is connected as transmission control protocol TCP length connection;
It is described short to be connected as the short connections of hypertext transfer protocol HTTP.
6. a kind of device for establishing connection, which is characterized in that including:
First establishing unit, for being established with server and keeping long connection;
The first establishing unit be used for first passage is short connect to the server request data when, establish and keep described Long connection;
Receiving unit, the long connection for being established and being kept based on the first establishing unit receive times that the server issues Business instructs, and includes task notifications message in the assignment instructions;
Resolution unit, the task notifications message for being received to the receiving unit parse, and obtain the attribute information of task;
Second establishes unit, for after the attribute information that the resolution unit obtains the task, being established with the server Short connection;
Reporting unit, the short connection for establishing unit foundation based on described second report the resolution unit to the server The attribute information obtained, to obtain the task that the server issues.
7. device according to claim 6, which is characterized in that include in the assignment instructions that the receiving unit receives The task notifications message be format message.
8. device according to claim 7, which is characterized in that the resolution unit, for the formatting message Content field is read out, and obtains the address information of the task.
9. device according to claim 7 or 8, which is characterized in that the formatting message that the receiving unit receives It further include following field:Identity id field, command field, time field, the long field of packet, type field, verification bit field.
10. the device according to any one of claim 6 to 8, it is characterised in that:
The first establishing unit is established and the length kept is connected as transmission control protocol TCP length connection;
Described second, which establishes the described of unit foundation, short is connected as the short connections of hypertext transfer protocol HTTP.
11. a kind of system for establishing connection, which is characterized in that the system comprises:Terminal and server, wherein the end End includes the device as described in any one of claim 6 to 10;
The server, is used for:
It is established with the terminal and keeps long connection;
It is connected to the terminal based on the length and issues assignment instructions, include task notifications message in the assignment instructions;
Short connection is established with the terminal, the attribute information that the terminal reports is received based on the short connection, according to the category Property information searching task is simultaneously handed down to the terminal;
Wherein, the attribute information is that the terminal is obtained by parsing the task notifications message.
CN201410681799.5A 2014-11-24 2014-11-24 Establish the method, apparatus and system of connection CN104486291B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410681799.5A CN104486291B (en) 2014-11-24 2014-11-24 Establish the method, apparatus and system of connection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410681799.5A CN104486291B (en) 2014-11-24 2014-11-24 Establish the method, apparatus and system of connection

Publications (2)

Publication Number Publication Date
CN104486291A CN104486291A (en) 2015-04-01
CN104486291B true CN104486291B (en) 2018-08-17

Family

ID=52760795

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410681799.5A CN104486291B (en) 2014-11-24 2014-11-24 Establish the method, apparatus and system of connection

Country Status (1)

Country Link
CN (1) CN104486291B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106101217A (en) * 2015-06-20 2016-11-09 浙江网新合同能源管理有限公司 A kind of Realtime Alerts method based on Internet of Things
CN106131110A (en) * 2015-06-20 2016-11-16 浙江网新合同能源管理有限公司 A kind of interlock method based on Internet of Things
CN105933435A (en) * 2015-06-20 2016-09-07 浙江网新合同能源管理有限公司 Real-time query method based on Internet of Things
CN105391776A (en) * 2015-10-20 2016-03-09 上海斐讯数据通信技术有限公司 Communication method and system for long connection message
CN107547484A (en) * 2016-06-29 2018-01-05 上海连尚网络科技有限公司 Message obtains, method, equipment and the system of push
CN106899652B (en) * 2016-07-20 2020-08-21 阿里巴巴集团控股有限公司 Method and device for pushing service processing result
CN106250078A (en) * 2016-07-26 2016-12-21 青岛海信电器股份有限公司 A kind of display terminal control method and equipment
CN107124448A (en) * 2017-04-10 2017-09-01 上海斐讯数据通信技术有限公司 A kind of router OUI storehouses update realization method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102271123A (en) * 2010-06-01 2011-12-07 阿里巴巴集团控股有限公司 Communication method, system and equipment
CN102404698A (en) * 2010-09-15 2012-04-04 中国移动通信集团公司 Wireless mail pushing method, device and system
CN102739560A (en) * 2011-04-13 2012-10-17 腾讯科技(深圳)有限公司 Instant communication method, system thereof and device thereof
CN102833323A (en) * 2012-08-14 2012-12-19 新浪网技术(中国)有限公司 Method and system for remote control of controlled terminal by server
CN103546543A (en) * 2013-09-29 2014-01-29 北京京东尚科信息技术有限公司 Client device for electronic commerce and method and system for supplying information

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020138622A1 (en) * 2001-03-21 2002-09-26 Motorola, Inc. Apparatus and method of using long lived addresses in a private network for push messaging to mobile devices

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102271123A (en) * 2010-06-01 2011-12-07 阿里巴巴集团控股有限公司 Communication method, system and equipment
CN102404698A (en) * 2010-09-15 2012-04-04 中国移动通信集团公司 Wireless mail pushing method, device and system
CN102739560A (en) * 2011-04-13 2012-10-17 腾讯科技(深圳)有限公司 Instant communication method, system thereof and device thereof
CN102833323A (en) * 2012-08-14 2012-12-19 新浪网技术(中国)有限公司 Method and system for remote control of controlled terminal by server
CN103546543A (en) * 2013-09-29 2014-01-29 北京京东尚科信息技术有限公司 Client device for electronic commerce and method and system for supplying information

Also Published As

Publication number Publication date
CN104486291A (en) 2015-04-01

Similar Documents

Publication Publication Date Title
JP6130460B2 (en) Software update system and method, automatic deployment method, and automatic deployment method
US9264326B2 (en) Abstract representation and provisioning of network services
US9037642B2 (en) Platform for deployment and distribution of modules to endpoints
AU2002322282B2 (en) Integrating enterprise support systems
US20140289366A1 (en) Service providing method and system for instance hosting
CN102271053B (en) Automating network reconfiguration method and system during migrations
ES2328628T3 (en) Method of configurations management for equipment in customer facilities and corresponding system.
US7296190B2 (en) Parallel text execution on low-end emulators and devices
US9501570B2 (en) Dynamic routing system
CN105389191B (en) A kind of method for upgrading software based on LAN, device and system
CN103428166B (en) Many SNS platform unified access method of third-party application and system
US8738700B2 (en) Method and system for providing network services
CN102523218B (en) Network safety protection method, equipment and system thereof
CN104468363B (en) Page reorientation method, routing device, terminal device and system
CN104243214B (en) A kind of method, apparatus and system of data processing
CN104219316A (en) Method and device for processing call request in distributed system
CN104144080B (en) The system and method being managed using remote equipment to terminal device
US9979638B2 (en) Systems and methods to construct engineering environment supporting API enablement for software defined networking
CN105978781A (en) Method and system for establishing network connection of Docker container, and client side
CN103747010B (en) A kind of method, system and device by mobile terminal control PC
CN103532755B (en) The processing method of distributed asynchronous event and system
CN105743945B (en) Document down loading method and system based on switching loading source
CN103391312B (en) Resource offline method for down loading and device
CN103530255B (en) Distributed asynchronous event processing method and system
CN104536890B (en) Test system, method and apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20161122

Address after: 100088 Jiuxianqiao Chaoyang District Beijing Road No. 10, building 15, floor 17, layer 1701-26, 3

Applicant after: BEIJING QI'ANXIN SCIENCE & TECHNOLOGY CO., LTD.

Address before: 100088 Beijing city Xicheng District xinjiekouwai Street 28, block D room 112 (Desheng Park)

Applicant before: Beijing Qihu Technology Co., Ltd.

Applicant before: Qizhi Software (Beijing) Co., Ltd.

GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: No. 32, Building 3, 102, 28 Xinjiekouwai Street, Xicheng District, Beijing

Patentee after: Qianxin Technology Group Co., Ltd.

Address before: Beijing Chaoyang District Jiuxianqiao Road 10, building 15, floor 17, layer 1701-26, 3

Patentee before: BEIJING QI'ANXIN SCIENCE & TECHNOLOGY CO., LTD.