CN103024050B - Distributor and the method that multiple server is distributed - Google Patents

Distributor and the method that multiple server is distributed Download PDF

Info

Publication number
CN103024050B
CN103024050B CN201210549372.0A CN201210549372A CN103024050B CN 103024050 B CN103024050 B CN 103024050B CN 201210549372 A CN201210549372 A CN 201210549372A CN 103024050 B CN103024050 B CN 103024050B
Authority
CN
China
Prior art keywords
server
cid
information
connection identifier
client
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
CN201210549372.0A
Other languages
Chinese (zh)
Other versions
CN103024050A (en
Inventor
吴浩
任寰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201210549372.0A priority Critical patent/CN103024050B/en
Publication of CN103024050A publication Critical patent/CN103024050A/en
Application granted granted Critical
Publication of CN103024050B publication Critical patent/CN103024050B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

A kind of method that the invention discloses distributor and multiple server is distributed.The method comprises: receive user totem information; The unique connection identifier (CID of the overall situation is generated according to user totem information; According to the number of connection identifier (CID and server, the connection that connection identifier (CID indicates is distributed in multiple server; Cloud storage server end issues conditional information and command information when there being Data Update to push server; Push server determines destination client according to this conditional information in multiple browser client, and command information is sent to the socket server corresponding with destination client; Socket server and corresponding browser client are set up socket respectively and are connected, and command information is sent to destination client; Destination client realizes the data syn-chronization of itself and cloud storage server end according to described command information.The present invention can realize the load balance of server, makes system have high suitability when increasing and decreasing server.

Description

Distributor and the method that multiple server is distributed
Technical field
The present invention relates to information technology data field of synchronization, a kind of method being specifically related to distributor and multiple server is distributed.
Background technology
At present, along with the development of network technology, the Internet, as huge information resources, becomes the most convenient of people's obtaining information, efficiently approach.At present, user uses personal computer to access internet (Internet) usually, and browser (Browser) accessed web page by installing in personal computer, obtain the information needed.Along with the development of mobile communication technology, user can also by supporting the mobile terminal access internet of browser function, such as mobile phone, personal digital assistant (PersonalDigitalAssistant is called for short PDA).
But, no matter the browser on personal computer or the browser on mobile terminal, generally do not provide Push Service, the information interaction of server end and client depends on the connection that client is initiated, information cannot be sent to client by server end on one's own initiative, thus cannot realize the real-time synchronization of the information between server end and browser client.
In prior art, the most frequently used mode realizing browser client and server-side browser data syn-chronization is that browser client sends request to server end with certain frequency, as once in a week or monthly, if service end has the renewal of relevant information, obtain these information.But applicant finds that this kind of data syn-chronization mode exists following technological deficiency: efficiency comparison is low, take resource real real-time synchronization that is many, that can not accomplish content upgrades.
In a kind of concrete implementation, browser client carries out data syn-chronization by socket server and server end, and browser client needs to keep being connected with socket server thus.But for particular browser client, the process to the socket server that it is distributed or addressing is corresponding also needs to be optimized.
Summary of the invention
In view of the above problems, the present invention is proposed to provide a kind of overcoming the problems referred to above or the distributor solved the problem at least in part and the method for distributing multiple server.
According to one aspect of the present invention, provide a kind of distributor, it comprises: receiving element, connection identifier (CID generation unit and Dispatching Unit, wherein:
Described receiving element, is suitable for receiving user totem information;
Described connection identifier (CID generation unit, is suitable for generating the unique connection identifier (CID of the overall situation according to described user totem information;
Described Dispatching Unit, is suitable for the number according to connection identifier (CID and server, the connection that described connection identifier (CID indicates is distributed in described multiple server;
Wherein, described user totem information is contained in the connection request that browser client sends to described distributor, and described distributor also comprises transmitting element, is suitable for distributed server identification and connection identifier (CID to send to described browser client.
Alternatively, described user totem information comprises: the user name of login user and/or the machine hardware mark of A non logged-on user.
Alternatively, described connection identifier (CID is a specific numerical value within the scope of certain numerical value.
Alternatively, described connection identifier (CID generation unit adopts cyclic redundancy check (CRC) algorithm.
Alternatively, described cyclic redundancy check (CRC) algorithm is 32.
Alternatively, described Dispatching Unit comprises equal molecular cell, association subelement further and distributes subelement, wherein:
Described equal molecular cell, is suitable for, according to the number of server, the number range at connection identifier (CID place is equally divided into multiple numerical intervals;
Described association subelement, is suitable for each server to be associated with in described multiple numerical intervals;
Described distribution subelement, is suitable for, according to the numerical intervals at described connection identifier (CID place, the connection that described connection identifier (CID indicates being distributed to the server be associated with its numerical intervals.
Alternatively, when the number of server changes, described Dispatching Unit re-starts distribution to server.
Alternatively, described server is socket server.
According to a further aspect in the invention, provide a kind of method of distributing multiple server, the method comprises:
Receive user totem information;
The unique connection identifier (CID of the overall situation is generated according to described user totem information;
According to the number of connection identifier (CID and server, the connection that described connection identifier (CID indicates is distributed in described multiple server;
Cloud storage server end issues conditional information and command information when there being Data Update to push server;
Described push server determines destination client according to this conditional information in multiple browser client, and described command information is sent to the socket server corresponding with described destination client;
Described socket server and corresponding browser client are set up socket respectively and are connected, and command information is sent to destination client;
Described destination client realizes the data syn-chronization of itself and cloud storage server end according to described command information.
Alternatively, described user totem information comprises: the user name of login user and/or the machine hardware mark of A non logged-on user.
Alternatively, described connection identifier (CID is a specific numerical value within the scope of certain numerical value.
Alternatively, cyclic redundancy check (CRC) algorithm is adopted to generate described connection identifier (CID according to described user totem information.
Alternatively, described cyclic redundancy check (CRC) algorithm is 32.
Alternatively, the described number according to connection identifier (CID and server, the step of the connection that described connection identifier (CID indicates be distributed in described multiple server comprises following sub-step further:
The number range at connection identifier (CID place is equally divided into multiple numerical intervals by the number according to server;
Each server is associated with in described multiple numerical intervals;
According to the numerical intervals at described connection identifier (CID place, the connection that described connection identifier (CID indicates is distributed to the server be associated with its numerical intervals.
Alternatively, when the number of server changes, distribution is re-started to server.
Alternatively, described server is socket server.
Alternatively, described method also comprises browser client and sends the step including the connection request of described user totem information to distributor, and after server is distributed, also comprise the step that distributed server identification and connection identifier (CID are sent to described browser client by described distributor.
Alternatively, described method also comprises cloud storage server end and sends the step including the conditional information of described user totem information to push server, and after server is distributed, also comprise the step that the command information corresponding with described conditional information and connection identifier (CID are sent to distributed server by described push server.
In browser real-time synchronization, automatic distributing can be carried out to server according to a kind of distributor of the present invention with to the method that multiple server is distributed, solve prior art thus and can not ensure that the long quantity connected of every station server carrying is roughly the same, namely the problem of the load balance of server can not be realized, the load balance, the Distribution Results that achieve server have uniqueness, and repeatable, system has the beneficial effect of high suitability when increasing and decreasing server.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to technological means of the present invention can be better understood, and can be implemented according to the content of specification, and can become apparent, below especially exemplified by the specific embodiment of the present invention to allow above and other objects of the present invention, feature and advantage.
Accompanying drawing explanation
By reading hereafter detailed description of the preferred embodiment, various other advantage and benefit will become cheer and bright for those of ordinary skill in the art.Accompanying drawing only for illustrating the object of preferred implementation, and does not think limitation of the present invention.And in whole accompanying drawing, represent identical parts by identical reference symbol.In the accompanying drawings:
Fig. 1 shows the structural representation realizing the synchronous system of browser data according to an embodiment of the invention;
Fig. 2 shows the structural representation realizing the synchronous system of browser data according to an embodiment of the invention;
Fig. 3 is for realizing the schematic diagram of the process that browser client and socket server connect in the synchronous system of browser data shown in Fig. 2;
Fig. 4 is for realizing the schematic diagram of the process of carrying out information pushing in the synchronous system of browser data under first kind scene to destination client shown in Fig. 2;
Fig. 5 is for realizing the schematic diagram of the process of carrying out information pushing in the synchronous system of browser data under Equations of The Second Kind scene to destination client shown in Fig. 2;
Fig. 6 is for realizing the schematic diagram of the process of carrying out information pushing in the synchronous system of browser data under the 3rd class scene to destination client shown in Fig. 2;
Fig. 7 is the flow chart realizing the synchronous method of browser data according to the embodiment of the present invention;
Fig. 8 is the structural representation realizing the synchronous browser client of browser data according to the embodiment of the present invention;
Fig. 9 is the structure drawing of device distributed server according to the embodiment of the present invention;
Figure 10 is the method flow diagram distributed server according to the embodiment of the present invention; And
Figure 11 is server of the present invention distribution schematic diagram.
Embodiment
Below with reference to accompanying drawings exemplary embodiment of the present disclosure is described in more detail.Although show exemplary embodiment of the present disclosure in accompanying drawing, however should be appreciated that can realize the disclosure in a variety of manners and not should limit by the embodiment set forth here.On the contrary, provide these embodiments to be in order to more thoroughly the disclosure can be understood, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
In one exemplary embodiment of the present invention, provide and a kind ofly realize the synchronous system of browser data.As shown in Figure 1, this system realizing browser data synchronous comprises: cloud storage server end 1, push server 2 and multiple browser client 3,4.Wherein, cloud storage server end 1, for issuing conditional information and command information when there being Data Update to push server; Push server 2, for determining destination client according to conditional information in multiple browser client, and pushes to destination client 3 by this command information; Destination client 3, for the data syn-chronization according to this command information realize target client and cloud storage server end.
In the embodiment shown in fig. 1, by arranging independent push server 2, the data content stored at cloud storage server end occurs more under news, in time command information is sent to destination client by push server, thus achieves service end information and client real-time synchronization simply, efficiently.
As shown in Figure 1, starting client 4 and destination client 3 is included in multiple browser client.Wherein, starting client 4, for upgrading the data be stored in cloud storage server end 1.This starting client 4 and destination client 3 can belong to same user, also can belong to different users.The application scenarios that this starting client 4 and destination client 3 belong to the situation of same user main is: same user uses different equipment (such as mobile phone and PC) to log in browser, one of them (such as PC) changes collection, so needs another equipment (mobile phone) this renewal being synchronized to same user.The application scenarios that this starting client 4 and destination client 3 do not belong to the situation of same user is such as the information communication between different browsers client.
Certainly, the present invention also can by the renewal of cloud storage server end self initiation to data content, and in this case, the initiation browser client in Fig. 14 can not exist.The scene of this situation is such as: system pushes news messages or weather forecast to all browser clients; Or system is initiated to upgrade instruction to the browser client of certain versions all.
Because the cloud storage server end 1 within dotted line frame in Fig. 1, destination client 3 and starting client 4 are existing in existing browser, therefore add push server on this basis and can effectively utilize original system architecture, reduce and realize cost of the present invention.
In order to realize the connection of cloud storage server end 1, push server 2 and destination client 3, as shown in Figure 2, the system realizing browser client synchronous with cloud storage server end data can also comprise multiple socket server, distributor.
Distributor, for after receiving the connection request of client, for it distributes corresponding socket server and connection identifier (CID, and is stored to distribution information database by user totem information and connection identifier (CID.Detailed connection establishment process as shown in Figure 3, comprising:
Step S301, browser client submits connection request to distributor, at least user totem information is comprised in this connection request, for login user, its user totem information can comprise user name, and for A non logged-on user, its user totem information can comprise the machine hardware mark of user.
For login user, this user totem information can be a character string.Wherein, this character string, except the user name of login user, also comprises the information such as login time and checking character.User is called user's unique identifying number, i.e. a numeral, for representing a user.Checking character generates according to user name, namely judges whether user totem information is modified by authenticator symbol.
For A non logged-on user, this user totem information can comprise the machine hardware mark of A non logged-on user, and wherein machine hardware is designated machine unique identification, for client is generated by Hash such as subscriber set hardware, system configuration.
In addition, in order to the screening of follow-up destination client, this connection request can also comprise user's characteristic information, such as: IP address information, browser version information, or the user's characteristic information such as users classification information.Wherein, browser version number, users classification information, or the user's characteristic information such as IP address information may be used for follow-up client Select to use.
Step S302, distributor uses preset algorithm to carry out calculating a numerical value based on this user totem information, is submit to the browser client of connection request to distribute socket server according to this numerical value; This numerical value is that the overall situation is unique, i.e. connection identifier (CID; The link information such as IP address, port of this socket server and connection identifier (CID are sent to the browser client submitting request to by distributor;
In this step, default algorithm is used to calculate above-mentioned numerical value according to the user name of login user.For A non logged-on user, directly adopt the machine hardware mark of A non logged-on user to calculate above-mentioned numerical value, this algorithm can be cyclic redundancy check (CRC) (CRC) 32 algorithm.
Step S303, browser client connects with corresponding socket server according to the IP address of the socket server received and port numbers, and this connection can be that transmission control protocol TCP (TransmissionControlProtocol) connects.When browser client and socket server connect, this socket server obtains the resource identifier identifying this socket server and browser client annexation.Browser client utilizes the connection of having set up to transmit its connection identifier (CID received to this socket server.
Step S304, after socket server receives connection identifier (CID, verifies to distributor this connection identifier (CID, if be proved to be successful, then keep the connection of setting up between browser client, if verify unsuccessful, then disconnects the connection of having set up.
Step S305, user totem information (user name of login user or the machine hardware mark of A non logged-on user), user's characteristic information (if any) and connection identifier (CID are stored in distribution information database by distributor, and obtained resource identifier is also stored in this distribution information database by socket server.
It should be noted that, changing the distribution that causes chaotic in order to prevent server end, browser client needs to connect re-executing step S301-step S304 after a period of time.
In addition, for each socket server, in distribution information database, all there is corresponding independent tables of data, to reduce the scale of tables of data, accelerate to push the stage, the inquiry velocity of socket server at follow-up.
By increasing distributor and socket server, and distribution information database is set in distributor, make it possible in the stage of connecting, user totem information, resource identifier and user's characteristic information etc. are stored in distribution information database, thus achieve the propelling movement of push server to the data content of goal-selling client.
In the information pushing stage: push server, for conditional information and command information are sent to socket server; Socket server, the information for push server being pushed is forwarded to corresponding destination client.Point three class scenes below detailed information pushing process are described in detail.
(1) when this real-time synchronization is initiated by starting client, and when starting client and reception client belong to same user, conditional information comprises user totem information.For example, as shown in Figure 4, this information pushing process comprises:
Step S401, the data that starting client is initiated being stored in the storage of cloud storage server end upgrade;
In this step, the data that cloud storage server end stores comprise one of following: collection information, history information, browser configuration information, note information, log in other possible information of house keeper's information, prompting message information, key information etc.
Step S402, cloud storage server end sends conditional information and command information to push server, this conditional information comprises user totem information, the user name of such as login user or the machine hardware mark of non-login user, and in this conditional information, also comprise the resource identifier of the connection of this starting client of mark socket server corresponding with it;
Step S403, push server calculates a numerical value by the algorithm same with distributor according to user totem information, thus the socket server obtained as destination client distribution, this numerical value is that the overall situation is unique, i.e. connection identifier (CID, and conditional information and command information are sent to this to be the socket server that destination client is distributed;
Step S404, socket server is according to the distribution information database in the user totem information inquiry distributor in conditional information, determine the resource identifier corresponding with destination client, wherein eliminate the resource identifier of the connection of the mark starting client socket server corresponding with it;
Step S405, socket server according to this resource identifier with the connection of this destination client (one or more) in send this command information to this client.
(2) when this real-time synchronization is initiated by starting client, and when starting client and reception client belong to different login user, namely conditional information comprises user totem information, and as shown in Figure 5, this information pushing process comprises:
Step S501, the data that starting client is initiated being stored in the storage of cloud storage server end upgrade;
In this step, the data that cloud storage server end stores comprise one of following: collection information, history information, browser configuration information, note information, log in information that house keeper's information, prompting message information, key information, news information and/or user generate etc.
Step S502, cloud storage server end sends conditional information and command information to push server, and wherein this conditional information can comprise user totem information, the user name of such as login user or the machine hardware mark of non-login user;
Step S503, push server calculates a numerical value by the algorithm same with distributor according to user totem information, thus the socket server obtained as destination client distribution, this numerical value is that the overall situation is unique, i.e. connection identifier (CID, and conditional information and command information are sent to this to be the socket server that destination client is distributed;
Step S504, socket server, according to the distribution information database in the user totem information inquiry distributor in conditional information, determines the resource identifier of destination client;
Step S505, corresponding socket server according to this resource identifier, with the connection of destination client (one or more) in send this notification message to this client, so far, information pushing process terminates.
(3) when this real-time synchronization is initiatively initiated by cloud storage server end, and conditional information comprises the Feature Selection information of destination client, and does not comprise user totem information, and wherein Feature Selection information also can be empty,
In this case, in the connection establishment stage, to be submitted in connection request also comprise Feature Selection information by browser client to distributor, it is with such as front to distribute the user's characteristic information of preserving in information database corresponding.
As shown in Figure 6, this information pushing process comprises:
Step S601, cloud storage server end issues in conditional information and command information to push server, comprise the Feature Selection information (version number of such as certain browser) of destination client in conditional information, this command information is such as the instruction of notice customer upgrade;
Step S602, conditional information and command information are pushed to all socket servers by push server;
Step S603, each socket server submits inquiry request respectively to the distribution information database of distributor, comprises Feature Selection information in this inquiry request; Distribution information database is according to the user's characteristic information of each browser client in Feature Selection condition query distribution information database, determine the resource identifier of the destination client meeting this Feature Selection condition, and this resource identifier is back to each socket server of initiating inquiry;
Step S604, each socket server sends command information according to the resource identifier received to corresponding client, and so far, information pushing process terminates.
In order to save system resource further, the command information being pushed to browser client 3 by push server 2 is notification message.In this case, browser client, also for after the notification message receiving push server propelling movement, connects with cloud storage server end, download the data content occurring to upgrade from cloud storage server end, carry out the synchronous of local data content according to the data content downloaded.Transmission data volume can be reduced by transmitting notification message, reducing system resource and taking.
Certainly, the command information being pushed to destination client by push server also can be content-message, namely the data content occurring to upgrade is comprised in this content-message, in this case, destination client is after the content-message receiving push server propelling movement, from this content-message, extract the data content occurring to upgrade, carry out the synchronous of local data content according to the data content extracted.Directly content-message can be pushed to client by transmitting content-message, information transmission is quick, and step is simple.
In order to realize multilingual support, call text easily, between push server and cloud storage server end, adopt HTTP interface.
Based on realizing the synchronous system of browser data shown in Fig. 1 and Fig. 2, invention further provides and a kind ofly realize the synchronous method of browser data.As shown in Figure 7, this method realizing browser data synchronous comprises:
Step S710, cloud storage server end issues conditional information and command information when there being Data Update to push server;
Step S720, push server determines destination client according to this conditional information in multiple browser client, and this command information is sent to destination client;
Step S730, destination client realizes the data syn-chronization of itself and cloud storage server end according to command information.
Further, also comprise before step S710 and set up socket between browser client with socket server and be connected, this establishment of connection process as shown in Figure 3, just repeats no more here.
Further, step S710 cloud storage server end issues to push server when there being Data Update in the step of conditional information and command information, if comprise the login user user name of destination client or the machine hardware mark of non-login user in conditional information, comprise following two kinds of situations:
Situation one: starting client and reception client belong to same user, this user uses different equipment (such as mobile phone and PC) to log in browser, one of them (such as PC) changes collection, so needs another equipment (mobile phone) this renewal being synchronized to same user;
In this situation, first starting client initiates the relevant configuration be stored in cloud storage server end, function or the information of collection or the amendment of other information.Then cloud storage server end sends conditional information and command information to push server, this command information comprises content-message and notification message, this command information will be sent to destination client according to conditional information by socket server by push server, and wherein this destination client eliminates starting client.Information pushing process in this kind of situation as shown in Figure 4, also repeats no more here.
Situation two: starting client and reception client do not belong to same user, thus realize the information interaction by client between different user.
Specifically, conditional information and content-message are sent to cloud storage server end by the client of a user, by conditional information and related notification message, it is sent to pusher to cloud storage server end, notification message is sent to object client according to conditional information by pusher, and then object client can access cloud storage server end to obtain content.Information pushing process in this case as shown in Figure 5, also repeats no more here.
In addition, if do not comprise the user totem information of destination client in conditional information, and Feature Selection information can be comprised, then also comprise following situation:
Situation three: cloud storage server end self has Data Update, needs browser client and cloud storage server end to carry out data syn-chronization, and cloud storage server end initiatively issues conditional information and command information to push server, such as:
1, cloud storage server end initiates to upgrade instruction to all browser clients of certain version, redaction is upgraded to make all browser clients of this version, wherein, command information is the notification message upgrading to redaction, condition is the client of certain version browser, and namely Feature Selection information is wherein the version number of browser client.Then this command information sends to the destination client in multiple browser client to comprise according to this conditional information by push server: the notification message upgrading to redaction is sent to all browser clients of certain version by push server.
2, cloud storage server end pushes news messages to all browser clients, and its conditional is all browser clients, and namely Feature Selection information is empty, and command information is the content-message comprising news messages; Then this command information sends to the destination client in multiple browser client to comprise according to this conditional information by push server: the content-message comprising news messages is sent to all browser clients by push server.Should be appreciated that, transmission also can be notification message.
3, cloud storage server end pushes weather forecast to the browser client of different regions, and its conditional is the browser client in a certain area, and namely Feature Selection information is the IP section of this certain area correspondence, and command information is the content-message comprising weather forecast; Then this command information sends to the destination client in multiple browser client to comprise according to this conditional information by push server: the content-message comprising weather forecast is sent to the browser client in a certain area by push server.Should be appreciated that, transmission also can be notification message.
Information pushing process in this case as shown in Figure 6, also repeats no more here.
Based on realizing the synchronous system of browser data shown in Fig. 1 and Fig. 2, invention further provides and a kind ofly realize the synchronous browser client of browser data.As shown in Figure 8, this browser client comprises: link block, for being established a connection by distributor and socket server, and receives command information from corresponding socket server; Application module, for according to this command information, performs the application operating of its correspondence.Wherein, described command information is notification message or content-message.
As shown in Figure 8, link block comprises again: distributor connexon module, for submitting connection request to described distributor, in this connection request, at least comprise user totem information, and receive link information and the connection identifier (CID of the socket server be assigned with returned by distributor; Socket connexon module, connects for setting up socket according to the link information of socket server received and described connection identifier (CID with corresponding socket server, and passes through the connection of this socket from corresponding socket server reception command information.Wherein, described user totem information is the user name of login user or the machine hardware mark of A non logged-on user.
As shown in Figure 8, can also comprise in above-mentioned browser client: cloud storing communication module, for the application operating of response application module, communicate with cloud storage server end.
In above-described browser data synchro system, the following condition of demand fulfillment when carrying out socket server distribution:
1, realize load balancing to a certain extent, namely realize the long quantity connected of every platform socket server carrying roughly the same;
2, Distribution Results has uniqueness, repeatable; Namely distributor according to the machine hardware mark of the user name of login user and/or A non logged-on user by request dispatching in a certain socket server, and pusher can to go out current connection according to the machine hardware mark location of the user name of login user and/or A non logged-on user be connected to which socket server;
3, when system increase and decrease socket server, the distribution of socket server should have suitability, namely when the quantity of system increase and decrease socket server, just should can complete redistributing of request by simple change.
In order to meet above-mentioned distribution conditions, present invention further proposes a kind of device that server is distributed.This device may reside in the equipment and system that above-mentioned distributor and pusher and any other need to distribute server.
As shown in Figure 9, this device comprises, receiving element 910, connection identifier (CID generation unit 920 and Dispatching Unit 930, wherein:
Described receiving element 910, is suitable for receiving user totem information;
Described connection identifier (CID generation unit 920, is suitable for generating the unique connection identifier (CID of the overall situation according to described user totem information;
Described Dispatching Unit 930, is suitable for the number according to connection identifier (CID and server, the connection that described connection identifier (CID indicates is distributed in described multiple server.
Wherein, described user totem information comprises: the user name of login user and/or the machine hardware mark of A non logged-on user; Described connection identifier (CID is for identifying the connection of each client, and it is a specific numerical value within the scope of certain numerical value.
Wherein, described connection identifier (CID generation unit 920 adopts cyclic redundancy check (CRC) algorithm, the cyclic redundancy check (CRC) algorithm of such as 32.
In one embodiment of this invention, described Dispatching Unit 930 comprises equal molecular cell, association subelement further and distributes subelement, wherein:
Described equal molecular cell, is suitable for, according to the number of server, the number range at connection identifier (CID place is equally divided into multiple numerical intervals;
Described association subelement, is suitable for each server to be associated with in described multiple numerical intervals;
Described distribution subelement, is suitable for, according to the numerical intervals at described connection identifier (CID place, described connection identifier (CID being distributed to the server be associated with its numerical intervals.
When the number of server changes, described Dispatching Unit 930 can re-start distribution to server.
Alternatively, described server is socket server.
The present invention also provides a kind of distributor, comprises the above-mentioned device distributed multiple server.
Wherein, described user totem information is contained in the connection request that browser client sends to described distributor, and described distributor also comprises transmitting element, is suitable for distributed server identification and connection identifier (CID to send to described browser client.
The present invention also provides a kind of push server, comprises the above-mentioned device distributed multiple server.
Wherein, described user totem information is contained in the conditional information that cloud storage server end sends to described push server, described push server also comprises transmitting element, is suitable for the command information corresponding with described conditional information and connection identifier (CID to send to distributed server.
The present invention also provides a kind of dissemination system, comprises the above-mentioned device distributed multiple server.
It is synchronous that described system is used for realizing browser data, and it comprises: cloud storage server end, push server, socket server, multiple browser client and distributor, wherein:
Described cloud storage server end, for issuing conditional information and command information when there being Data Update to described push server;
Described push server, for determining destination client according to this conditional information in described multiple browser client, and sends to the socket server corresponding with described destination client by described command information;
Described socket server, is connected for setting up socket respectively with corresponding browser client, and command information is sent to destination client; And
Described destination client, for realizing the data syn-chronization of itself and cloud storage server end according to described command information;
Distributor, for setting up the socket server that socket is connected to browser client distribution and its;
Wherein, the above-mentioned device that multiple server is distributed is comprised in described push server and described distributor.
The present invention also provides a kind of method of distributing multiple server in browser real-time synchronization, and as shown in Figure 10, the method comprises the following steps:
Step S1010, receives user totem information;
Step S1020, generates the unique connection identifier (CID of the overall situation according to described user totem information;
Step S1030, according to the number of connection identifier (CID and server, is distributed in described multiple server by the connection that described connection identifier (CID indicates.
Wherein, described user totem information comprises: the user name of login user and/or the machine hardware mark of A non logged-on user; Described connection identifier (CID is a specific numerical value within the scope of certain numerical value.
Wherein, in described step S1020, cyclic redundancy check (CRC) algorithm can be adopted, such as 32 cyclic redundancy check (CRC) (CRC32) algorithms, generate the unique connection identifier (CID of the overall situation according to described user totem information.Described CRC32 algorithm is a kind of consistency hash algorithm, according to this consistency hash algorithm can realize one comparatively dynamically, balanced and addressable server ways of distribution.In one embodiment of the invention, according to CRC32 algorithm, a 0-2 can be converted to uniquely by balanced for the machine hardware of the user name of login user and/or A non logged-on user mark, stable 32special value in-1 scope.
In one embodiment of this invention, the described number according to connection identifier (CID and server, the step of the connection that described connection identifier (CID indicates be distributed in described multiple server comprises following sub-step further:
The number range at connection identifier (CID place is equally divided into multiple numerical intervals by the number according to server;
Each server is associated with in described multiple numerical intervals;
According to the numerical intervals at described connection identifier (CID place, described connection identifier (CID is distributed to the server be associated with its numerical intervals.
Wherein, described server is socket server.
In another embodiment of the invention, described method also comprises browser client and first sends the step including the connection request of described user totem information to distributor, and after server is distributed, also comprise the step that distributed server identification and connection identifier (CID are sent to described browser client by described distributor.
In another embodiment of the invention, described method also comprises cloud storage server end and first sends the step including the conditional information of described user totem information to push server, and after server is distributed, also comprise the step that the command information corresponding with described conditional information and connection identifier (CID are sent to distributed server by described push server.
In another embodiment of the invention, described method is further comprising the steps of:
Cloud storage server end issues conditional information and command information when there being Data Update to push server;
Described push server determines destination client according to this conditional information in multiple browser client, and described command information is sent to the socket server corresponding with described destination client;
Described socket server and corresponding browser client are set up socket respectively and are connected, and command information is sent to destination client;
Described destination client realizes the data syn-chronization of itself and cloud storage server end according to described command information.
Above-mentioned distribution policy can be better understood by the server distribution schematic diagram shown in Figure 11, and as shown in figure 11, each connection identifier (CID is hashed into a 0-2 32special value in-1 scope, and be distributed in as illustrated in the drawing on annulus.The starting point of this annulus is 0, and terminal is 2 32-1.
When the number of server is three, the number range at connection identifier (CID place is equally divided into three numerical intervals, and composes a value respectively for this three station server, if be such as 0 and 2 by First server assignment 32-1, the second station server then assignment is (2 32-1) the/3, three station server then assignment is 2* (2 32-1)/3.According to the numerical intervals that the special value of described connection identifier (CID falls into, distributed to specific server to process.Such as fall into 0 to (2 32-1) numerical value between/3 can distribute to first server, falls into (2 32-1)/3 to 2* (2 32-1) numerical value between/3 can distribute to second server, falls into 2* (2 32-1)/3 to 2 32numerical value between-1 can distribute to the 3rd server.
In addition, when the number of server changes, according to described sub-step, distribution is re-started to server.
Such as, when server is adjusted to 4, can by this 4 station server respectively assignment be 0 and 2 32-1, (2 32-1)/4, (2 32-1)/2,3* (2 32-1)/4.So, 0 to (2 is fallen into 32-1) numerical value between/4 can distribute to first server, falls into (2 32-1)/4 to (2 32-1) numerical value between/2 can distribute to second server, falls into (2 32-1)/2 to 3* (2 32-1) numerical value between/4 can distribute to the 3rd server, falls into 3* (2 32-1)/4 to 2 32numerical value between-1 can distribute to the 4th server.
Above-mentioned method of distributing server can be applied in the browser real-time synchronization system introduced above and other need in the system of distributing server.
To sum up, present invention achieves dynamic, balanced and addressable server distribution.Intrinsic not relevant to any certain computer, virtual system or miscellaneous equipment with display at this algorithm provided.Various general-purpose system also can with use based on together with this teaching.According to description above, the structure constructed required by this type systematic is apparent.In addition, the present invention is not also for any certain programmed language.It should be understood that and various programming language can be utilized to realize content of the present invention described here, and the description done language-specific is above to disclose preferred forms of the present invention.
In specification provided herein, describe a large amount of detail.But can understand, embodiments of the invention can be put into practice when not having these details.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand in each inventive aspect one or more, in the description above to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes.But, the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires feature more more than the feature clearly recorded in each claim.Or rather, as claims below reflect, all features of disclosed single embodiment before inventive aspect is to be less than.Therefore, the claims following embodiment are incorporated to this embodiment thus clearly, and wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and adaptively can change the module in the equipment in embodiment and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition.Except at least some in such feature and/or process or unit be mutually repel except, any combination can be adopted to combine all processes of all features disclosed in this specification (comprising adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment or unit.Unless expressly stated otherwise, each feature disclosed in this specification (comprising adjoint claim, summary and accompanying drawing) can by providing identical, alternative features that is equivalent or similar object replaces.
In addition, those skilled in the art can understand, although embodiments more described herein to comprise in other embodiment some included feature instead of further feature, the combination of the feature of different embodiment means and to be within scope of the present invention and to form different embodiments.Such as, in the following claims, the one of any of embodiment required for protection can use with arbitrary compound mode.
All parts embodiment of the present invention with hardware implementing, or can realize with the software module run on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that the some or all functions that microprocessor or digital signal processor (DSP) can be used in practice to realize according to the some or all parts in the relevant device of the embodiment of the present invention.The present invention can also be embodied as part or all equipment for performing method as described herein or device program (such as, computer program and computer program).Realizing program of the present invention and can store on a computer-readable medium like this, or the form of one or more signal can be had.Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or provides with any other form.
The present invention will be described instead of limit the invention to it should be noted above-described embodiment, and those skilled in the art can design alternative embodiment when not departing from the scope of claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and does not arrange element in the claims or step.Word "a" or "an" before being positioned at element is not got rid of and be there is multiple such element.The present invention can by means of including the hardware of some different elements and realizing by means of the computer of suitably programming.In the unit claim listing some devices, several in these devices can be carry out imbody by same hardware branch.Word first, second and third-class use do not represent any order.Can be title by these word explanations.

Claims (18)

1. a distributor, comprising: receiving element, connection identifier (CID generation unit and Dispatching Unit, wherein:
Described receiving element, is suitable for receiving user totem information;
Described connection identifier (CID generation unit, is suitable for generating the unique connection identifier (CID of the overall situation according to described user totem information; Wherein, described connection identifier (CID is for identifying the connection of each browser client;
Described Dispatching Unit, is suitable for the number according to connection identifier (CID and server, the connection that described connection identifier (CID indicates is distributed in multiple server;
Wherein, described user totem information is contained in the connection request that browser client sends to described distributor, and described distributor also comprises transmitting element, is suitable for distributed server identification and connection identifier (CID to send to described browser client.
2. distributor as claimed in claim 1, wherein, described user totem information comprises: the user name of login user and/or the machine hardware mark of A non logged-on user.
3. distributor as claimed in claim 1, wherein, described connection identifier (CID is a specific numerical value within the scope of certain numerical value.
4. distributor as claimed in claim 1, wherein, described connection identifier (CID generation unit adopts cyclic redundancy check (CRC) algorithm.
5. distributor as claimed in claim 4, wherein, described cyclic redundancy check (CRC) algorithm is 32.
6. distributor as claimed in claim 1, wherein, described Dispatching Unit comprises equal molecular cell, association subelement further and distributes subelement, wherein:
Described equal molecular cell, is suitable for, according to the number of server, the number range at connection identifier (CID place is equally divided into multiple numerical intervals;
Described association subelement, is suitable for each server to be associated with in described multiple numerical intervals;
Described distribution subelement, is suitable for, according to the numerical intervals at described connection identifier (CID place, the connection that described connection identifier (CID indicates being distributed to the server be associated with its numerical intervals.
7. distributor as claimed in claim 1, wherein, when the number of server changes, described Dispatching Unit re-starts distribution to server.
8. distributor as claimed in claim 1, wherein, described server is socket server.
9., to the method that multiple server is distributed, the method comprises:
Receive user totem information;
The unique connection identifier (CID of the overall situation is generated according to described user totem information; Wherein, described connection identifier (CID is for identifying the connection of each browser client;
According to the number of connection identifier (CID and server, the connection that described connection identifier (CID indicates is distributed in multiple server;
Cloud storage server end issues conditional information and command information when there being Data Update to push server;
Described push server determines destination client according to this conditional information in multiple browser client, and described command information is sent to the socket server corresponding with described destination client;
Described socket server and corresponding browser client are set up socket respectively and are connected, and command information is sent to destination client;
Described destination client realizes the data syn-chronization of itself and cloud storage server end according to described command information.
10. method as claimed in claim 9, wherein, described user totem information comprises: the user name of login user and/or the machine hardware mark of A non logged-on user.
11. methods as claimed in claim 9, wherein, described connection identifier (CID is a specific numerical value within the scope of certain numerical value.
12. methods as claimed in claim 9, wherein, adopt cyclic redundancy check (CRC) algorithm to generate described connection identifier (CID according to described user totem information.
13. methods as claimed in claim 12, wherein, described cyclic redundancy check (CRC) algorithm is 32.
14. methods as claimed in claim 9, wherein, the described number according to connection identifier (CID and server, the step connection that described connection identifier (CID indicates being distributed in multiple server comprises following sub-step further:
The number range at connection identifier (CID place is equally divided into multiple numerical intervals by the number according to server;
Each server is associated with in described multiple numerical intervals;
According to the numerical intervals at described connection identifier (CID place, the connection that described connection identifier (CID indicates is distributed to the server be associated with its numerical intervals.
15. methods as claimed in claim 14, wherein, when the number of server changes, re-start distribution to server.
16. methods as claimed in claim 9, wherein, described server is socket server.
17. methods according to any one of claim 9-16, wherein, described method also comprises browser client and sends the step including the connection request of described user totem information to distributor, and after server is distributed, also comprise the step that distributed server identification and connection identifier (CID are sent to described browser client by described distributor.
18. methods according to any one of claim 9-16, wherein, described method also comprises cloud storage server end and sends the step including the conditional information of described user totem information to push server, and after server is distributed, also comprise the step that the command information corresponding with described conditional information and connection identifier (CID are sent to distributed server by described push server.
CN201210549372.0A 2012-12-17 2012-12-17 Distributor and the method that multiple server is distributed Active CN103024050B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210549372.0A CN103024050B (en) 2012-12-17 2012-12-17 Distributor and the method that multiple server is distributed

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210549372.0A CN103024050B (en) 2012-12-17 2012-12-17 Distributor and the method that multiple server is distributed

Publications (2)

Publication Number Publication Date
CN103024050A CN103024050A (en) 2013-04-03
CN103024050B true CN103024050B (en) 2015-11-25

Family

ID=47972174

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210549372.0A Active CN103024050B (en) 2012-12-17 2012-12-17 Distributor and the method that multiple server is distributed

Country Status (1)

Country Link
CN (1) CN103024050B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI513255B (en) * 2013-06-07 2015-12-11 Mitake Information Corp System, device and method for delivering and receiving a mobile notification via dual routes
CN104796495A (en) * 2015-05-08 2015-07-22 集怡嘉数码科技(深圳)有限公司 Message pushing method and system
CN106790629A (en) * 2017-01-03 2017-05-31 努比亚技术有限公司 Data synchronization unit and its realize the method for data syn-chronization, client access system
CN106850852B (en) * 2017-03-20 2019-09-20 南京大学 A kind of locally coherence Hash load-balancing method of the private clound based on dynamical feedback
CN109426559B (en) * 2017-08-21 2022-10-04 北京国双科技有限公司 Command issuing method and device, storage medium and processor
CN111970315A (en) * 2019-05-20 2020-11-20 北京车和家信息技术有限公司 Method, device and system for pushing message
CN112054985B (en) * 2019-06-06 2024-01-19 全球能源互联网研究院有限公司 Data interaction method and system for mobile terminal and field detection test equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6421781B1 (en) * 1998-04-30 2002-07-16 Openwave Systems Inc. Method and apparatus for maintaining security in a push server
CN1464414A (en) * 2002-06-28 2003-12-31 杨俊群 Process for increasing computer network system capacity
CN1620012A (en) * 2003-11-19 2005-05-25 国际商业机器公司 Method and system for updating/reloading the content of pages browsed over a network
CN101199231A (en) * 2005-06-23 2008-06-11 诺基亚公司 Fixed access point for a terminal device
CN101551821A (en) * 2009-05-19 2009-10-07 周佺喜 Method of real-time information broadcasting in web
CN101690314A (en) * 2008-03-18 2010-03-31 日本电气株式会社 Load distribution system, load distribution method, and authentication server
CN102388632A (en) * 2011-08-26 2012-03-21 华为技术有限公司 Application information push method, system and network element

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010041388A (en) * 1998-02-27 2001-05-15 인게이지 테크놀로지스 System and method for building user profiles
TW503355B (en) * 1999-11-17 2002-09-21 Ibm System and method for communication with mobile data processing devices by way of ""mobile software agents""

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6421781B1 (en) * 1998-04-30 2002-07-16 Openwave Systems Inc. Method and apparatus for maintaining security in a push server
CN1464414A (en) * 2002-06-28 2003-12-31 杨俊群 Process for increasing computer network system capacity
CN1620012A (en) * 2003-11-19 2005-05-25 国际商业机器公司 Method and system for updating/reloading the content of pages browsed over a network
CN101199231A (en) * 2005-06-23 2008-06-11 诺基亚公司 Fixed access point for a terminal device
CN101690314A (en) * 2008-03-18 2010-03-31 日本电气株式会社 Load distribution system, load distribution method, and authentication server
CN101551821A (en) * 2009-05-19 2009-10-07 周佺喜 Method of real-time information broadcasting in web
CN102388632A (en) * 2011-08-26 2012-03-21 华为技术有限公司 Application information push method, system and network element

Also Published As

Publication number Publication date
CN103024050A (en) 2013-04-03

Similar Documents

Publication Publication Date Title
CN103024050B (en) Distributor and the method that multiple server is distributed
CN102984278B (en) Realize the system and method that browser data synchronizes
CN103024052A (en) System and method for achieving browser data synchronization
CN102984277B (en) Prevent the system and method that malice connects
CN103037312B (en) Information push method and device
CN101064630B (en) Data synchronization method and system
US7526300B2 (en) Short message management system using a VM application and a mobile communication terminal
US20150334182A1 (en) System, Method and Browser Client for Enabling Browser Data Synchronization
CN109168054B (en) Display screen playing system and control method
CN104092792A (en) Method, system and client-side for achieving flow optimization based on domain name resolution request
CN103841134A (en) API-based method for sending and receiving information, API-based apparatus, and API-based system
CN102224516A (en) Controlling transmission of a content item to a user terminal by independently transmitting additional content to the user terminal
CN104506643A (en) Server of distributed storage system and data synchronizing method between servers
CN103024049B (en) Realize the system that browser data is synchronous
CN104618444A (en) Reverse agent server processing request based method and device
CN103024051B (en) A kind of device, method and corresponding system carrying out server distribution
CN103118355A (en) Display method of mobile terminal user information, mobile terminals and service system
CN103139761A (en) Information real-time show method and mobile communication terminal
CN102984276B (en) For the distributor distributed multiple socket server and distribution method
CN110727738A (en) Global routing system based on data fragmentation, electronic equipment and storage medium
CN103634410A (en) Data synchronization method based on content distribution network (CDN), client end and server
CN111176706A (en) Terminal upgrading method and device, electronic equipment and storage medium
CN105162831A (en) Operation method of mobile end for realizing remote virtual desktop, mobile end apparatus, operation method of service end for realizing remote virtual desktop, service end apparatus
CN103064899B (en) A kind of distribution information database system
CN103036989B (en) Socket server and sockets services method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220719

Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.