CN104052723A - Information processing method and server - Google Patents

Information processing method and server Download PDF

Info

Publication number
CN104052723A
CN104052723A CN201310084536.1A CN201310084536A CN104052723A CN 104052723 A CN104052723 A CN 104052723A CN 201310084536 A CN201310084536 A CN 201310084536A CN 104052723 A CN104052723 A CN 104052723A
Authority
CN
China
Prior art keywords
server
terminal server
receiving terminal
task
transmitting terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201310084536.1A
Other languages
Chinese (zh)
Other versions
CN104052723B (en
Inventor
刘刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201310084536.1A priority Critical patent/CN104052723B/en
Publication of CN104052723A publication Critical patent/CN104052723A/en
Application granted granted Critical
Publication of CN104052723B publication Critical patent/CN104052723B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses an information processing method and a server. The method is applied to a sending end server in an information processing system. The information processing system at least comprises the sending end server and a receiving end server. The sending end server is connected with a sending end client, and the receiving end server is connected with a receiving end client. The method comprises: receiving information from the sending end client; generating an information sending task; establishing task scheduling connection between the sending end server and the receiving end server; and sending the information sending task to the receiving end server through the task scheduling connection to enable the receiving end server to execute the information sending task so as to send the information to the receiving end client. Therefore, the information processing system can realize a cluster scheme of servers through a task scheduling mode to support a larger number of clients.

Description

Information processing method and server
Technical field
The present invention relates to field of computer technology, more specifically, the present invention relates to a kind of information processing method and server.
Background technology
Instant messaging (IM) is a kind of Terminal Service, and it allows two or more users to come immediately mutually to transmit text message and multimedia messages (such as, Voice & Video information) etc. with network, to realize communication object.
Along with the development of IM technology, scalable message transmits and presents agreement (XMPP) agreement and arises at the historic moment.XMPP is the agreement based on extend markup language (XML), and it is intended to promote the accurate real time operation between server.
Typically, Openfire is a kind of IM server of realizing, using Java language to write based on XMPP agreement.Because it is powerful, mature and stable and increase income, so it is in the industry cycle used widely.Yet, because transfer control agreement (TCP) is long, connect the restriction with Java language, causing the client linking number that the Openfire server of current separate unit is supported is only between 6000 to 10000 users, and this is obviously far from being enough for large-scale IM service provider.
For this technical problem, the first solution of the prior art is, by adopting Openfire connection management module (Connection Manager Module), utilizing master slave mode to increase the number of connection of the client in IM system.Particularly, in IM system, using an Openfire server as management server, and the server that other have been installed to connection management module is as connection server, because each connection management module can connect more than 5000 user, so realized the support of more users quantity in IM system.Yet still there is the upper limit in total number of connection that this solution is supported, is about 300,000 left and right.That is to say, this solution is that the dilatation that brings of whole IM system is limited in one's ability, and when wishing that IM system provides IM service to more than 300,000 users, the server of only by increase connection management module being installed cannot be realized this goal.
In addition, the second solution of the prior art is, by increasing more Openfire server and supporting the user of magnanimity in the mode of Openfire cluster in an IM system.For example, the relevant cluster key middleware (Oracle Coherence Clustering Plugin) that the inscriptions on bones or tortoise shells (Oracle) company proposes is exactly such Cluster Solution.Yet because Coherence is business software, inside is realized invisible, if so generating program mistake (bug), IM service provider cannot oneself repair, and must wait for that corresponding manufacturer issues service packs and upgrades and solve, and this is undoubtedly inefficiency.And Coherence is divided into standard edition, enterprise version, grid version.Wherein standard edition is free, but can only use by unit, cannot realize above-mentioned clustering functionality; And enterprise version and grid version have realized clustering functionality, but be charging software, price is charged according to the quantity of CPU (CPU), and unit price is high, so in IM system in the large numbers of situations of clustered node, this will be a huge cost.
Therefore, need a kind of novel information processing method and server to solve the problems referred to above.
Summary of the invention
In order to solve the problems of the technologies described above, according to an aspect of the present invention, a kind of information processing method is provided, described method is applied to the transmitting terminal server in information processing system, described information processing system at least comprises described transmitting terminal server and receiving terminal server, described transmitting terminal server is connected to transmitting terminal client, described receiving terminal server is connected to receiving terminal client, described method comprises: when described transmitting terminal client sends information to described receiving terminal client, from information described in described transmitting terminal client; Information generated sends task, and described information transmission task is for sending described information to described receiving terminal client; Task call address based on described receiving terminal server is set up task call and is connected between described transmitting terminal server and described receiving terminal server; And connect to described receiving terminal server and send described information transmission task by described task call, so that described receiving terminal server is carried out described information, send task, thereby send described information to described receiving terminal client.
In addition, according to a further aspect in the invention, a kind of information processing method is provided, described method is applied to the receiving terminal server in information processing system, described information processing system at least comprises transmitting terminal server and described receiving terminal server, described transmitting terminal server is connected to transmitting terminal client, described receiving terminal server is connected to receiving terminal client, and described method comprises: the task call address based on described transmitting terminal server is set up task call and is connected between described transmitting terminal server and described receiving terminal server; By described task call, connect to come from described transmitting terminal server reception information to send task, described information transmission task is for sending described information to described receiving terminal client; And carry out described information transmission task, thereby send described information to described receiving terminal client.
According to another aspect of the invention, a kind of transmitting terminal server is provided, described transmitting terminal server belongs to information processing system, described information processing system at least comprises described transmitting terminal server and receiving terminal server, described transmitting terminal server is connected to transmitting terminal client, described receiving terminal server is connected to receiving terminal client, described transmitting terminal server comprises: information receiving unit, for when described transmitting terminal client sends information to described receiving terminal client, from information described in described transmitting terminal client; Task generation unit, sends task for information generated, and described information transmission task is for sending described information to described receiving terminal client; Connect and to set up unit, for the task call address based on described receiving terminal server, be connected setting up task call between described transmitting terminal server and described receiving terminal server; And task transmitting element, for connecting by described task call to described receiving terminal server, send described information transmission task, so that described receiving terminal server is carried out described information, send task, thereby send described information to described receiving terminal client.
According to another aspect of the invention, a kind of receiving terminal server is provided, described receiving terminal server belongs to information processing system, described information processing system at least comprises transmitting terminal server and described receiving terminal server, described transmitting terminal server is connected to transmitting terminal client, described receiving terminal server is connected to receiving terminal client, described receiving terminal server comprises: connect and to set up unit, for the task call address based on described transmitting terminal server, be connected setting up task call between described transmitting terminal server and described receiving terminal server; Task receiving element, sends task for connecting to come from described transmitting terminal server reception information by described task call, and described information transmission task is for sending described information to described receiving terminal client; And task executing units, for carrying out described information, send task, thereby send described information to described receiving terminal client.
According to another aspect of the invention, provide a kind of information processing system, described information processing system comprises: above-mentioned transmitting terminal server; Above-mentioned receiving terminal server; State server, identifier, task call address and the be connected client of described state server for storing described transmitting terminal server and described receiving terminal server.
Compared with prior art, employing is according to information processing method of the present invention, transmitting terminal server and receiving terminal server, when transmitting terminal client sends information to receiving terminal client, transmitting terminal server sends task from information described in transmitting terminal client information generated, task call address based on receiving terminal server is set up task call and is connected between described transmitting terminal server and described receiving terminal server, by described task call, connect to described receiving terminal server and send described information transmission task, and by receiving terminal server, carry out described information and send task, thereby send described information to described receiving terminal client.Therefore, in the present invention, information processing system can realize by the mode of task call the group scheme of server, to support the more client of more number, and there is no maximum, and with low cost and maintenance efficiency is high.
Other features and advantages of the present invention will be set forth in the following description, and, partly from specification, become apparent, or understand by implementing the present invention.Object of the present invention and other advantages can be realized and be obtained by specifically noted structure in specification, claims and accompanying drawing.
Accompanying drawing explanation
Accompanying drawing is used to provide a further understanding of the present invention, and forms a part for specification, for explaining the present invention, is not construed as limiting the invention together with embodiments of the present invention.In the accompanying drawings:
Fig. 1 illustrates the technical problem existing in the prior art.
Fig. 2 illustrates the solution according to prior art.
Fig. 3 illustrates according to information processing method of the present invention.
Fig. 4 illustrates according to transmitting terminal server of the present invention.
Fig. 5 illustrates according to information processing method of the present invention.
Fig. 6 illustrates according to receiving terminal server of the present invention.
Fig. 7 illustrates the information processing method according to the embodiment of the present invention.
Fig. 8 illustrates according to the framework of the information processing system of the embodiment of the present invention.
Fig. 9 illustrates according to the functional block diagram of the information processing system of the embodiment of the present invention.
Embodiment
Describe in detail with reference to the accompanying drawings according to each embodiment of the present invention.Here, it should be noted that in the accompanying drawings, identical Reference numeral is given and substantially had part identical or similar structures and function, and will omit being repeated in this description about them.
First, problem and the solution thereof of prior art are described with reference to Fig. 1 and 2.
Fig. 1 illustrates the technical problem existing in the prior art, and Fig. 2 illustrates the solution according to prior art.
As illustrated in figure 1, the IM system based on XMPP agreement generally includes an Openfire server and a plurality of XMPP client in the prior art.In this IM system, the user of some use XMPP clients can use the user of XMPP client to carry out instant messaging with another by Openfire server.Yet because the Openfire server of realizing with Java language based on XMPP is limited to, TCP is long to be connected and Java language, so the client linking number that the Openfire server of separate unit is supported is restricted (being approximately 6000 to 10000).
In order to make IM system can support the more client of more number, the first solution of prior art proposes to add connection server between Openfire server and XMPP client, and this connection server is the server that connection management module is installed.
As illustrated in Figure 2, in the first solution, the IM system based on XMPP agreement comprises an Openfire server, a plurality of connection server and a plurality of XMPP client.Wherein, separate unit Openfire server can be communicated by letter with a plurality of connection servers, and is responsible for processing the IM communication between the client that belongs to identical or different connection server.The client linking number that can support due to the connection management module in every connection server is approximately 5000, so when the user's linking number in this IM system is used up, can, by adding a connection server and it being connected to this Openfire server, support more XMPP client.
Although this first solution has expanded the client capacity of IM system to a certain extent, but still there is maximum (being approximately 300,000) in total number of connection that it is supported, that is to say, when the client sum in IM system surpasses 300,000, even if continue to increase connection server to connect more client, separate unit Openfire server also cannot manage the IM communication logic of these newly-increased clients again.
In addition, as described in the background art, although the second solution proposition of the prior art is supported the user of magnanimity by the mode of Openfire server cluster in an IM system, also there is the problems such as with high costs, maintenance efficiency is low in it.
To this, the inventor has proposed a kind of novel information processing method and server.
Hereinafter, with reference to Fig. 3, to Fig. 6, describe according to information processing method of the present invention and server.
Fig. 3 illustrates according to information processing method of the present invention, and Fig. 4 illustrates according to transmitting terminal server of the present invention.
The illustrated information processing method of Fig. 3 is applied to the transmitting terminal server in information processing system, described information processing system at least comprises described transmitting terminal server and receiving terminal server, described transmitting terminal server is connected to transmitting terminal client, and described receiving terminal server is connected to receiving terminal client.Particularly, as illustrated in Fig. 4, described transmitting terminal server 100 comprises: unit 130 and task transmitting element 140 are set up in information receiving unit 110, task generation unit 120, connection.
As illustrated in Fig. 3, described information processing method comprises:
In step S110, when described transmitting terminal client sends information to described receiving terminal client, information receiving unit 110 is from information described in described transmitting terminal client;
In step S120, task generation unit 120 information generateds send task, and described information transmission task is for sending described information to described receiving terminal client;
In step S130, connect and to set up the task call address of unit 130 based on described receiving terminal server and between described transmitting terminal server and described receiving terminal server, set up task call and be connected; And
In step S140, task transmitting element 140 is connected to described receiving terminal server and is sent described information transmission task by described task call, so that described receiving terminal server is carried out described information, send task, thereby send described information to described receiving terminal client.
Fig. 5 illustrates according to information processing method of the present invention, and Fig. 6 illustrates according to receiving terminal server of the present invention.
The illustrated information processing method of Fig. 5 is applied to the receiving terminal server in information processing system, described information processing system at least comprises transmitting terminal server and described receiving terminal server, described transmitting terminal server is connected to transmitting terminal client, and described receiving terminal server is connected to receiving terminal client.Particularly, as illustrated in Fig. 6, described receiving terminal server 200 comprises: connect and set up unit 210, task receiving element 220 and task executing units 230.
As illustrated in Fig. 5, described information processing method comprises:
In step S210, connect and to set up the task call address of unit 210 based on described transmitting terminal server and between described transmitting terminal server and described receiving terminal server, set up task call and be connected;
In step S220, task receiving element 220 connects to come from described transmitting terminal server reception information transmission task by described task call, and described information transmission task is for sending described information to described receiving terminal client; And
In step S230, task executing units 230 is carried out described information and is sent task, thereby sends described information to described receiving terminal client.
As can be seen here, employing is according to information processing method of the present invention, transmitting terminal server and receiving terminal server, when transmitting terminal client sends information to receiving terminal client, transmitting terminal server sends task from information described in transmitting terminal client information generated, task call address based on receiving terminal server is set up task call and is connected between described transmitting terminal server and described receiving terminal server, by described task call, connect to described receiving terminal server and send described information transmission task, and by receiving terminal server, carry out described information and send task, thereby send described information to described receiving terminal client.Therefore, in the present invention, information processing system can realize by the mode of task call the group scheme of server, to support the more client of more number, and there is no maximum, and with low cost and maintenance efficiency is high.
Hereinafter, with reference to Fig. 7 and Fig. 8, describe according to the information processing method of the embodiment of the present invention and information processing system.
Fig. 7 illustrates the information processing method according to the embodiment of the present invention, and Fig. 8 illustrates according to the framework of the information processing system 1000 of the embodiment of the present invention, and Fig. 9 illustrates according to the functional block diagram of the information processing system 1000 of the embodiment of the present invention.
Fig. 7 is illustrated can be realized by the illustrated information processing system 1000 of Fig. 8 according to the information processing method of the embodiment of the present invention.As illustrated in Figure 8, information processing system 1000 can at least comprise a plurality of service nodes 100,200 and at least one state server 300.For example, this information processing system 1000 can be based on XMPP agreement and have the information processing system of clustering functionality, and service node 100,200 can be Openfire server.
Between a plurality of service nodes 100,200, can transmit instant communication data according to the Realization Method of Communication of agreement.With the client to belonging to these service nodes, provide IM service.
For example, in an embodiment of the present invention, the Realization Method of Communication of this agreement can be used Java RMI (RMI).This RMI is for supporting the java application interface (API) of development DDB application program.Java is as a kind of network development language fashionable for a time, and its huge power is just embodied in the ability of its powerful exploitation the distribute network application, and RMI is exactly absolutely one of the Core Solution of the network distribution type application system of pure Java of exploitation.In fact, it can be counted as the Java version of remote procedure call (RPC).But traditional RPC can not be advantageously applied to distributed object system; Java RMI is supported between the program level object that is stored in different address spaces and communicates each other, to realize the seamless far call between remote object.
Particularly, RMI has gathered Java serializing and Java remote method agreement, and generally includes two independently programs: server program and client-side program.Typical server application will create a plurality of remote objects, and these remote objects can be cited, and then wait for the method for these remote objects of client call.Typical client-side program obtains quoting of one or more remote objects from server, then calls the method for remote object.Therefore, RMI provides a kind of mechanism for server and client side communicates the transmission with information, and has fully simplified the complexity of program development.
In addition, each service node 100,200 can be used as clustered node and adds this information processing system 1000, to establish a communications link with other service nodes and state server 300.Once the service node that existence newly adds be detected, state server 300 is for example, by distributing a unique identifier (, service node numbering etc.) to it, to identify uniquely this service node in this information processing system 1000.Then, state server 300 creates a new data entries in the own database of preserving, and in this data entries, records identifier and other relevant informations of this service node.
For example, for cost-saving and raising search efficiency, in an embodiment of the present invention, can use key assignments (K-V) database (for example Redis database or Memcached database) of increasing income to build this state server 300.
After this, each service node, in running, for example, by heartbeat function, is submitted the operation information of oneself to, so that state server 300 can be learnt the active state of this service node periodically, randomly or in real time to state server 300.If do not receive the operation information (or heartbeat message) of some service nodes in a period of time, state server 300 thinks that this service node goes wrong (for example, the machine of delaying), the whole group system of having left.
Therefore, except the identifier of each service node, this state server 300 can also be preserved the active state of this service node and RMI task call address (RMI URL), this service node and provide the client etc. of IM service for it, as other information relevant to service node.
Below, for convenient, only in the process of unidirectional IM communication, illustrate according to the information processing method of the embodiment of the present invention and information processing system.
Suppose in this unidirectional IM communication process, service node 100 is transmitting terminal servers, service node 200 is receiving terminal servers, and transmitting terminal server 100, receiving terminal server 200 and state server 300 for example, link together by network (, cable network and/or wireless network).
In addition, this transmitting terminal server 100 is connected to transmitting terminal client 10, and this receiving terminal server 200 is connected to receiving terminal client 20.By the interactive communication between transmitting terminal server 100 and receiving terminal server 200, with the first user of transmitting terminal client 10, can come to carry out instant messaging with using the second user of receiving terminal client 20 according to the Realization Method of Communication of agreement, to transmit text message and/or multimedia messages etc.
Particularly, as illustrated in Fig. 9, with the same in Fig. 4, this transmitting terminal server 100 comprises: unit 130 and task transmitting element 140 are set up in information receiving unit 110, task generation unit 120, connection.In addition, preferably, in order to realize one or more additional functions, this transmitting terminal server 100 also comprises: identifier query unit 150, state judging unit 160, address determining unit 170 and/or heartbeat delivery unit 180.
The same with Fig. 6, this receiving terminal server 200 comprises: connect and set up unit 210, task receiving element 220 and task executing units 230.In addition, preferably, in order to realize additional function, this receiving terminal server 200 also comprises: heartbeat delivery unit 240.
In addition, this state server 300 can comprise: information memory cell 310, the various information that are associated with server in information processing system 1000 for storage.
As illustrated in Fig. 7, according to the information processing method of the embodiment of the present invention, comprise:
In step S310, from transmitting terminal client information.
When first user wishes to carry out instant messaging to the second user, when transmitting text message and/or multimedia messages etc., first user can be by the transmitting terminal client 10 input IM information of using at present, and this IM information is sent to for the IM information processing system 1000 of service is provided oneself, to this IM information is ultimately delivered to the second user who uses receiving terminal client 20.
As illustrated in Fig. 9, in information processing system 1000, to the transmitting terminal client 10 of first user, providing the service node of IM service is transmitting terminal server 100.
Correspondingly, in this transmitting terminal server 100, information receiving unit 110 receives this IM information from transmitting terminal client 10.
In order to make the information processing system 1000 can be with the mode support of the Openfire server cluster client terminal quantity of dilatation arbitrarily, in an embodiment of the present invention, transmitting terminal server 100 is not simply IM information directly to be sent to receiving terminal server 200, but will create one for sending the remote object (RMI task) of this information, and this remote object can be quoted by receiving end server 200, so that this receiving terminal server 200 calls the method for remote object.
So this information receiving unit 110 sends to task generation unit 120 by this IM information, to carry out subsequent treatment.
In step S320, information generated sends task.
After receiving this IM information from information receiving unit 110, task generation unit 120 information generateds send task, and described information transmission task is used for making to carry out entity and sends described information to described receiving terminal client 20.
For example, the title that this information sends task can be " task (IM information) ", and its concrete form is " send IM information to client20 ".
In step S330, determine the task call address of receiving terminal server.
Next, address determining unit 170 is determined the task call address of receiving terminal server 200.
In one example, transmitting terminal server 100 can be kept at the task call address of all service nodes in whole information processing system 1000 in the database of oneself, to guarantee the fastest inquiry velocity.
In another example, the task call address of service node can be dispersed in the mode of distributed storage in each service node in information processing system 1000.Like this, can reduce each service node for storing the shared memory space of relevant information, and still can guarantee inquiry velocity faster.
In another example, in order to safeguard uniformly about the various information of service node and to discharge the memory space of each service node, can be by the task call address of all service nodes of state server 300 storage, so that address determining unit 170 is by the task call address of communicating by letter with inquire-receive end server 200 between transmitting terminal server 100 and state server 300.
For this reason, this state server 300 can store the set of the client that identifier, task call address (RMI URL) and this service node of each service node serve in database.
In transmitting terminal server 100, the identifier of the receiving terminal server 200 that identifier query unit 150 can be connected to the described receiving terminal client 20 of state server 300 inquiry.
For example, first this identifier query unit 150 can determine the identification information of receiving terminal client 20.This identification information can be to use the identifier of receiving terminal client 20 itself and/or this second user's user ID, Customs Assigned Number, user account title etc.Like this, identifier query unit 150 can utilize the identification information of receiving terminal client 20 to inquire about to state server 300, to determine that the service node that described receiving terminal client 20 is connected to is receiving terminal server 200, determine the identifier of this receiving terminal server 200, and this identifier is turned back to address determining unit 170.
Then, address determining unit 170 is carried out query State server 300 according to the identifier of described receiving terminal server 200, to determine the task call address of described receiving terminal server 200.
In addition, as mentioned above, because service node may be due to network failure, delay machine etc. of server is former thereby depart from from information processing system 1000, so preferably, before address determining unit 170 is determined the task call address of described receiving terminal server 200, state judging unit 160 can judge according to the identifier of described receiving terminal server 200 active state of described receiving terminal server, and only have when judging described receiving terminal server 200 in active state, just notify described address determining unit 170 according to the identifier of described receiving terminal server 200, to determine the task call address of described receiving terminal server 200.
For this reason, each service node 100,200 is in running, for example, by heartbeat function, to state server 300, submit periodically, randomly or in real time the operation information of oneself to, so that state server 300 can be learnt the active state of this service node.Particularly, in transmitting terminal server 100, heartbeat delivery unit 180 can constantly transmit heartbeat message to described state server 300, and described heartbeat message is for showing that to described state server described transmitting terminal server 100 is in active state.If do not receive the heartbeat message of some service nodes in a period of time, state server 300 is designated inactive state by this service node in database.
Like this, this state server 300 can store the set of the client that identifier, active state, RMI URL and this service node of each service node serve in database, as shown in table 1.
Identifier server Active state Task call address The client of serving
Server100 Movable URL1 Client10、Client30…
Server200 Movable URL2 Client20...
... ... ... ...
Table 1
Preferably, in order to improve the inquiry velocity of database the accessing operation in reduced data storehouse, can use key assignments (K-V) database to build this state server 300.For example, can be using the identifier of server as a key, and using remaining parameter as corresponding value.In like manner, also can be using served client as a key, and using remaining parameter as corresponding value.
Correspondingly, in transmitting terminal server 100, state judging unit 160 can, according to the identifier of the determined receiving terminal server 200 of identifier query unit 150, come to the active state of the described receiving terminal server 200 of state server 300 inquiry.
If judge described receiving terminal server 200 in active state, this state judging unit 160 notifies described address determining unit 170 according to the identifier of described receiving terminal server, to determine the task call address of described receiving terminal server 200.If judge described receiving terminal server in inactive state, this transmitting terminal server 100 can stop the transmission of this IM information, to save oneself processing resource and the network bandwidth.For example, this state judging unit 160 can directly lose or notify task generation unit 120 to abandon described information transmission task.
In step S340, between transmitting terminal server and receiving terminal server, set up task call and be connected.
Afterwards, transmitting terminal server 100 is connected setting up task call between described transmitting terminal server 100 and described receiving terminal server 200 based on this task call address in the task call address (RMIURL) of determining described receiving terminal server 200 in address determining unit 170.Correspondingly, the same task call address based on described transmitting terminal server of receiving terminal server 200 is set up task call and is connected between described transmitting terminal server 100 and described receiving terminal server 200.
Particularly, in transmitting terminal server 100, in this connection, set up unit 130 and generate task call connection request, and according to this RMI URL, this request is addressed to receiving terminal server 200.In this receiving terminal server 200, connect and set up the task call connection request that unit 210 receives from transmitting terminal server 100, and return to task call connection response to this transmitting terminal server 100.Thus, between transmitting terminal server 100 and receiving terminal server 200, set up the interface (or being referred to as to be connected) for transmitting RMI task.
In step S350, to receiving terminal server transmission information, send task.
When setting up between transmitting terminal server 100 and receiving terminal server 200 after task call is connected, in transmitting terminal server 100, task transmitting element 140 is connected to described receiving terminal server 200 and is sent the information transmission task being generated by task generation unit 120 by described task call.
Correspondingly, in receiving terminal server 200, task receiving element 220 connects to come the information receiving for sending described information to described receiving terminal client 20 from described transmitting terminal server 100 to send task by described task call.
In step S360, execution information sends task.
After task receiving element 220 receives this information transmission task, task executing units 230 is carried out described information and is sent task, thereby sends described information to described receiving terminal client 20.
Particularly, this task executing units 230 is called the RMI service on receiving terminal server 200, make this receiving terminal server 200 as tasks carrying entity, carry out from transmitting terminal server 100, receive for send the RMI task of IM information to receiving terminal client 20.
In step S370, to receiving terminal client, send information.
Like this, once this task executing units 230 has been carried out for this RMI task, the IM message being sent to the second user by first user that receiving terminal server 200 can comprise this RMI task is sent to this receiving terminal client 20, and presents to the second user.
Although for convenient, only the process of the unidirectional IM communication from transmitting terminal client 10 to transmitting terminal server 100 to receiving terminal server 200 to receiving terminal client 20, illustrate according to the information processing method of the embodiment of the present invention and information processing system hereinbefore, but obviously these embodiments of the invention also can be applied to the process of the rightabout IM communication from receiving terminal client 20 to receiving terminal server 200 to transmitting terminal server 100 to transmitting terminal client 10.
At this moment, with in transmitting terminal server 100 similarly, at receiving terminal server 200, also will comprise a heartbeat delivery unit 240, for constantly transmitting heartbeat messages to described state server 300, to show that described receiving terminal server 200 is in active state.
In addition, if in step S310, first user 10 is not to wish to transmitting IM information with the second user 20 who oneself belongs to different server, but wish to transmit this IM information to the 3rd user 30 who belongs to equally transmitting terminal server 100, in one example, can carry out above-mentioned step S310 to S370, to adopt the method for task call to realize this operation.
Yet in another example, for the processing resource of the system of saving, whether the recipient that can first judge this IM information in this transmitting terminal server 100 is among the service in oneself.If so,, according to prior art, use XMPP agreement directly to it, to transmit this IM information, and do not carry out the process of any task call.
As can be seen here, employing is according to the information processing method of the embodiment of the present invention and information processing system, and in initial phase, each Openfire server adds information processing system as clustered node, using as a service node, and distribute a unique identifier by information processing system.Next, each service node, in operation, is periodically submitted to running status on state server by heartbeat message.For example, this state information at least comprises: identifier server, RMI URL, active state, the client of serving etc.In tasks execution phases, the job invocation that transmitting terminal server will be carried out is in own task queue, by scheduler module, from task queue, obtained after a task, query State server is to find the nodal information (the RMI URL that comprises this node) of the service node of appointment, the RMI that the RMI URL providing by this node calls on this node serves, so just task transfers is carried out to this service node, to realize instant messaging.
Therefore, in an embodiment of the present invention, realized following beneficial effect:
1. use Java RMI as the communication realization of information processing system, simplified programming complexity.Java RMI is that the built-in RMI of Java language is realized, it be a process fully test with practice test cross, reliable communications protocol efficiently, so the task scheduling of utilizing it to realize between cluster interior nodes is relatively again developed and write agreement, simple, reliable and efficient.
2. use the conventional at present KV database of increasing income (as Redis or Memcached) as state server.The configuration information of safeguarding unity on state server, can dynamically add and delete server, has simplified deployment operation.In addition, current KV database has had the realization of increasing income of a lot of maturations, cheapness, and has the scheme of multiple high expansion, system cost is further reduced, and have high reliability.
3. all nodes are peer node, only need to unify address information and the RMI serve port of configuration status server.
It should be noted that, although for convenient, hereinbefore transmitting terminal server and receiving terminal server are described as independent server, in practice, in order to realize two-way communication, each service node can comprise all unit in transmitting terminal server and receiving terminal server.
In addition, although using hereinbefore Java RMI as the communication implementation in information processing system and using key assignments (K-V) database of increasing income and described embodiments of the invention as the implementation of state server, but it should be noted that, the invention is not restricted to this.In this information processing system, also can use other communication implementations with identical characteristics, and this state server also can adopt the database of other types and realize in centralized mode, or the ground that distributes is realized in each service node.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add essential hardware platform by means of software and realize, and can certainly all by software or hardware, implement.Understanding based on such, what technical scheme of the present invention contributed to background technology can embody with the form of software product in whole or in part, this computer software product can be stored in storage medium, as ROM/RAM, disk, CD etc., comprise that some instructions are with so that a computer equipment (can be personal computer, server, or the network equipment etc.) carry out the method described in some part of each embodiment of the present invention or embodiment.
Describe each embodiment of the present invention in the above in detail.Yet, it should be appreciated by those skilled in the art that without departing from the principles and spirit of the present invention, can carry out various modifications to these embodiment, combination or sub-portfolio, and such modification should fall within the scope of the present invention.

Claims (27)

1. an information processing method, described method is applied to the transmitting terminal server in information processing system,
Described information processing system at least comprises described transmitting terminal server and receiving terminal server, and described transmitting terminal server is connected to transmitting terminal client, and described receiving terminal server is connected to receiving terminal client,
It is characterized in that, described method comprises:
When described transmitting terminal client sends information to described receiving terminal client, from information described in described transmitting terminal client;
Information generated sends task, and described information transmission task is for sending described information to described receiving terminal client;
Task call address based on described receiving terminal server is set up task call and is connected between described transmitting terminal server and described receiving terminal server; And
By described task call, connect to described receiving terminal server and send described information transmission task, so that described receiving terminal server is carried out described information, send task, thereby send described information to described receiving terminal client.
2. according to the method for claim 1, it is characterized in that, described information processing system also comprises state server, identifier, task call address and the be connected client of described state server for storing described transmitting terminal server and described receiving terminal server, and
Described method also comprises:
To described state server, inquire about the identifier of the described receiving terminal server that described receiving terminal client is connected to; And
According to the identifier of described receiving terminal server, determine the task call address of described receiving terminal server.
3. according to the method for claim 2, it is characterized in that, described state server is also for storing the active state of described transmitting terminal server and described receiving terminal server, and
Described method also comprises:
According to the identifier of described receiving terminal server, judge the active state of described receiving terminal server;
If judge described receiving terminal server in inactive state, abandon described information and send task; And
If judge described receiving terminal server in active state, determine the task call address of described receiving terminal server according to the identifier of described receiving terminal server.
4. according to the method for claim 3, it is characterized in that, described method also comprises:
To described state server, transmit heartbeat message, described heartbeat message is for showing that to described state server described transmitting terminal server is in active state.
5. according to the method for claim 4, it is characterized in that, described heartbeat message comprises: the identifier of described transmitting terminal server, task call address and be connected client.
6. according to the method for claim 2, it is characterized in that, described state server adopts key assignments (K-V) database to realize.
7. according to the method for claim 1, it is characterized in that, described task call address is Java RMI (RMI) URL(uniform resource locator) (URL).
8. an information processing method, described method is applied to the receiving terminal server in information processing system,
Described information processing system at least comprises transmitting terminal server and described receiving terminal server, and described transmitting terminal server is connected to transmitting terminal client, and described receiving terminal server is connected to receiving terminal client,
It is characterized in that, described method comprises:
Task call address based on described transmitting terminal server is set up task call and is connected between described transmitting terminal server and described receiving terminal server;
By described task call, connect to come from described transmitting terminal server reception information to send task, described information transmission task is for sending described information to described receiving terminal client; And
Carry out described information and send task, thereby send described information to described receiving terminal client.
9. method according to Claim 8, is characterized in that, described information processing system also comprises state server, the active state of described state server for storing described transmitting terminal server and described receiving terminal server, and
Described method also comprises:
To described state server, transmit heartbeat message, described heartbeat message is for showing that to described state server described receiving terminal server is in active state.
10. according to the method for claim 9, it is characterized in that, described state server is also for storing identifier, task call address and the be connected client of described transmitting terminal server and described receiving terminal server, and
Described heartbeat message comprises: the identifier of described receiving terminal server, task call address and be connected client.
11. according to the method for claim 9, it is characterized in that, described state server adopts key assignments (K-V) database to realize.
12. methods according to Claim 8, is characterized in that, described task call address is Java RMI (RMI) URL(uniform resource locator) (URL).
13. 1 kinds of transmitting terminal servers, described transmitting terminal server belongs to information processing system, and described information processing system at least comprises described transmitting terminal server and receiving terminal server, and described transmitting terminal server is connected to transmitting terminal client, described receiving terminal server is connected to receiving terminal client
It is characterized in that, described transmitting terminal server comprises:
Information receiving unit, for when described transmitting terminal client sends information to described receiving terminal client, from information described in described transmitting terminal client;
Task generation unit, sends task for information generated, and described information transmission task is for sending described information to described receiving terminal client;
Connect and to set up unit, for the task call address based on described receiving terminal server, be connected setting up task call between described transmitting terminal server and described receiving terminal server; And
Task transmitting element, sends described information transmission task for connecting by described task call to described receiving terminal server, sends task, thereby send described information to described receiving terminal client so that described receiving terminal server is carried out described information.
14. according to the transmitting terminal server of claim 13, it is characterized in that, described information processing system also comprises state server, identifier, task call address and the be connected client of described state server for storing described transmitting terminal server and described receiving terminal server, and
Described transmitting terminal server also comprises:
Identifier query unit, for inquiring about the identifier of the described receiving terminal server that described receiving terminal client is connected to described state server; And
Address determining unit, for determining the task call address of described receiving terminal server according to the identifier of described receiving terminal server.
15. according to the transmitting terminal server of claim 14, it is characterized in that, described state server is also for storing the active state of described transmitting terminal server and described receiving terminal server, and
Described transmitting terminal server also comprises:
State judging unit, for judge the active state of described receiving terminal server according to the identifier of described receiving terminal server, if judge described receiving terminal server in inactive state, abandons described information and sends task; And if judge described receiving terminal server in active state, notify described address determining unit according to the identifier of described receiving terminal server, to determine the task call address of described receiving terminal server.
16. according to the transmitting terminal server of claim 15, it is characterized in that, described transmitting terminal server also comprises:
Heartbeat delivery unit, for transmitting heartbeat message to described state server, described heartbeat message is for showing that to described state server described transmitting terminal server is in active state.
17. according to the transmitting terminal server of claim 16, it is characterized in that, described heartbeat message comprises: the identifier of described transmitting terminal server, task call address and be connected client.
18. according to the transmitting terminal server of claim 14, it is characterized in that, described state server adopts key assignments (K-V) database to realize.
19. according to the transmitting terminal server of claim 13, it is characterized in that, described task call address is Java RMI (RMI) URL(uniform resource locator) (URL).
20. 1 kinds of receiving terminal servers, described receiving terminal server belongs to information processing system, and described information processing system at least comprises transmitting terminal server and described receiving terminal server, and described transmitting terminal server is connected to transmitting terminal client, described receiving terminal server is connected to receiving terminal client
It is characterized in that, described receiving terminal server comprises:
Connect and to set up unit, for the task call address based on described transmitting terminal server, be connected setting up task call between described transmitting terminal server and described receiving terminal server;
Task receiving element, sends task for connecting to come from described transmitting terminal server reception information by described task call, and described information transmission task is for sending described information to described receiving terminal client; And
Task executing units, sends task for carrying out described information, thereby sends described information to described receiving terminal client.
21. according to the receiving terminal server of claim 20, it is characterized in that, described information processing system also comprises state server, the active state of described state server for storing described transmitting terminal server and described receiving terminal server, and
Described receiving terminal server also comprises:
Heartbeat delivery unit, for transmitting heartbeat message to described state server, described heartbeat message is for showing that to described state server described receiving terminal server is in active state.
22. according to the receiving terminal server of claim 21, it is characterized in that, described state server is also for storing identifier, task call address and the be connected client of described transmitting terminal server and described receiving terminal server, and
Described heartbeat message comprises: the identifier of described receiving terminal server, task call address and be connected client.
23. according to the receiving terminal server of claim 21, it is characterized in that, described state server adopts key assignments (K-V) database to realize.
24. according to the receiving terminal server of claim 20, it is characterized in that, described task call address is Java RMI (RMI) URL(uniform resource locator) (URL).
25. 1 kinds of information processing systems, is characterized in that, described information processing system comprises:
According to the transmitting terminal server of any one in claim 13 to 19;
According to the receiving terminal server of any one in claim 20 to 24; And
State server, identifier, task call address and the be connected client of described state server for storing described transmitting terminal server and described receiving terminal server.
26. according to the information processing system of claim 25, it is characterized in that, described state server is also for storing the active state of described transmitting terminal server and described receiving terminal server.
27. according to the method for claim 25, it is characterized in that, described state server adopts key assignments (K-V) database to realize.
CN201310084536.1A 2013-03-15 2013-03-15 information processing method, server and system Active CN104052723B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310084536.1A CN104052723B (en) 2013-03-15 2013-03-15 information processing method, server and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310084536.1A CN104052723B (en) 2013-03-15 2013-03-15 information processing method, server and system

Publications (2)

Publication Number Publication Date
CN104052723A true CN104052723A (en) 2014-09-17
CN104052723B CN104052723B (en) 2017-05-24

Family

ID=51505095

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310084536.1A Active CN104052723B (en) 2013-03-15 2013-03-15 information processing method, server and system

Country Status (1)

Country Link
CN (1) CN104052723B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105451091A (en) * 2015-11-18 2016-03-30 Tcl集团股份有限公司 Instant message processing method based on concurrent communication and system thereof
CN106506490A (en) * 2016-11-03 2017-03-15 深圳智高点知识产权运营有限公司 A kind of Distributed Calculation control method and distributed computing system
CN107040455A (en) * 2017-05-27 2017-08-11 北京思特奇信息技术股份有限公司 A kind of instant messaging communication method and system based on redis
CN109068183A (en) * 2018-08-08 2018-12-21 湖南快乐阳光互动娱乐传媒有限公司 A kind of live streaming barrage distribution method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7228353B1 (en) * 2002-03-28 2007-06-05 Emc Corporation Generating and launching remote method invocation servers for individual client applications
CN101504764A (en) * 2009-01-19 2009-08-12 西安交通大学 Ancient architecture oil-decorative painting virtual repairing system and method
CN102202102A (en) * 2011-07-05 2011-09-28 施昊 Network service polymerization system and polymerization method thereof based on cloud computing configuration

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7228353B1 (en) * 2002-03-28 2007-06-05 Emc Corporation Generating and launching remote method invocation servers for individual client applications
CN101504764A (en) * 2009-01-19 2009-08-12 西安交通大学 Ancient architecture oil-decorative painting virtual repairing system and method
CN102202102A (en) * 2011-07-05 2011-09-28 施昊 Network service polymerization system and polymerization method thereof based on cloud computing configuration

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105451091A (en) * 2015-11-18 2016-03-30 Tcl集团股份有限公司 Instant message processing method based on concurrent communication and system thereof
CN105451091B (en) * 2015-11-18 2019-09-10 Tcl集团股份有限公司 It is a kind of based on the instant message processing method concurrently communicated and system
CN106506490A (en) * 2016-11-03 2017-03-15 深圳智高点知识产权运营有限公司 A kind of Distributed Calculation control method and distributed computing system
CN106506490B (en) * 2016-11-03 2019-07-09 深圳智高点知识产权运营有限公司 A kind of distributed computing control method and distributed computing system
CN107040455A (en) * 2017-05-27 2017-08-11 北京思特奇信息技术股份有限公司 A kind of instant messaging communication method and system based on redis
CN107040455B (en) * 2017-05-27 2021-05-11 北京思特奇信息技术股份有限公司 Instant message communication method and system based on redis
CN109068183A (en) * 2018-08-08 2018-12-21 湖南快乐阳光互动娱乐传媒有限公司 A kind of live streaming barrage distribution method and device

Also Published As

Publication number Publication date
CN104052723B (en) 2017-05-24

Similar Documents

Publication Publication Date Title
US10367852B2 (en) Multiplexed demand signaled distributed messaging
CN102355413B (en) A kind of method of extensive unified message space in real time and system thereof
US7805407B1 (en) System and method for dynamic configuration of replicated database servers
CN105338086A (en) Distributed message forwarding method
CN105407180A (en) Server message pushing method and device
CN105472042A (en) WEB terminal controlled message middleware system and data transmission method thereof
CN105338061A (en) Lightweight message oriented middleware realization method and system
US8606908B2 (en) Wake-up server
CN102158346A (en) Information acquisition system and method based on cloud computing
CN105373420A (en) Data transmission method and apparatus
CN104052723A (en) Information processing method and server
CN103179009B (en) A kind of dynamic self-adapting call method of distributed management system
CN104320441A (en) Method of sharing information between wireless communication systems
CN111124717A (en) Message delivery method, system and computer storage medium
CN108259605B (en) Data calling system and method based on multiple data centers
CN103186536A (en) Method and system for scheduling data shearing devices
CN105450589A (en) Remote procedure call method and system
CN103338160B (en) Based on optimization system and the optimization method of the polling service of buffer queue
CN109063140A (en) A kind of data query method, transfer server and computer readable storage medium
CN116055499A (en) Method, equipment and medium for intelligently scheduling cluster tasks based on redis
CN114598662A (en) Message queue cluster federal management system and method
CN113727138A (en) HLS intranet source returning method
Hou et al. Design scheme for data transmission component of electric internet of things management platform
CN112910796A (en) Traffic management method, apparatus, device, storage medium, and program product
CN111541667A (en) Method, equipment and storage medium for intersystem message communication

Legal Events

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