Disclosure of Invention
The invention aims to solve the technical problem of providing a method and a system for realizing information service in an instant messaging mode, and simultaneously solves the problems that a user can establish communication connection with a server side without knowing a communication ID of the server side, and message contents are only displayed in message windows of two communication sides.
In order to solve the above technical problem, the present invention provides an information service method in instant messaging, comprising:
a user client sends a service request;
the server distributes a service client for a user client sending a request corresponding to a preset distribution strategy, and establishes communication connection between the user client and the service client;
and the user client terminal establishing the communication connection acquires the information data from the service client terminal.
Wherein the allocation policy is executed according to the following steps: searching a service client corresponding to the user authority; the service clients corresponding to the user authority are grouped according to the number of the user clients establishing communication connection, and a group with the least number is selected; grouping the service clients in the group according to the number of the user clients establishing communication connection in a preset time period, and selecting one group with the minimum number; a service client is randomly selected in the group.
Wherein, the following steps are executed to obtain the information data: a user client sends a message, and a server sends the message to a service client which establishes communication connection with the user client; the service client corresponds to at least one user client and sends a message containing a communication ID, and the server sends the message to the user client corresponding to the ID.
Preferably, the method further comprises the following steps: and binding the user client with the searched service client, and directly establishing communication connection with the bound logged-in service client when the user client sends a request again within a preset time period.
Wherein the service client provides information data within a predetermined time period.
Wherein the service client provides artificial information service.
The invention also provides an information service system in instant messaging, which comprises an instant messaging client and an instant message server, and is characterized by also comprising an information management server and a database:
the instant messaging client is used for carrying out message transmission with the instant messaging server and comprises a first communication terminal and a second communication terminal, wherein the first communication terminal acquires information data from the second communication terminal;
the instant message server is used for carrying out message transmission with the information management server and forwarding the communication message between the instant communication client and the information management server;
the database is used for storing communication connection information between the first communication terminal and the second communication terminal;
the information management server is used for distributing a second communication terminal for the first communication terminal sending the request corresponding to a preset distribution strategy and establishing communication connection between the first communication terminal and the second communication terminal; and forwarding the communication message between the first communication terminal and the second communication terminal corresponding to the communication connection information in the database.
Wherein the allocation policy comprises: searching a second communication terminal corresponding to the authority of the first communication terminal; the second communication terminals with the corresponding authority are grouped according to the number of the first communication terminals establishing communication connection, and a group with the least number is selected; grouping the second communication terminals in the group according to the number of the first communication terminals establishing communication connection in a preset time period, and selecting one group with the minimum number; a second communication terminal is randomly selected from the group.
Preferably, the database further stores binding information between the first communication terminal and the found second communication terminal, and the first communication terminal directly establishes communication connection with the bound second communication terminal when sending the request again within a predetermined time period.
Wherein the forwarding comprises: searching the communication connection information in the database, and forwarding the message sent by the first communication terminal to the corresponding second communication terminal; the second communication terminal corresponds to at least one first communication terminal, and the message which is sent by the second communication terminal and contains the communication ID is forwarded to the first communication terminal corresponding to the ID.
Compared with the prior art, the invention has the following advantages:
firstly, a communication connection between instant communication clients is established by adopting an allocation mechanism, and a service client is allocated to a user client sending a request message in time for each communication, so that a user can establish the communication connection with a service party without knowing a communication ID of the service client. The instant communication mode can flexibly establish communication connection between the clients, and is convenient for users to obtain required information in time in the application of information service.
Secondly, through the communication connection established by the allocation mechanism, the server forwards the message sent by the user client to the service client which establishes the communication connection with the user client, the message sent by the service client contains the communication ID, and the server forwards the message to the corresponding user client according to the communication ID. In this way, the message window of the user client displays only the message content with the communication service side, and does not display the communication ID of the other party. The information which can be obtained from the service side is different for users with different authorities, so the invention can ensure the information security of the service provider and the accuracy of the information obtained by the users. And the service client can display the communication ID of the user client, so that one service client can establish communication connection with a plurality of user clients simultaneously, and the information providing efficiency of a service party is improved.
Again, the allocation mechanism enables management of the service clients. All the service clients participate in each distribution, namely the service client which has already established communication connection is also possible to establish connection with other users again, and the service client which is relatively idle is selected each time to establish connection with the user client which sends the request, so that the user client is prevented from waiting for the request connection, and the service provider is ensured to provide information service for the user in time. Through the distribution management of the service client, under the condition that the resource allocation of the service end is limited, the information service can be rapidly, effectively and comprehensively provided, and the practicability and operability of the invention are improved.
And thirdly, binding the service client with the user client establishing the communication connection by adopting a binding mechanism, and directly establishing the connection with the service client communicating last time when the user sends the connection request again within a certain time period, so that the distribution is avoided according to the distribution principle again. Moreover, the binding mechanism enables the user client to obtain the service information from the same service client within a certain time period, and the effect of obtaining the service information by the user is improved.
The application of the information service in the instant messaging not only realizes the functions that the user can establish communication connection with the server side without knowing the communication ID of the server side and the message content is only displayed in the message windows of both communication sides, but also greatly improves the defects under the telephone communication mode. Under the instant messaging mode, mainly through the word communication, do not receive factors such as environment influence, can also transmit the file, improved the information acquisition effect. And moreover, the service client end which establishes communication connection with the user provides manual information service, so that the accuracy of information transmission is ensured.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The core idea of the invention is as follows: the user client and the service client log in the instant communication software, when the user client obtains the required information from the service client, the server distributes a relatively idle service client to the user client sending the request according to the distribution strategy, establishes the communication connection between the user client and the service client, and ensures that the service client provides the information for the user client in time.
The invention realizes the information service function in the instant communication technology, divides the client into a user client and a service client in an instant communication system comprising an instant communication client and an instant communication server, and the service client can simultaneously provide information data for a plurality of user clients. Referring to fig. 1, a flow chart of an information service method in instant messaging according to the present invention is shown.
Step 101, a user client and a service client log in. The user client and the service clients needing to acquire information log in a client program through user names and passwords, and because the user name information stored in the server is unique, the communication ID (such as the user name information) for identifying the identity of the client corresponds to the clients (including the user clients or the service clients) one by one. The server authenticates the user client or the service client which requests to log in. After the verification is successful, the user client can send a service request to the server, and the service client starts to receive the request and provide information service.
Step 102, the server allocates a service client to the user client sending the request. After receiving the service request, the server allocates a service client to the user client according to the strategy of searching for the idle service client in the logged-on service clients. If a logged-in service client is found, establishing communication connection between the service client and a user client, and the service client can provide information data for the user client; otherwise, the server returns a message to inform the user that the client request is unsuccessful.
The distribution strategy adopted by the invention is as follows: because the user client has different authorities, the information data acquired from the service client is different, and therefore the service client is grouped corresponding to different authorities. Firstly, searching a corresponding service client in a plurality of service clients according to user authority. Secondly, in the service clients corresponding to the user authority, the service clients are grouped according to the number of the user clients establishing communication connection, for example, one group of service clients establishing connection with 6 user clients and one group of service clients 5 are sequentially sequenced, and the group with the least number of the user clients is selected. If there are no idle service clients, a group of service clients that establish connections with the fewest user clients is selected. And thirdly, grouping the service clients in the group according to the number of the user clients establishing communication connection in a preset time period, for example, in the time of one day, sequentially sorting a group of service clients establishing connection with 6 user clients and a group of 5 user clients, and selecting a group with the minimum number. Finally, a service client is randomly selected from the group.
And 103, communicating the user client with the service client to acquire information data. After the user client side and the service client side successfully establish communication connection, the user client side can obtain required information from the service client side in an instant communication mode. Because only one service client is connected with the user client in each communication, the user client sends a message to the server, and the server directly sends the message to the corresponding service client; the message sent by the service client to the server contains the communication ID of the user client, and the server sends the message to the corresponding user client according to the ID, so that one service client can establish communication connection with a plurality of user clients simultaneously.
The communication connection between the instant communication clients is established by adopting the allocation mechanism, and each communication is realized by allocating a service client to the user client sending the request message in time, so that the user client can establish the communication connection with the service client without knowing the communication ID of the service client. In addition, only the message content of the communication service client is displayed in the message window of the user client, so that the invention can ensure the information security of the service client and the accuracy of the information acquisition of the user. The instant communication mode can flexibly establish communication connection between the clients, and is convenient for users to obtain required information in time in the application of information service.
The following description will use the implementation of the service hotline in the instant messaging system as an example to describe the process of the user obtaining the required information from the service provider in the instant messaging manner. In this embodiment, the service client provides manual service, and the service staff provides information service for the user, where each service staff corresponds to one service client, that is, each service corresponds to one communication ID.
Fig. 2 is a structural diagram of an instant messaging system for providing information services according to an embodiment of the present invention. In the hotline service, when a user consults customer service for service information, a communication connection is established through an internet-based instant messaging system. As shown in the figure, both the user and the customer service personnel log in the client program (program installed on the computer), and establish the connection between the user client 201 and the service client 202 and the server 203 through the internet. The user client 201 and the service client 202 are instant messaging clients, each user client corresponds to one service client, and each service client can simultaneously correspond to a plurality of user clients. The server 203 includes: an instant message server 204, a multi-party chat server 205, a hotline server 206, a message input server 207, a message output server 208 and a file transfer server 209. The instant message server 204 is responsible for processing instant messages sent by the instant messaging client; the multi-party chat server 205 is responsible for processing instant message transmission simultaneously performed by a plurality of instant messaging clients; the hotline server 206 is responsible for establishing communication connection between the user client 201 and the service client 202 in the invention; the message input server 207 and the message output server 208 are responsible for inputting and outputting messages with the instant messaging client; the file transfer server 209 is responsible for file transfer between instant messaging clients.
The user client 201 and the service client 202 transmit data to the server 203 through the external data exchange network 210, and the plurality of servers transmit data to the server through the internal data exchange network 211. In the invention, the instant communication client communicates with the instant message server directly, and the instant message server communicates with the hotline server directly. The system further includes a database 212 for storing data processed by the system, and storing data such as communication connection records between the user client 201 and the service client 202 when the hotline service function is provided according to the present invention.
The invention takes the internet as a basic platform, adopts a Transmission Control Protocol (TCP) as a basic communication Protocol, combines a client, a server and an internal Protocol to realize the communication between a user and a service provider, and the internal Protocol is used for establishing the communication connection between the user client and the service client. The above is the system environment for implementing the service hotline in instant messaging, and the implementation process will be described in detail below.
Fig. 3a is a flowchart illustrating a login process of a user client according to an embodiment of the present invention.
Step 3a1, the user opens the client program at the communication terminal.
Step 3a2, enter a username and password in the client program, and then start login.
Step 3a3, sending login request to the instant message server to verify the user name and password.
Step 3a4, the server verifies the user name and the password, and if the user name and the password pass, the login is successful; otherwise, returning to step 3a2, the user reenters the username and password. Typically, the server gives the user the opportunity to re-enter several times.
Fig. 3b is a flowchart illustrating login of the service client according to an embodiment of the present invention. The service client and the user client are both used as instant communication clients, and the login steps of the service client are the same as those of the user client, so detailed description is omitted. However, when the server verifies the user name, the user client and the service client are identified by the communication ID corresponding to the user name. For the user client, because different users have different authorities, such as free users and paid users, the service information which can be obtained is different, when the user requests the service which does not correspond to the authority, prompt information is displayed on the user client to inform the user that the user can not apply for the service. For the service client, after login is successful, the service function is started, and the service request can be received.
Referring to fig. 4, a flowchart of establishing a communication connection between a user client and a service client in the embodiment of the present invention is shown, where the flowchart describes the user client and the service client after having logged in.
Step 401, the user client sends a service request to the instant message server.
At step 402, the hotline server receives a service request from a user. The instant message server forwards the user request to the hotline server.
Step 403, the hotline server searches for the registered relatively idle customer service staff, if the registered relatively idle customer service staff are found, one customer service is distributed to the user, and the step 404 is continued; otherwise, step 405 is executed to notify the user that no customer service personnel is currently online.
The distribution strategy adopted by the invention is as follows: first, all customer services that match the user's identity are looked up. If the grades correspond to each other, the free users correspond to free customer service, and the paid users correspond to paid customer service; for example, the region corresponds to the general customer service, the domestic user corresponds to the general customer service, and the international user corresponds to the English customer service. Secondly, the registered customer service is sorted according to the number of users currently served by the customer service. For example, all of the customers are servicing a group of 6 users, a group of 5 users, and so on, a group of one-to-one customers, and a group of idle customers. A group of services with the least number of people to be served is selected, and if each service is also serving at least one user, a one-to-one service group is selected. And thirdly, sorting the selected group of customer services in groups according to the number of users already served by the customer service in a preset time period (usually the current day), and finding out the group with the minimum number of people served in the current day in the group of customer services as described above. And finally, randomly selecting one customer service from the several customer services found out, and distributing the customer service to the user requesting the service. Therefore, the idle customer service staff means the service client found by the allocation mechanism, and the customer service may be idle or may be providing services for other users, which is different from the idle customer service in the case that one customer service corresponds to only one user.
Other methods can be adopted for searching the customer service in the logged-in customer service staff, such as only searching the idle customer service, that is, one customer service can only correspond to one user; allocation policies may also be formulated according to different applications. In the invention, the distribution mechanism can manage the service client. All the service clients participate in each distribution, namely the service client which has already established communication connection is also possible to establish connection with other users again, and the service client which is relatively idle is selected each time to establish connection with the user client which sends the request, so that the user client is prevented from waiting for the request connection, and the service provider is ensured to provide information service for the user in time. Through the distribution management of the service client, under the condition that the resource allocation of the service end is limited, the information service can be rapidly, effectively and comprehensively provided, and the practicability and operability of the invention are improved.
At step 404, the user and the customer service establish a communication connection. Establishing a communication connection between a user client and a service client on a server, sending a request message of the user to a customer service staff, and then carrying out instant communication between the user and the selected customer service staff.
Step 405, notify the user that no customer service personnel are currently online. And displaying prompt information at the user client to inform the user that no customer service personnel log in at present.
Referring to fig. 5a and 5b, a communication flow diagram between the user client and the service client in the embodiment of the present invention is shown, where the flow describes the user client and the service client that have logged on and established a communication connection. As shown in fig. 5 a:
step 5a1, the user sends out a message. When the user obtains the needed information from the customer service, the user sends the information to the instant message server.
Step 5a2, the message is transmitted to the hotline server. The instant message server forwards the message to the hotline server.
Step 5a3, find the corresponding customer service. And the hot line server finds the customer service establishing communication connection with the user and forwards the message to the corresponding customer service.
As shown in fig. 5 b:
step 5b1, the customer service sends out a message. After receiving the message from the user, the customer service provides the service information for the user and sends a reply message to the instant message server.
Step 5b2, the message is transmitted to the hotline server. The instant message server forwards the message to the hotline server.
Step 5b3, find the corresponding user. And the hot line server finds out the user establishing communication connection with the customer service and forwards the message to the corresponding user. Because the message sent by the customer service contains the communication ID of the user, such as login user name, and the server judges which user the message is forwarded to according to the ID, one customer service can simultaneously serve a plurality of users.
In the field of information services, information that can be obtained from a service provider is different for users with different rights, and the service provider does not need to know the service ID for providing the service to the user. In the instant messaging mode, the message window of the user client only displays the message content of the communication server, but not displays the communication ID of the opposite side, so the invention can ensure the information security of the service provider and the accuracy of the information acquisition of the user. And the service client can display the communication ID of the user client, so that one service client can establish communication connection with a plurality of user clients simultaneously, and the information providing efficiency of a service party is improved.
Through the detailed description, the invention realizes the function of establishing communication connection with the customer service under the condition that the user does not know the communication ID of the other party in the instant messaging. In the communication process, only the message content is displayed in the message window of the user client, so that the information safety of different authorities is ensured. The invention preferably provides manual information service at the service client side to ensure the accuracy of information transmission and the quality of service.
On the basis of the above invention, a preferred embodiment of the invention is described. Referring to fig. 6, a flow chart of the process of the hotline server in the preferred embodiment of the invention is shown. When several hotline customer services are online, the user sends a message to the customer service, and the hotline server starts to process the message.
Step 601, judging whether the service hotline works, if so, continuing to step 602; otherwise, returning the reminding information. Generally, a customer service person who provides information service only provides service within a predetermined time period, and if the user sends a service request to the customer service person at other time, the server can directly remind the user of the out-of-service time.
Step 602, judging whether the user is communicating with the customer service, if yes, directly forwarding the message to the customer service; otherwise, step 603 is performed. And if the user establishes communication connection with a certain customer service, the server directly sends the message to the corresponding customer service.
Step 603, judging whether the user is bound with the service passing through the ditch on the same day, if so, continuing to step 604; otherwise, continue with step 605. The binding refers to establishing an association relationship between a user and a customer service, and after binding, if the user sends a service request again within a preset time period (such as the same day), the same customer service serving the user is provided for the same day, and then the service is provided for the bound user, so that the best service quality is ensured. The method is the preferred step of the invention, the user directly obtains information from the binding customer service, and the distribution is avoided according to a distribution mechanism; and the same customer service who provides service for the user can know the requirements of the bound user relatively, and the effect of obtaining service information by the user is improved.
Step 604, judging whether the binding customer service is on-line, if so, directly forwarding the message to the binding customer service; if not, go to step 605.
Step 605, judging whether customer service capable of providing service exists at present, if yes, continuing to step 606; otherwise, returning a reminding message to inform the user that the customer service is not on-line. If the user does not bind the customer service in the same day or the binding customer service of the user is not on line, the server searches whether the logged-in customer service personnel exist or not. The customer service personnel can only provide service for the user when logging in the working hours.
Step 606, customer service is assigned and bound. If the logged-in customer service staff exist, the hot line server allocates a relatively idle customer service for the user according to the allocation mechanism, then binds the customer service with the user, and forwards the user information to the newly allocated customer service.
The invention also provides an information service system in the instant messaging. Referring to fig. 7, which is a structure diagram of an information service system in instant messaging according to the present invention, the system includes: a first communication terminal 701, a second communication terminal 702, an instant message server 703, an information management server 704, and a database 705.
The first communication terminal 701 and the second communication terminal 702 are instant communication clients, and are configured to perform message transmission with the instant message server 702. The first communication terminal 701 obtains information data from the second communication terminal 702. In the hotline customer service, the first communication terminal 701 is a user client, and the second communication terminal 702 is a service client.
The instant messaging server 703 is an instant messaging server, and is configured to perform message transmission with the information management server 704 in addition to performing message transmission with the first communication terminal 701 and the second communication terminal 702, and forward a communication message between the instant messaging client and the information management server 704. As shown in the figure, the communication process between the first communication terminal 701 and the second communication terminal 702 is as follows: a message sent by a first communication terminal to an information management server (HMS) is firstly sent to an Instant Message Server (IMS), and the IMS forwards the message to the HMS; the HMS sends a first communication terminal message to a second communication terminal which establishes communication connection, the first communication terminal message is sent to the IMS, and the IMS forwards the first communication terminal message to the second communication terminal; after receiving the message, the second communication terminal sends the reply message to the HMS through the IMS according to the steps, and the HMS sends the reply message to the first communication terminal through the IMS to complete one-time communication. The instant message server 703 is further configured to verify login information of the first communication terminal 701 and the second communication terminal 702, where the login information is usually a user name and a password, and the first communication terminal 701 and the second communication terminal 702 can only send and receive messages if the verification is passed.
The information management server 704 is configured to allocate a second communication terminal 702 to the first communication terminal 701 that sends the request according to a preset allocation policy, search whether there is a relatively idle logged-in second communication terminal 702, and if found, establish a communication connection between the first communication terminal 701 and the second communication terminal 702; otherwise, the first communication terminal 701 is notified. The preset allocation strategy can adopt various allocation methods, and the allocation strategy adopted in the invention is as follows: the first communication terminal has different authorities, and the second communication terminal is searched corresponding to the authorities; the second communication terminals with the corresponding authority are grouped according to the number of the first communication terminals establishing communication connection, and a group with the least number is selected; grouping the second communication terminals in the group according to the number of the first communication terminals establishing communication connection in a preset time period, and selecting one group with the minimum number; a second communication terminal is randomly selected from the group. In the application of the service hotline, the allocation strategy is adopted, a relatively idle service client is allocated to the user client in the logged-in service clients, and the function of establishing communication connection with the service client under the condition that the user client does not know the communication ID of the other party is realized in instant messaging. In the communication process, only the message content is displayed in the message window of the user client, so that the information safety of different authorities of the service provider is ensured.
The information management server 704 is configured to search the communication connection information stored in the database 705, and forward a message sent by the first communication terminal 701 to the corresponding second communication terminal 702; the second communication terminal 702 corresponds to at least one first communication terminal 701, and forwards a message containing a communication ID sent by the second communication terminal 702 to the first communication terminal 701 corresponding to the ID. Because the first communication terminal can only correspond to one second communication terminal at a time, and the second communication terminal can establish communication connection with a plurality of first communication terminals at the same time, the message returned by the second communication terminal is provided with the communication ID for being sent to the corresponding first communication terminal.
The database 705 is configured to store communication connection information between the first communication terminal 701 and the second communication terminal 702, such as a connection relationship between a user and a customer service, connection time establishment, a port number, and the like; preferably, the binding information between the first communication terminal 701 and the found second communication terminal 702 is also stored, and the first communication terminal 701 directly establishes communication connection with the bound second communication terminal 702 when sending the request again within a predetermined time period. The information management server 704 allocates or directly searches the bound second communication terminal 702 to the first communication terminal 701 that sent the request according to the communication connection information and the binding information stored in the database 705, and forwards the communication message to the first communication terminal 701 and the second communication terminal 702 that have established communication connection.
In summary, the application of the information service in the instant messaging not only realizes the functions that the user can establish communication connection with the server without knowing the communication ID of the server and the message content is only displayed in the message windows of both communication parties, but also greatly improves the defects in the telephone communication mode. Under the instant messaging mode, mainly through the word communication, do not receive factors such as environment influence, can also transmit the file, improved the information acquisition effect. And moreover, the service client end which establishes communication connection with the user provides manual information service, so that the accuracy of information transmission is ensured.
The above detailed description is given to the information service method and system in instant messaging provided by the present invention, and the specific examples are applied herein to explain the principle and implementation of the present invention, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed. In view of the above, the present disclosure should not be construed as limiting the invention.