WO2017219174A1 - 一种消息发送的方法及装置 - Google Patents

一种消息发送的方法及装置 Download PDF

Info

Publication number
WO2017219174A1
WO2017219174A1 PCT/CN2016/086349 CN2016086349W WO2017219174A1 WO 2017219174 A1 WO2017219174 A1 WO 2017219174A1 CN 2016086349 W CN2016086349 W CN 2016086349W WO 2017219174 A1 WO2017219174 A1 WO 2017219174A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
client
user
translated
identifier
Prior art date
Application number
PCT/CN2016/086349
Other languages
English (en)
French (fr)
Inventor
赵跃
Original Assignee
阿里巴巴集团控股有限公司
赵跃
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司, 赵跃 filed Critical 阿里巴巴集团控股有限公司
Priority to PCT/CN2016/086349 priority Critical patent/WO2017219174A1/zh
Publication of WO2017219174A1 publication Critical patent/WO2017219174A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the present application relates to the field of computer technologies, and in particular, to a method and an apparatus for sending a message.
  • the embodiment of the present application provides a method for sending a message, which is used to solve the problem that messages cannot be interworked between different clients.
  • An embodiment of the present application provides a device for sending a message, which is used to solve the problem that messages cannot be interworked between different clients.
  • An embodiment of the present application provides a method for sending a message, including:
  • a translation rule matching the first client identifier and the second client identifier is selected in the set translation library
  • An embodiment of the present application provides a method for sending a message, including:
  • the first client receives a message input by the user
  • Transmitting the message to the user center based on the user account so that after determining that the user account is a user account pre-registered in the user center, the user center is configured according to the first client identifier and the second a client identifier, selecting a translation rule matching the first client identifier and the second client identifier from a preset translation library, and translating the message, so that the second client can be parsed and processed
  • the translated message sends the translated information to the second client.
  • An embodiment of the present application provides a method for sending a message, including:
  • the user center displays the webpage operation page to the first user and the second user;
  • the user center translates the message into the second client solution according to the translation rule. Parsing and processing the translated message, and transmitting the translated message to the second client.
  • An embodiment of the present application provides an apparatus for sending a message, including:
  • Receiving a module receiving a message sent by the first client
  • a selection rule module when determining that the user account on which the message sent by the first client is based is a user account pre-registered in the user center, according to the first client identifier and the second client included in the message Identifying, by using a preset translation library, a translation rule matching the first client identifier and the second client identifier;
  • a translation module according to the translation rule, translating the message to obtain a translated message, wherein the translated message can be parsed and processed by the second client;
  • the sending module sends the translated message to the second client, so that the second client parses and processes the translated message.
  • An embodiment of the present application provides an apparatus for sending a message, including:
  • Receiving a message module receiving a message input by a user
  • the message sending module sends the message to the user center based on the user account, so that the user center determines that the user account is a user account pre-registered in the user center, according to the first client included in the message.
  • the second client identifier is selected from the preset translation library, and the translation rule matching the first client identifier and the second client identifier is selected, and the message is translated to obtain a second client. Translating and processing the translated message, and transmitting the translated information to the second client.
  • An embodiment of the present application provides an apparatus for sending a message, including:
  • a display module displaying a webpage operation page to the first user and the second user
  • the receiving module receives the first message parameter sent by the first user through the webpage operation page and the second message parameter sent by the second user through the webpage operation page;
  • Determining a module determining a first client identifier corresponding to the first message parameter and a second client identifier corresponding to the second message parameter;
  • the user center can translate the message sent by the first client into a message that enables the second client to parse and process, even if it is a different client, the client can receive the message sent by other clients through the user center.
  • the message thus realizes the intercommunication between different clients, thereby bringing convenience to the user.
  • FIG. 1 is a process of sending a message according to an embodiment of the present application
  • FIG. 3 is a process of sending a transfer request message according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of displaying a contact list corresponding to a second client according to an embodiment of the present disclosure
  • FIG. 5 is a schematic diagram of synchronization of a contact list according to an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of an apparatus for sending a message according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of an apparatus for sending a message according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of an apparatus for sending a message according to an embodiment of the present disclosure.
  • FIG. 1 is a process of sending a message according to an embodiment of the present disclosure, which specifically includes the following steps:
  • S101 Receive a message sent by the first client.
  • the messages sent by different clients usually have their own message format, so the message formats are different. Therefore, in general, messages are usually not interoperable between different clients.
  • the message sent by each client may be translated by the user center, and the receiving client (the receiving message) can be obtained.
  • the client is different from the message that the client that sent the message parses and processes, so that different clients can communicate with each other through the message processing of the user center, so when the first client is When it is determined that the message to be sent by the user is sent to the user of the other client, the message may be sent to the user center, and correspondingly, the user center will also receive the message sent by the first client, and in the subsequent step S102 ⁇ In S103, the message is translated.
  • the user center mentioned here may be a server with a translation function, or a system composed of multiple servers, and the system can translate the message sent by the first client into a second client.
  • the corresponding client that is, different clients developed by different software developers or operators, for example, the client A developed by the software developer A and the client B developed by the software developer are different clients. .
  • S102 When it is determined that the user account on which the message sent by the first client is based is a user account pre-registered in the user center, according to the first client identifier and the second included in the message.
  • the client identifier selects a translation rule that matches the first client identifier and the second client identifier from a preset translation library.
  • the user usually needs to register the user account in the user center to activate the message translation function in the user center, or the user account registered by the user on the first client is only upgraded to the user center (ie, the user is The user account registered in the first client is synchronized to the user center), and the user center translates the message sent by the user through the first client into a translated message that enables the second client to parse and process the message. . Therefore, in the embodiment of the present application, after receiving the message sent by the first client, the user center may determine whether the user account on which the message sent by the first client is based is a user account pre-registered in the user center. If yes, in the subsequent process, the message sent by the first client is translated, and if not, the message sent by the first client is not translated.
  • the user center In order to enable different clients to communicate with each other, the user center needs to translate the message sent by the first client, and since the message formats corresponding to different clients are different, the user center is When translating the message sent by the first client, it is necessary to determine how to translate the message according to the sender of the message (ie the first client) and the recipient of the message (ie the second client).
  • the message sent by the first client usually carries the identifier of the sender of the message, that is, the identifier of the first client, and the identifier of the receiver of the message, that is, the identifier of the second client, therefore,
  • the user center may determine the first client identifier and the second client included in the message.
  • the message sent by the terminal is translated to obtain a translated message that enables the second client (ie, the message recipient) to parse and process.
  • S103 The user center translates the message according to the translation rule, and obtains the translated a message, wherein the translated message can be parsed and processed by the second client.
  • the message can be translated into a standard message according to the selected translation rule, and then the standard message is translated into a second client (ie, The translated message parsed and processed by the message receiver.
  • the user center may perform the message.
  • Translation in the process of translation, the user center can first translate the message into standard information, and then translate the standard information into a message that enables the second client to parse and process, ie, the translated message, The purpose of this is that after receiving the message sent by the first client, the user center usually needs to save the message to prevent the user center from being abnormal during the subsequent translation process or the bug in the translation process. The situation that the message cannot be recovered appears.
  • each server when each server performs data storage (the above mentioned message is essentially data information), it is usually stored according to a certain data format, in other words.
  • the data that can be stored in the server needs to meet the data format defined by the server. Therefore, in the embodiment of the present application, the user Heart when a first message sent by the client for storage, the message needs to be translated into standard message format data user's own center, and the standard message is stored. Then, the user center can further translate the standard message according to the pre-selected translation rules, thereby obtaining a translated message that enables the second client (message receiver) to parse and process.
  • the user center may Based on the standard message, the standard message is re-translated to obtain a translated message that enables the second client to parse and process.
  • the messages sent by the client are usually composed of several parameters, and the parameters are usually divided into two parts, and one part can be collectively referred to as operation type information, and is mainly used for Indicates to the server receiving the message what kind of message the client sends and how the message should be executed.
  • the server may Determining, by the operation type information included in the message, the message belongs to the chat class, and determining, according to the operation type information, how the message should be executed; and another part of the parameters included in the message may be collectively referred to as message content information.
  • the message content information is mainly used to indicate what the specific content in the message is. For example, suppose that the chat message sent by the user to another user through the chat client is: "Will you go out to play tomorrow?", then "you go out to play tomorrow.” Is the expression in the chat message the message content information contained in the chat message.
  • the user center Since the operation type information and the message content information contained in the message are usually different in the expression of the parameter, the user center translates the message (whether the message sent by the first client is translated into standard information) Or translating the standard message into a translated message that enables the second client to parse and process, and separately translating the operation type information and the message content information contained in the message. Specifically, when the user center translates the message sent by the first client, the operation type information and the message content information included in the message may be determined, and then the user center may first determine the first message from the message.
  • the client identifier and the second client identifier respectively select an operation type translation rule for the operation type information in the preset translation library, and a message content translation rule for the message content information, wherein the translation process of the operation type information
  • the user center can translate the operation type parameters included in the operation type information according to the selected operation type translation rules.
  • the specific implementation process may be that the user center sequentially scans the operation types included in the operation type information. Parameters, and according to the selected operation type translation rules, the determined operation type parameters are sequentially translated to obtain standard operation type parameters, and then the user center can encapsulate each standard operation type parameter to obtain standard operation type information.
  • the user center may sequentially translate the message format parameters included in the message content information according to the selected message content translation rule, and the specific implementation process may be that the user center sequentially scans out the message format.
  • the user center when the user center translates the message content information, the user does not translate all the content in the message content information, because the message content information includes plain text information such as text. Usually, the expressions are the same on each client. Therefore, the user center usually does not translate the plain text information contained in the message content information, but the message format parameters other than the plain text information in the message content information. Different clients usually have their own message format parameters, and the message format parameters developed by the client are usually different from the message format parameters set by other clients, that is, when different clients send messages with the same content. The message format parameters included in the messages sent by the respective users are different. Therefore, when the user center translates the message content information, the message format parameters included in the message content information can be translated to obtain standard message format parameters. And then the user center can put each standard message format Plain text information on the number and content of the message contained in the message package encapsulated according to certain rules, so as to obtain a standard message contents information.
  • the user center may use the standard operation type information and the standard according to a certain encapsulation rule.
  • the message content information is encapsulated, the standard message is obtained, and the standard message is saved. Then, in order to enable different clients to communicate with each other, the user center needs to translate the standard message, so that the second client can receive the message.
  • the translated message that can be parsed and processed.
  • the standard message also includes two parts, one part is the standard operation type information mentioned above, and the other part is the standard message content information mentioned above, because the standard operation type information and the standard message content information are The representation of the parameters is usually different. Therefore, when translating standard messages, the user center needs to separately translate the standard operation type information and standard message content information contained in the standard message.
  • the specific process is user center.
  • the standard operation type information and the standard message content information are first determined from the standard message, and then the first client identifier and the second client identifier may be determined according to the message previously sent from the first client (message sender).
  • the operation type translation rules for the standard operation type information are respectively selected in the preset translation library.
  • a message content translation rule for standard message content information wherein the operation type translation rule mentioned herein and the user center proposed above translate the operation type information contained in the message sent by the first client into standard operation type information.
  • the operation type translation rules involved may be the same, that is, the operation type translation rules can help the user center complete the work of converting the operation type information into the standard operation type information, and can also help the user center complete the standard operation type.
  • the information is translated into the translated operation type information, and for the message content translation rule mentioned herein, the message content translation rule may be related to the message content included in the message sent by the first client by the user center mentioned above.
  • the message content translation rules involved in the translation of information into standard message content information are the same, that is, the message content translation rule can help the user center to complete the work of translating the message content information into standard message content information.
  • User Center completes the standard message content letter The message content information translated into translation.
  • the user center may translate the standard operation type parameters included in the standard operation type information according to the selected operation type translation rules, and the specific implementation process may be that the user center sequentially scans out The standard operation type parameters included in the standard operation type information, and according to the selected operation type translation rules, the determined standard operation type parameters are sequentially translated to obtain the translated operation type parameters, and then the user center can The translated operation type parameters are encapsulated according to a certain encapsulation rule, and the translated operation type information is obtained.
  • the translation in the standard message content information is usually in the standard message content information.
  • the standard message format parameter is included. Therefore, the user center can translate the standard message format parameters included in the standard message content information according to the selected message content translation rule.
  • the specific implementation process may be that the user center scans the Standard message format parameters included in the standard message content information, and according to the selected message content translation rules, the determined standard message format parameters are sequentially translated to obtain the translated message format parameters, and then the user center can According to certain packaging rules, each translated message format parameter and The plain text information contained in the standard message content information is encapsulated, and the translated message content information is obtained.
  • the user center may encapsulate the two, and obtain a translated message that enables the second client (the message receiver) to parse and process, and further The translated message is sent to the second client in a subsequent process, so that after receiving the translated message, the second client parses and processes the translated message.
  • S104 The user center sends the translated message to the second client, so that the second client parses and processes the translated message.
  • the translated message can be sent to the second client.
  • the second client may parse and process the translated message after receiving the translated message, and may finally The translated message is displayed in the form of plain text, pictures, etc. to the user who uses the second client (the user who receives the message).
  • the user center can translate the message sent by the first client into a translated message that enables the second client (message receiver) to parse and process
  • the second client The message sent by the first client can be received through the user center.
  • the first client can also receive the message sent by the second client through the user center, thereby implementing message intercommunication between different clients. Convenient for the user.
  • the user terminal may be stolen or lost.
  • the user terminal is stolen or picked up by others, if the user who steals or picks up the terminal is a malicious user, the malicious user Through the terminal, malicious information may be sent to users in the contact list stored by the first client, thereby causing losses to users and users who have lost the terminal.
  • the user center when receiving the message sent by the first client, determines that the first client that sent the message is in a different location (ie, the location where the message is sent and If it is not a common location, the user center can authenticate the first client. And after the first client authentication is passed, the received message is translated, and the translated message is sent to the second client (message receiver), wherein the authentication mentioned herein may include It is not limited to requiring the user to use the first client to input the verification password, the voice verification information, the fingerprint verification information, and the manner in which the user center sends the verification code to the associated device of the first client.
  • the authentication operation of the first client may be cancelled, or It is to reduce the authentication frequency of the first client. Since the user center can detect the first client when sending the message offsite, the user center can prevent the stealing or picking up the user terminal by stealing or losing the user terminal to some extent. The malicious user of the terminal sends a malicious message to the user in the first client contact list, thereby reducing the loss of the user to a certain extent.
  • the first client can also authenticate itself, that is, when the first client monitors itself in the process of sending a message to the second client ( That is, when the location where the first client is located is offsite (that is, the location where the message is sent is not the common location), the user currently using the first client may be authenticated, and after the authentication is passed, the message is sent. Send to the second client.
  • step S102 when the user center receives the message sent by the first client and determines that the message includes the second client identifier, the message sent by the first client may also be used.
  • the user account based on the user account is automatically upgraded to the user account of the user center, and then the message sent by the first client is translated in the subsequent process.
  • the user center may also provide a webpage operation page to each client operator or developer, so that each client operator or developer can input the permission and other in the client in the webpage operation page.
  • the client performs the function of message intercommunication (such as chat function), and inputs the running code and message parameters corresponding to the function into the webpage operation page, so that the user center can be based on each client operator or
  • the running code and message parameters corresponding to each function provided by the developer generate various translation rules, and in the subsequent process, the user center can translate the message sent by the first client for the function into the following according to the translation rules. Make the second client parse and process After the translated message, the specific detailed process is shown in Figure 2.
  • FIG. 2 is a process of generating a translation rule according to an embodiment of the present application, and specifically includes the following steps:
  • S201 The user center displays a webpage operation page to the first user and the second user.
  • the user center usually needs to generate the respective translation rules according to the message parameters provided by the operators of the clients. Therefore, in the embodiment of the present application, when the user center monitors the first user (that is, the first client) When the operator and the second user (ie, the operator of the second client) log in to the user center, respectively, the first user and the second user may be presented with message parameters that enable the first user and the second user to use the respective client.
  • the input webpage operation page is input, so that the first user and the second user input the message parameters of the respective clients into the webpage operation page in a subsequent process.
  • S202 Receive a first message parameter sent by the first user by using the webpage operation page and a second message parameter sent by the second user by using the webpage operation page.
  • the message parameter of the terminal can receive the first message parameter sent by the first user (ie, the message parameter of the first client) and the second message parameter sent by the second user (ie, the second Client's message parameters).
  • the message parameter includes a running code of the message, a message format, and the like.
  • S203 Determine a first client identifier corresponding to the first message parameter and a second client identifier corresponding to the second message parameter.
  • the user center Since the user center generates the translation rules, it needs to determine which two clients are generated for the subsequently generated translation rules, that is, the generated translation rules apply to which two clients communicate with each other, therefore, the user The center needs to receive the first message parameter sent by the first user (ie, the operator of the first client) through the webpage operation page (ie, the message parameter of the first client), and the second user (ie, the operator of the second client) In addition to the second message parameter sent by the webpage operation page (ie, the message parameter of the second client), it is also required to receive the first user and the second user respectively through the webpage operation.
  • the first client identifier and the second client identifier are sent by the page.
  • the specific user may: the first user and the second user may fill in the name of the client in the webpage operation page, and send the name to the user center.
  • the first client identifier for the first client and the second client identifier for the second client may be respectively determined according to the names of the two clients.
  • the first user and the second user may also directly fill in the client identifier corresponding to the respective client in the webpage operation page. Accordingly, the user center may fill in the webpage operation page according to the first user and the second user.
  • the client identifier determines a first client identifier corresponding to the first client, and a second client identifier corresponding to the second client, so that the user center combines the first user and the second user respectively.
  • a message parameter and a second message parameter may be used to determine a first client identifier corresponding to the first message parameter and a second client identifier corresponding to the second message parameter.
  • S204 Generate, according to the first message parameter and the second message parameter, a translation rule corresponding to the first client identifier and the second client identifier.
  • the user center may generate, according to the first message parameter and the second message parameter, corresponding to the first client identifier and the second client identifier.
  • the translation rule, wherein the specific translation mode may be that the user center may respectively use the first message parameter and the second message parameter to represent the message for one and the same message, and then the user center may use the first message parameter for the message.
  • the translation table is used as a translation rule corresponding to the first client identifier and the second client identifier.
  • the translation rule is saved in the translation library, so that after receiving the message sent by the first client, the user center translates the message into the second client according to the translation rule. Translating and processing the translated message and transmitting the translated message to the second client.
  • the user center determines a translation rule corresponding to the first client identifier and the second client identifier Then, the translation rule may be saved in the translation library, so that after receiving the message sent by the first client, the subsequent user center may be based on the first client identifier and the second client identifier included in the message. Determining a translation rule matching the first client identifier and the second client identifier from the translation library, and translating the message sent by the first client to enable the second client to parse according to the translation rule Processing the translated message, and then the user center can send the translated message to the second client, so that the second client can parse the translated message after receiving the translated message. And process, and display the results to the user who is currently using the second client.
  • the first client in addition to the user center can translate the message sent by the first client, the first client can also directly translate the message into a message when the user input message needs to be sent to the second client contact.
  • the translated message can be parsed and processed by the second client, and then the translated message is sent to the second client in a subsequent process.
  • the specific implementation manner may be that the module with the translation function is integrated into the first client.
  • the first client has the function of translating the message input by the user.
  • the module with the translation function can also be integrated on the second client, so that after receiving the message sent by the first client, the second client can first translate the message through the module with the translation function.
  • the translated message can be parsed and processed by the second client, and then the translated message is parsed and processed.
  • the client usually sends the message or service request to be sent by the client to the server corresponding to the client, and the server completes the message. Or the processing of the request. Therefore, in the embodiment of the present application, after receiving the message input by the user, the first client may send the message to the first server corresponding to the first client, and the first After receiving the message, the server may identify the second client identifier that receives the message from the message, thereby determining that the message needs to be forwarded to the user center for processing, and then sending the message to the user center.
  • the user center may send the translated message to the second server corresponding to the second client, and after receiving the translated message, the second server may be based on the user included in the translated message. Identifying (the user is the user receiving the message), determining which user of the second client needs to be sent the translated message, and then translating the translation The subsequent message is sent to the second client, so that after receiving the translated message, the second client may parse and process the translated message, and finally receive the message in the form of text, picture, or the like. The user performs the display.
  • a client sends a transfer request message, a user relationship message, and the like to the second client.
  • the first client sends a transfer request message to the second client. Description.
  • FIG. 3 is a process of sending a transfer request message according to an embodiment of the present application, which specifically includes the following steps:
  • S301 The first client receives a transfer request message input by the user.
  • the user when the user wants to transfer money to other users using the second client (the second client is different from the first client) through the first client, the user may be in the first client.
  • the first client monitors the series of operations performed by the user, and generates a transfer request message according to the series of transfer operations, which is equivalent to performing a transfer request message input by the user, and further In the subsequent process, the transfer request message is sent to the user center, where the transfer request message is equivalent to the transfer request generated by the first client according to a series of transfer operations performed by the user.
  • S302 The first server receives the transfer request message sent by the first client.
  • the first client may send the transfer message to the first server corresponding to the first client, and the first server will also respond accordingly. Receiving a transfer request message sent by the first client.
  • S303 The first server operates the account balance of the first client according to the transfer request message.
  • the first server may according to the transfer amount included in the transfer message.
  • the information and the user account (the user account is registered in the first client), and the amount of funds corresponding to the transfer amount information is deducted from the corresponding first client account balance under the user account, and at the same time, the first server may And determining, according to the second client identifier included in the transfer message, that the transfer message needs to be sent to the user center for translation, and then sending the transfer message to the user center in a subsequent process.
  • S304 The user center receives the transfer request message sent by the first server.
  • the user center may translate the transfer request message sent by the first client through the first server, and obtain The translated transfer request message is parsed and processed by the second client. Therefore, in the embodiment of the present application, after the first server receives the transfer request message sent by the first client, the transfer request message may be sent to the transfer. The server, correspondingly, the transfer server will also receive the transfer request message sent by the first server, and then translate the transfer request message in a subsequent process.
  • S305 The user center selects, according to the first client identifier and the second client identifier included in the transfer message, a translation that matches the first client identifier and the second client identifier from a preset translation library. rule.
  • the user center may determine that the first client identifier included in the transfer request message is the second client identifier, and then according to the first The client identifier and the second client identifier select a translation rule matching the first client identifier and the second client identifier from the preset translation library, and then in the subsequent process, the user center can perform the translation according to the The rule translates the transfer request message sent by the first client, and obtains a translated transfer request message that enables the second client to parse and process.
  • S306 The user center translates the transfer request message according to the translation rule to obtain a translated transfer request message, wherein the translated transfer request message can be used by the second guest
  • the client parses and processes.
  • the user center receives the transfer request message sent by the first server, in order to prevent the user center from being unable to recover the abnormality or bug in the process of translating the above-mentioned transfer message.
  • each server stores data according to a certain data format when the data is stored, that is, the user center will also follow a certain data format.
  • the transfer request message is stored, therefore, in order to be able to store the transfer request message, the user center needs to translate the transfer request message into a standard transfer request message and store the standard transfer request message, wherein the transfer request message usually includes There are transfer operation information for indicating the type of the transfer request message, and transfer data information for indicating the specific content of the transfer request message, and the two kinds of information are usually different in the expression form of the parameter, and therefore, the user center is in the right When the transfer request message is translated, it needs to be separately The transfer request information and the transfer operation transfers data information contained in the message and translates the same specific translation process in Step S103 of FIG 1 above, this is not further described in detail.
  • the standard transfer request message may be translated again, thereby obtaining a translated transfer request message that enables the second client to parse and process, wherein the specific translation is performed.
  • the process is the same as step S103 in FIG. 1 above, and will not be described in detail herein.
  • S307 The user center sends the translated transfer request message to the second server.
  • the user center may translate the transfer request message sent by the first client (transfer message sender) through the first server into a translated transfer message that enables the second client (the transfer message recipient) to parse and process
  • the user center may
  • the translated transfer message is sent to the second server corresponding to the second client, so that the second server can perform the account balance of the second client user that receives the translated transfer request message according to the translated transfer request message. Take action.
  • S308 The second server operates the account balance of the second client according to the translated transfer request message.
  • the second server may transfer according to the transfer
  • the transfer amount included in the message is added to the second client account balance corresponding to the user account, and then the second server may send the translated transfer message to the second client, thereby
  • the second client parses and processes the translated transfer request message.
  • S309 The second server sends the translated transfer request message to the second client, so that the second client parses and processes the translated transfer request message.
  • the second client may parse and process the translated transfer message, and finally Text, pictures, and the like are displayed to the user (the user is a user using the second client), thereby completing the entire transfer process.
  • the second client can receive the funds transferred by the first client through the user center. Accordingly, the first client can also receive the funds transferred by the second client through the user center, so that different clients can also be The transfer operation is carried out, which brings convenience to the user.
  • the user center can also authenticate the first client (the sender of the transfer message), that is, when it is detected that the place where the first client sends the transfer message is not the common location, The user center can authenticate the first client, and when the first client authenticates, the transfer message sent by the first client is translated.
  • the specific authentication method may be that the first client is required to use the first client.
  • the user inputs a verification password, voice verification information, fingerprint verification information, and a manner in which the user center sends a verification code to the associated device of the first client.
  • the authentication operation of the first client may be cancelled. Or reduce the frequency of authentication for the first client. Since the user center can detect the first client when the first client sends the transfer message offsite, the first client can be prevented from stealing or picking up due to the theft or loss of the user terminal. The situation in which the malicious user of the terminal transfers money to the second client used by the malicious user occurs, thereby reducing the loss of the user to a certain extent.
  • the terminal may also authenticate itself, that is, when the first client sends a message to the second client, it detects that the location of itself (ie, the first client) is offsite (ie, the location where the message is sent) If the location is not the usual location, the user currently using the first client may be authenticated, and after the authentication is passed, the message is sent to the second client.
  • the location of itself ie, the first client
  • offsite ie, the location where the message is sent
  • the process of sending the message described above is based on the established user relationship between the users, that is, when the user uses the first client to send a message to the second client used by another user,
  • the contact list corresponding to the second client is retrieved on the interface of the first client, where the contact stored in the contact list corresponding to the second client may be a user using the second client.
  • the user may select a designated contact in the contact list corresponding to the second client according to the contact list corresponding to the second client displayed by the first client (the contact is the user receiving the message), and correspondingly
  • the first client will also determine the contact selected by the user in the contact list corresponding to the second client according to the user's selection operation, and then determine that the message subsequently sent by the user (the message to be sent) is sent to
  • the first client may pop up a message input box to the user, so that after viewing the message input box, the user may input a message to be sent in the message input box, and first After the client receives the message input by the user, since the first client has learned that the message is sent to the second client, the first client may add the first client identifier and the second client to the message.
  • the end identifier further sends the message carrying the first client identifier and the second client identifier to the user center.
  • the first client when the first client displays the contact list corresponding to the second client, the first client may display the contact list together with the contact list corresponding to the first client, as shown in FIG. 3 . .
  • FIG. 4 is a schematic diagram of displaying a contact list corresponding to a second client according to an embodiment of the present disclosure.
  • the contact list corresponding to the second client may be displayed together with the contact list corresponding to the first client on the first client.
  • the user can select a specified contact in the contact list corresponding to the second client (the contact is the user who receives the message), and then complete the subsequent message sending process.
  • the first client may first display the contact list corresponding to the first client to the user, and after monitoring the user performing the specified operation, switch the first client contact list to display a contact list corresponding to the second client, wherein the specified operation may be that the user clicks the specified operation button on the interface displayed by the first client, so that the first client detects that the user clicks the designation.
  • the contact list corresponding to the currently displayed first client is switched to the contact list corresponding to the second client, or when the first client detects that the user performs a specified operation such as sliding, shaking, and the like.
  • the contact list corresponding to the currently displayed first client is switched, and the contact list corresponding to the second client is displayed to the user.
  • the first client may also display the contact corresponding to the second client and the contact corresponding to the first client in the same contact list, and in order to effectively distinguish the client corresponding to each contact.
  • the first client can mark the client to which the contact belongs in front of or behind each contact in the contact list, so that the first client can determine the usage status according to the mark.
  • the first client may determine, according to the designated contact selected by the user, that the message to be sent by the user is sent.
  • the identifier of the first client and the second client is carried in the message sent by the user, so that the user center can select the message matching the message according to the first client identifier and the second client identifier.
  • the translation procedure translates the message.
  • the first client may determine that the message sent by the user based on the contact list is sent by the second client. Then, the first client identifier and the second client identifier are carried in the message input by the user, and the message is sent to the user center.
  • the second client may also synchronize the contact list corresponding to the second client saved by the second client to the user center, that is, the second The client's contact may instruct the user after establishing a contact relationship with the user of the first client.
  • the second server corresponding to the second client synchronizes the contact list corresponding to the second client of the contact saved by the second server to the user center. The purpose of this is to save the contact information of the user's own contact information in addition to the contact information of the contacts other than the user itself.
  • the second client may synchronize the contact list corresponding to the second client of the contact to the user center, and correspondingly, the first client
  • the first client may also synchronize the contact list corresponding to the first client of the user to the user center, and the user center subsequently monitors the first
  • the second client that synchronizes the pre-saved second client may be corresponding.
  • the contact list is synchronized to the first client. Since the contact list corresponding to the second client includes the contact of the second client, the user of the first client may view the list of the contact. The contact is selected in the contact list, and the edited message is sent to the contact of the second client through the user center.
  • the user center may also store each client for the contact list of other clients, in other words, corresponding to each client.
  • the server can synchronize the contact list of the respective client to other clients to the user center. In this way, when the user center needs to send a message to the contact of the second client after the user of the first client needs to be sent, the pre-saved first client can synchronize the contact list of the second client to the first client.
  • the contact of the specified second client may be selected in the contact list (ie, the second client that receives the message sent by the first client subsequently) Contact), correspondingly, after the user of the first client selects the contact of the second client in the contact list, the first client may pass the message sent by the user to the contact of the second client through the first
  • the first server corresponding to the client is sent to the user center, and after receiving the message, the user center may be based on the first client included in the message.
  • the second client identifier determines a translation rule matching the first client identifier and the second client identifier from the preset translation library, and translates the message into a translation according to the translation rule
  • the translated message is parsed and processed by the second client, and then the user center may send the translated message to the second client through the second server corresponding to the second client, so that the second client receives the message.
  • the translated message can be parsed and processed, and the obtained result is presented to the user, as shown in FIG. 5.
  • FIG. 5 is a schematic diagram of synchronization of a contact list according to an embodiment of the present application.
  • user A when user A using client A wants to establish a contact relationship with user B of client B, user A can use client A to send a message for establishing a contact relationship to the client of user B.
  • the message may be sent by the server A to the user center after passing through the server A corresponding to the client A.
  • the user center After receiving the message, the user center can determine that the user A stored in the server A needs to synchronize the contact list corresponding to the client B to the usage center. Therefore, the user center can send the server center to the server A.
  • An instruction causes the server A to synchronize the contact list corresponding to the client B to the user center after receiving the instruction.
  • the user center After receiving the contact list corresponding to the client B by the user A that is synchronized by the server A, the user center can translate the message to obtain a translated message that can be parsed and processed by the client B, and the translated message is obtained.
  • the message is sent to the server B corresponding to the client B.
  • the server B After receiving the translated message sent by the user center, the server B may send the translated message to the client B, and after receiving the translated message sent by the server B, the client B may perform the translation after the translation.
  • the message is parsed and processed, and the result is displayed to User B.
  • client B may send an instruction to server B after monitoring the specified operation such as clicking the consent option, so that server B receives the After the command, the contact information of the user B (the contact information may be the user name, the name, and the like of the user B) may be added to the contact list corresponding to the client B received by the user A, and The server B may also synchronize the contact list of the client A with the contact information of the contact information of the user A (the contact information may be the user name, name, etc. of the user A) into the user center.
  • the contact information of the user B the contact information may be the user name, the name, and the like of the user B
  • the server B may also synchronize the contact list of the client A with the contact information of the contact information of the user A (the contact information may be the user name, name, etc. of the user A) into the user center.
  • the subsequent user centers are in the user center.
  • the user using the first client sends a message to the user of the second client
  • the user of the first client may be synchronized with the contact list corresponding to the second client that is saved in advance (ie, the contact list) All the users stored in the second client belong to the user, and correspondingly, after receiving the contact list synchronized by the user center, the user of the first client may determine to receive the first client in the contact list.
  • the contact of the second client of the sent message, and after determining the contact of the second client, the subsequently sent message may be sent to the contact of the second client through the user center.
  • the specified operation may be performed on the client B (the specified operation may be the user B at the client B).
  • the client B can determine that the message sent by the user B is sent to the client B. Therefore, the client B can call the user center through the server B corresponding to the client B.
  • the client B pre-stored by the center is directed to the contact list corresponding to the client C, and presents the contact list to the user B. After viewing the contact list, the user B may select the user C in the contact list, and input the message sent to the user C on the client B for the currently selected user C.
  • the client B may send the message to the user center through the server B, so that after receiving the message, the user center may according to the client B identifier and the client C identifier included in the message.
  • the preset translation library a translation rule matching the client B identifier and the client C identifier is determined, and according to the translation rule, the message is translated into a translated version capable of being parsed and processed by the client C.
  • the user center can send the translated message to the client C through the server C corresponding to the client C, so that after receiving the translated message, the client C can parse and process the translated message. Then, the result obtained after the processing is presented to the user C.
  • the user may also send a message to the second client used by the unfamiliar contact through the first client.
  • the user sometimes needs to use the second client.
  • An unfamiliar contact ie, a user who does not establish a user relationship with a user using the first client on the second client
  • sends a message eg, a request to establish a friend
  • the first client may input an instruction to send a message to the second client contact, and after receiving the instruction, the first client may display to the user according to the instruction.
  • the user may correspondingly input the user identifier of the second client contact in the interface (the user identifier may be a user account, a mobile phone number, or a mailbox)
  • the first client may find a second client contact that matches the user identifier according to the user identifier, and then display the second client contact.
  • the user can send a message to the second client contact in a subsequent process.
  • the first client monitors the second client that is searched by the user for the second client contact (ie, the first client matches the user identifier according to the user identifier input by the user). After the end contact) performs the specified operation (for example, clicking a button for adding the second client contact as a friend on the display interface of the first client), the first client may display a message for indicating the identity of the user to the user. Entering a box so that the user can enter a message for the second client contact (for the user ID previously entered at the first client) to indicate his or her identity in the message input box, and then In the subsequent process, the message is sent to the second client contact.
  • the first client may add the first client identifier and the first client identifier to the previously received instruction according to the previously received instruction.
  • the first client may also add the previously received user identifier (the user identifier corresponding to the second client contact) to the message.
  • the message is sent through the first server corresponding to the first client.
  • the user center can translate the message sent by the first client, so that the second client can be parsed and The processed translated message is then sent to the second client in a subsequent process.
  • the second client may parse and process the translated message, and then display the translated message to the user of the second client in the form of text, picture, or the like.
  • the message described above may also be a chat message sent by the user to the unfamiliar contact.
  • it may also be a message such as payment, transfer, etc.
  • the user is After the user identifier is input on the interface of the first client, the first client may search for a second client contact that matches the user identifier according to the user identifier, and then the first client monitors that the user is displaying the After the specified operation is performed on the interface of the second client contact, an input box for inputting the transfer amount may be correspondingly popped up, and after viewing the input box, the user may input the desired input to the second in the input box.
  • the transfer amount of the client contact (the transfer amount is the above mentioned message), so that after receiving the transfer amount, the first client can then send the transfer amount to the second in the form of a transfer request message.
  • the client at the same time, in order to enable the user center to successfully translate the transfer request message and enable the second client contact to successfully receive
  • the first client may carry the user identifier (ie, the user identifier corresponding to the second client contact), the first client identifier, and the second client identifier in the transfer request message, such that After receiving the transfer request message sent by the first server by the first server, the user center may translate the transfer request message according to the first client identifier and the second client identifier included in the transfer request message.
  • the second server may be configured according to the translated transfer request message.
  • the user identifier determines which contact of the second client is required to be sent to the second client, and then sends the translated transfer request message to the second client corresponding to the user identifier in the subsequent process. People, and ultimately complete the entire transfer process.
  • the embodiment of the present application further provides a device for sending a message, as shown in FIG. 6, 7, and 8.
  • FIG. 6 is a schematic structural diagram of an apparatus for sending a message according to an embodiment of the present disclosure, which specifically includes:
  • the receiving module 601 receives a message sent by the first client.
  • the selection rule module 602 selects, according to the first client identifier and the second client identifier included in the message, a translation that matches the first client identifier and the second client identifier from the preset translation library. rule;
  • the translation module 603 according to the translation rule, translating the message to obtain a translated message, wherein the translated message can be parsed and processed by the second client;
  • the sending module 604 sends the translated message to the second client, so that the second client parses and processes the translated message.
  • the receiving module 601 receives a message sent by the first server corresponding to the first client, where the message is sent by the first client to the first server;
  • the sending module 604 sends the translated message to the second server corresponding to the second client, so that the second server, after receiving the translated message, translates the message The message is sent to the second client.
  • the translation module 603 translates the message into a standard message according to the translation rule, and translates the standard message into a translated message that can be parsed and processed by the second client.
  • the translation module 603 determines operation type information and message content information included in the message; and for the operation type information, translating the operation type information into standard operation type information according to a preset operation type translation rule Translating, by the message content information, the message content information into standard message content information according to a preset message content translation rule;
  • the translation module 603 determines standard operation type information and standard message content information included in the standard message, and translates the standard operation type information according to a preset operation type translation rule for the standard operation type information. Translated operation type information that can be parsed and processed by the second client; for the standard message content information, according to a preset message content translation rule, Translating the standard message content information into translated message content information that can be parsed and processed by the second client; and encapsulating the translated operation type information and the translated message content information into translated Message.
  • the translation module 603 sequentially translates the operation type parameter included in the operation type information to obtain the standard operation type information;
  • the translation module 603 sequentially translates the message content parameters included in the message content information according to a preset message content translation rule to obtain the standard message content information.
  • the translation module 603 sequentially translates the standard operation type parameter included in the standard operation type information to obtain the translated operation type information;
  • the translation module 603 sequentially translates standard message content parameters included in the standard message content information according to a preset message content translation rule to obtain the translated message content information.
  • the sending module 604 authenticates the first client before sending the translated message to the second client, and determines that the authentication is passed.
  • the message includes at least one of a chat message, a transfer request message, and a message to establish a user relationship.
  • the operation type information in the message includes transfer operation information
  • the message content information includes transfer amount information
  • FIG. 7 is a schematic structural diagram of an apparatus for sending a message according to an embodiment of the present disclosure, which specifically includes:
  • the message sending module 702 sends the message to the user center based on the user account, so that the user center determines that the user account is a user account pre-registered in the user center, according to the first client included in the message. End identifier and second client identifier, selecting a translation rule matching the first client identifier and the second client identifier from a preset translation library, and translating the message to obtain a second The translated message parsed and processed by the client, after the translation The information is sent to the second client.
  • the device also includes:
  • the display module 703 is configured to display a contact list corresponding to the second client.
  • the display module 703 according to the user account, requesting, from the user center, a contact list corresponding to the user account and corresponding to the second client; wherein, corresponding to the user account, The contact list corresponding to the second client is uploaded to the user center in advance by the second client; and the contact list returned by the user center is received and displayed.
  • the receiving message module 701 is configured to determine a contact selected by the user in a contact list corresponding to the second client, and receive a message input by the user for the selected contact;
  • the message sending module 702 carries the first client identifier and the second client identifier in the received message, and sends the message to the user center.
  • the receiving message module 701 receives an instruction that the user inputs a message to the contact of the second client, receives a user identifier of the contact of the second client input by the user, and receives a message input by the user for the user identifier;
  • the message sending module 702 adds the first client identifier and the second client identifier to the message according to the instruction, and adds the user identifier to the message according to the user identifier; A message adding the first client identifier, the second client identifier, and the user identifier is sent to the user center.
  • FIG. 8 is a schematic structural diagram of an apparatus for sending a message according to an embodiment of the present disclosure, which specifically includes:
  • the display module 801 is configured to display a webpage operation page to the first user and the second user;
  • the receiving module 802 is configured to receive a first message parameter that is sent by the first user by using the webpage operation page, and a second message parameter that is sent by the second user by using the webpage operation page;
  • the determining module 803 is configured to determine a first client identifier corresponding to the first message parameter and a second client identifier corresponding to the second message parameter;
  • the generating module 804 is configured to generate, according to the first message parameter and the second message parameter, a translation rule corresponding to the first client identifier and the second client identifier;
  • the saving module 805 is configured to save the translation rule in the translation library, so that after receiving the message sent by the first client, the user center translates the message into the second according to the translation rule.
  • the translated message parsed and processed by the client, and the translated message is sent to the second client.
  • An embodiment of the present application provides a method and a device for sending a message, where the user center determines, from a message sent by the first client, a first client identifier and a second client identifier included in the message, and presets Translating a library to select a translation rule that matches the first client identifier and the second client identifier, and then translating the message according to the translation rule to obtain a translated message, and the translated
  • the message is sent to the second client, so that the second client parses and processes the translated message after receiving the translated message.
  • the user center can translate the message sent by the first client into a message that enables the second client to parse and process, the client can pass the user even if it is a different client.
  • the center receives the messages sent by other clients, thereby realizing the intercommunication between different clients, thereby bringing convenience to the user.
  • the execution bodies of the steps of the method provided in Embodiment 2 may all be the same device, or the method may also be performed by different devices.
  • the execution body of step S301 and step S306 may be the first client, and the execution body of step 303 may be the first server; for example, the execution body of step 301 may be the first client, and the execution of step 303 and step 306 The principal can be the first server; and so on.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM random access memory
  • ROM read only memory
  • Memory is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology.
  • the information can be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic cassette tape, magnetic tape storage or other magnetic storage device or any other non-transportable medium that can be used for storage can be calculated Information accessed by the device.
  • computer readable media does not include temporary storage of computer readable media, such as modulated data signals and carrier waves.
  • embodiments of the present application can be provided as a method, system, or computer program product.
  • the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment in combination of software and hardware.
  • the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请公开了一种消息发送的方法及装置,该方法中用户中心从第一客户端发送的消息中确定出该消息所包含的第一客户端标识和第二客户端标识,并从预设的转译库中选择与该第一客户端标识和第二客户端标识相匹配的转译规则,根据该转译规则,将所述消息进行转译,得到转译后的消息,并将该转译后的消息发送给第二客户端,使得该第二客户端在接收到该转译后的消息后,对该转译后的消息进行解析并处理。从上述方法中看出,由于用户中心可将第一客户端发送的消息转译成能够使第二客户端解析并处理的消息,因此,即使是不同的客户端,客户端也可以通过用户中心来接收其他客户端发送的消息,实现了不同客户端之间的消息互通,给用户带来了便利。

Description

一种消息发送的方法及装置 技术领域
本申请涉及计算机技术领域,尤其涉及一种消息发送的方法及装置。
背景技术
当前,诸多软件或应用(Application,App)相继被人们开发出来,其中,这些软件或App除了能够支持多种业务处理的能力以外,还通常支持即时通讯(Instant Messaging,IM)功能,用户在使用这些软件或App时,可以提高自己在实际生活中进行业务处理以及通讯的效率,给用户带来了极大的便利。
然而,当前用户之间通过软件或App来相互发送消息时,通常都是基于同一软件或App来实现的,即,用户之间通常都需要使用同一软件或App来完成消息的发送与接收。而对于不同的软件或是App来说,由于不同的软件或App中的所使用的接口、参数等通常都是不同的,因此,通常情况下,不同的软件或App之间是不能进行消息互通的,即,用户之间若要基于不同的软件或App来进行消息互通时,将无法进行。这样一来,如何实现跨软件或App之间的消息互通将是一个亟待解决的问题。
发明内容
本申请实施例提供一种消息发送的方法,用于解决不同客户端之间不能进行消息互通的问题。
本申请实施例提供一种消息发送的装置,用于解决不同客户端之间不能进行消息互通的问题。
本申请实施例采用下述技术方案:
本申请实施例提供一种消息发送的方法,包括:
接收第一客户端发送的消息;
当确定所述第一客户端发送的消息所基于的用户账号为预先注册在所述用户中心的用户账号时,根据所述消息中包含的第一客户端标识以及第二客户端标识,从预设的转译库中选择与所述第一客户端标识以及第二客户端标识相匹配的转译规则;
根据所述转译规则,将所述消息进行转译,得到转译后的消息,其中,所述转译后的消息能够被所述第二客户端解析并处理;
将所述转译后的消息发送给所述第二客户端,使得所述第二客户端对所述转译后的消息进行解析并处理。
本申请实施例提供一种消息发送的方法,包括:
第一客户端接收用户输入的消息;
将所述消息基于用户账号发送给用户中心,使得用户中心在确定所述用户账号为预先注册在所述用户中心中的用户账号后,根据所述消息中包含的第一客户端标识以及第二客户端标识,从预设的转译库中选择与所述第一客户端标识以及第二客户端标识相匹配的转译规则,并将所述消息进行转译,得到能够使第二客户端解析并处理的转译后的消息,将所述转译后的信息发送给所述第二客户端。
本申请实施例提供一种消息发送的方法,包括:
用户中心向第一用户以及第二用户展示网页操作页面;
接收所述第一用户通过所述网页操作页面发送的第一消息参数以及所述第二用户通过所述网页操作页面发送的第二消息参数;
确定所述第一消息参数所对应的第一客户端标识以及第二消息参数所对应的第二客户端标识;
根据所述第一消息参数以及第二消息参数,生成针对所述第一客户端标识以及第二客户端标识对应的转译规则;
将所述转译规则保存在转译库中,使得所述用户中心接收到第一客户端发送的消息后,根据所述转译规则,将所述消息转译成能够使所述第二客户端解 析并处理的转译后的消息,并将所述转译后的消息发送给所述第二客户端。
本申请实施例提供一种消息发送的装置,包括:
接收模块,接收第一客户端发送的消息;
选择规则模块,当确定所述第一客户端发送的消息所基于的用户账号为预先注册在所述用户中心的用户账号时,根据所述消息中包含的第一客户端标识以及第二客户端标识,从预设的转译库中选择与所述第一客户端标识以及第二客户端标识相匹配的转译规则;
转译模块,根据所述转译规则,将所述消息进行转译,得到转译后的消息,其中,所述转译后的消息能够被所述第二客户端解析并处理;
发送模块,将所述转译后的消息发送给所述第二客户端,使得所述第二客户端对所述转译后的消息进行解析并处理。
本申请实施例提供一种消息发送的装置,包括:
接收消息模块,接收用户输入的消息;
消息发送模块,将所述消息基于用户账号发送给用户中心,使得用户中心在确定所述用户账号为预先注册在所述用户中心中的用户账号后,根据所述消息中包含的第一客户端标识以及第二客户端标识,从预设的转译库中选择与所述第一客户端标识以及第二客户端标识相匹配的转译规则,并将所述消息进行转译,得到能够使第二客户端解析并处理的转译后的消息,将所述转译后的信息发送给所述第二客户端。
本申请实施例提供一种消息发送的装置,包括:
展示模块,向第一用户以及第二用户展示网页操作页面;
接收模块,接收所述第一用户通过所述网页操作页面发送的第一消息参数以及所述第二用户通过所述网页操作页面发送的第二消息参数;
确定模块,确定所述第一消息参数所对应的第一客户端标识以及第二消息参数所对应的第二客户端标识;
生成模块,根据所述第一消息参数以及第二消息参数,生成针对所述第一 客户端标识以及第二客户端标识对应的转译规则;
保存模块,将所述转译规则保存在转译库中,使得所述用户中心接收到第一客户端发送的消息后,根据所述转译规则,将所述消息转译成能够使所述第二客户端解析并处理的转译后的消息,并将所述转译后的消息发送给所述第二客户端。
本申请实施例采用的上述至少一个技术方案能够达到以下有益效果:
由于用户中心可将第一客户端发送的消息转译成能够使第二客户端解析并处理的消息,因此,即使是不同的客户端,客户端也可以通过用户中心来接收其他客户端发送的消息,从而实现了不同客户端之间的消息互通,进而给用户带来了便利。
附图说明
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1为本申请实施例提供的消息发送的过程;
图2为本申请实施例提供的转译规则生成的过程;
图3为本申请实施例提供的转账请求消息发送的过程;
图4为本申请实施例提供的第二客户端对应的联系人列表的显示示意图;
图5为本申请实施例提供的联系人列表同步示意图;
图6为本申请实施例提供的一种消息发送的装置结构示意图;
图7为本申请实施例提供的一种消息发送的装置结构示意图;
图8为本申请实施例提供的一种消息发送的装置结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实 施例及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
以下结合附图,详细说明本申请各实施例提供的技术方案。
图1为本申请实施例提供的消息发送的过程,具体包括以下步骤:
S101:接收第一客户端发送的消息。
在实际应用中,由于不同的客户端所采用的运行代码通常都是不同的,因此,不同的客户端所发送的消息通常都带有各自的消息格式,这样一来,由于消息格式各不相同,因此,通常情况下,不同的客户端之间通常是不能进行消息互通的。而在本申请实施例中,为了使不同的客户端之间也能进行消息的互通,可通过用户中心来对各客户端所发送的消息进行转译,并得到能够使接收客户端(该接收消息客户端不同于发送消息的客户端)解析并处理的消息,这样一来,不同的客户端之间即可通过用户中心的消息转译处理,来进行消息的互通,因此,当第一客户端在确定出用户所要发送的消息是发送给其他客户端的用户时,则可将该消息发送给用户中心,相应的,用户中心也将接收第一客户端发送的这一消息,并在后续步骤S102~S103中,该消息进行转译。其中,这里提到的用户中心可以是一个具有转译功能的服务器,也可以由多个服务器所构成的系统,该系统可将第一客户端发送的消息转译成能够使第二客户端解析并处理的消息,而对于这里提到的不同的客户端来说,该不同的客户端并不是指安装在不同终端上的同一款客户端,所述第一客户端与第二客户端是不同应用对应的客户端,即,指不同软件开发商或运营商开发出来的不同客户端,例如,软件开发商A开发出的客户端A和软件开发商开发出的客户端B即为不同的客户端。
S102:当确定所述第一客户端发送的消息所基于的用户账号为预先注册在所述用户中心的用户账号时,根据所述消息中包含的第一客户端标识以及第二 客户端标识,从预设的转译库中选择与所述第一客户端标识以及第二客户端标识相匹配的转译规则。
在实际应用中,用户通常需要在用户中心注册用户账号,才会在用户中心中激活消息转译功能,或是,用户在第一客户端注册的用户账号只有升级至用户中心中(即,将用户在第一客户端注册的用户账号同步至用户中心中),用户中心在会将用户通过第一客户端发送的消息进行转译,转译成能够使第二客户端解析并处理的转译后的消息。因此,在本申请实施例中,用户中心在接收到第一客户端发送的消息后,可确定该第一客户端发送的消息所基于的用户账号是否为预先注册在该用户中心中的用户账号,其中,若是,则在后续过程中,将第一客户端发送的消息进行转译,若否,则不对第一客户端发送的消息进行转译。
而为了能够使不同的客户端进行消息的互通,用户中心需要将第一客户端发送的消息进行转译,而由于不同的客户端所对应的消息格式都是不同的,这样一来,用户中心在对第一客户端发送的消息进行转译时,就需要根据该消息的发送方(即第一客户端)以及消息的接收方(即第二客户端)来确定如何对该消息进行转译。而在第一客户端发送的消息中通常都是携带有消息发送方的标识,即,第一客户端的标识,同时还会携带有消息接收方的标识,即,第二客户端的标识,因此,当确定所述第一客户端发送的消息所基于的用户账号为预先注册在所述用户中心的用户账号时,用户中心可确定出该消息中所包含的第一客户端标识以及第二客户端标识,进而根据该第一客户端标识以及第二客户端标识,从预设的转译库中选择出与该第一客户端标识和第二客户端标识相匹配的转译规则,其中,转译库中存有大量预先设置的转译规则,不同的转译规则对应不同的消息发送客户端和消息接收客户端,这样一来,转账服务器在后续过程中,可根据选择出的该转译规则,对第一客户端发送的消息进行转译,得到能够使第二客户端(即,消息接收方)解析并处理的转译后的消息。
S103:用户中心根据所述转译规则,将所述消息进行转译,得到转译后的 消息,其中,所述转译后的消息能够被所述第二客户端解析并处理。
用户中心在对第一客户端发送的消息进行转译时,可根据选择出的转译规则,将该消息转译为标准消息,而后,再将该标准消息转译成能够使第二客户端(即,消息接收方)解析并处理的转译后的消息。
具体的,为了使第二客户端(消息接收方)能够解析并处理第一客户端发送的消息,用户中心在接收到第一客户端(消息发送方)发送的消息后,可对该消息进行转译,而在转译过程中,用户中心可将该消息先转译成标准信息,而后,再将该标准信息转译成能够使第二客户端解析并处理的消息,即,转译后的消息,此举的目的在于,用户中心在接收到第一客户端发送的消息后,通常需要对该消息进行保存,以用来防止在后续转译过程中用户中心出现异常或转译过程出现Bug而导致的该消息无法恢复的情况出现,而在实际应用中,各个服务器在进行数据存储时(上述提到的消息实质上就是数据信息),通常都是按照一定的数据格式来进行存储的,换句话来讲,就是能够存储在服务器中的数据需要满足该服务器所制定的数据格式,因此,在本申请实施例中,用户中心在对第一客户端发送的消息进行存储时,需要先将该消息转译成符合用户中心自身数据格式的标准消息,并对该标准消息进行存储。而后,用户中心可根据预先选出的转译规则,将该标准消息再进行转译,从而得到能够使第二客户端(消息接收方)能够解析并处理的转译后的消息。这样一来,若用户中心在对第一客户端发送的消息进行转译的过程中出现了异常或Bug,由于用户中心预先存储了该消息的标准形式,即,存储了标准消息,则用户中心可基于该标准消息,重新对该标准消息进行转译,进而得到能够使第二客户端解析并处理的转译后的消息。
需要说明的是,在实际应用中,客户端发送的消息通常都是由若干个参数来组成的,而在这些参数中通常分为两个部分,一个部分可以统称为操作类型信息,主要用于向接收消息的服务器表示客户端发送的消息是何种消息,以及该消息应如何被执行,例如,服务器在接收到聊天客户端所发送的消息后,可 从该消息中包含的操作类型信息确定出该消息属于聊天类的消息,并根据该操作类型信息,确定出该消息应如何被执行;而消息中包含的另一部分参数可以统称为消息内容信息,该消息内容信息主要用于表示该消息中的具体内容是什么,例如,假设用户通过聊天客户端向另一用户发送的聊天消息为:“你明天出去玩吗?”,则“你明天出去玩吗?”在该聊天消息中的表现形式即为该聊天消息中包含的消息内容信息。
由于消息中包含的操作类型信息和消息内容信息在参数的表现形式上通常都是不同的,因此,用户中心在对消息进行转译时(无论是将第一客户端发送的消息转译成标准信息,还是将标准消息转译成能够使第二客户端解析并处理的转译后的消息),需要分别对该消息中包含的操作类型信息和消息内容信息进行转译。具体的,用户中心在对第一客户端发送的消息进行转译时,可确定出该消息中包含的操作类型信息和消息内容信息,而后,用户中心可根据先前从该消息中确定出的第一客户端标识和第二客户端标识,在预设的转译库中分别选出针对操作类型信息的操作类型转译规则,以及针对消息内容信息的消息内容转译规则,其中,对于操作类型信息的转译过程来说,用户中心可根据选出的操作类型转译规则,依次将该操作类型信息中包含的操作类型参数进行转译,具体实现过程可以是用户中心依次扫描出该操作类型信息中包含的各操作类型参数,并根据选出的操作类型转译规则,依次将确定出的各操作类型参数进行转译,得到标准操作类型参数,而后,用户中心可将各标准操作类型参数进行封装,得到标准操作类型信息。
而对于消息内容信息的转译过程来说,用户中心可根据选出的消息内容转译规则,依次将该消息内容信息中包含的各消息格式参数进行转译,具体实现过程可以是用户中心依次扫描出该消息内容信息中包含的各消息格式参数,并根据选出的消息内容转译规则,依次将确定出的各消息格式参数进行转译,得到标准消息格式参数,而后,用户中心可将各标准消息格式参数进行封装,得到标准消息内容信息。
需要说明的是,用户中心在对消息内容信息进行转译时,并不是对该消息内容信息中的全部内容进行转译的,因为,对于该消息内容信息来说,其包含的诸如文字等纯文本信息通常在各个客户端的表现形式都是一样的,因此,用户中心通常也不会对消息内容信息中包含的纯文本信息进行转译,而对于消息内容信息中除纯文本信息以外的消息格式参数来说,不同的客户端通常都会制定属于自己的消息格式参数,而客户端制定出的消息格式参数通常都会区别于其他客户端所制定的消息格式参数,即,不同客户端发送内容相同的消息时,各自发送的消息中所包含的消息格式参数都是不同的,因此,用户中心在对消息内容信息进行转译时,可对消息内容信息中包含的各消息格式参数进行转译,得到各标准消息格式参数,而后,用户中心可将各标准消息格式参数和该消息内容信息中包含的纯文本信息按照一定的封装规则进行封装,从而得到标准消息内容信息。
用户中心在将第一客户端发送的消息中包含的操作类型信息以及消息内容信息分别转译成标准操作类型信息以及标准消息内容信息后,可按照一定的封装规则,将标准操作类型信息以及标准消息内容信息进行封装,得到标准消息,进而将该标准消息进行保存,而后,为了使不同的客户端能够进行消息互通,用户中心需要对标准消息进行转译,得到能够使第二客户端(消息接收方)能够解析并处理的转译后的消息。
具体的,标准消息中同样包含有两个部分,一个部分为上述提到的标准操作类型信息,另一个部分为上述提到的标准消息内容信息,由于该标准操作类型信息和标准消息内容信息在参数的表现形式上通常都是不同的,因此,用户中心在对标准消息进行转译时,需要分别对该标准消息中包含的标准操作类型信息以及标准消息内容信息进行转译,具体过程为用户中心可先从标准消息中确定出标准操作类型信息以及标准消息内容信息,而后,可根据先前从第一客户端(消息发送方)发送的消息中确定出的第一客户端标识以及第二客户端标识,在预设的转译库中分别选出针对标准操作类型信息的操作类型转译规则, 以及针对标准消息内容信息的消息内容转译规则,其中,这里提到的操作类型转译规则和上述提出的用户中心将第一客户端发送的消息中包含的操作类型信息转译成标准操作类型信息所涉及到的操作类型转译规则可以是相同的,即,该操作类型转译规则除了可帮助用户中心完成对操作类型信息转译成标准操作类型信息的工作外,还可以帮助用户中心完成将标准操作类型信息转译成转译后的操作类型信息,而对于这里提到的消息内容转译规则来说,该消息内容转译规则可以与上述提到的用户中心将第一客户端发送的消息中包含的消息内容信息转译成标准消息内容信息所涉及的消息内容转译规则是相同的,即,该消息内容转译规则除了可以帮助用户中心完成将消息内容信息转译成标准消息内容信息的工作外,还可以帮助用户中心完成将标准消息内容信息转译成转译后的消息内容信息。
对于标准操作类型信息的转译过程来说,用户中心可根据选出的操作类型转译规则,依次将该标准操作类型信息中包含的标准操作类型参数进行转译,具体实现过程可以是用户中心依次扫描出该标准操作类型信息中包含的各个标准操作类型参数,并根据选出的操作类型转译规则,依次将确定出的各标准操作类型参数进行转译,得到转译后的操作类型参数,而后,用户中心可将各转译后的操作类型参数按照一定的封装规则进行封装,得到转译后的操作类型信息。
而对于标准消息内容信息的转译过程来说,由于用户中心通常是不对标准消息内容信息中包含的纯文本信息进行转译的,在标准消息内容信息中涉及转译的通常都该标准消息内容信息中所包含的标准消息格式参数,因此,用户中心可根据选出的消息内容转译规则,依次将该标准消息内容信息中包含的各标准消息格式参数进行转译,具体实现过程可以是用户中心依次扫描出该标准消息内容信息中包含的各标准消息格式参数,并根据选出的消息内容转译规则,依次将确定出的各标准消息格式参数进行转译,得到各转译后的消息格式参数,而后,用户中心可按照一定的封装规则,将各转译后的消息格式参数以及 标准消息内容信息中包含的纯文本信息进行封装,进而得到转译后的消息内容信息。
用户中心在分别得到转译后的消息内容信息和转译后的操作类型信息后,可将这两者进行封装,得到能够使第二客户端(消息接收方)解析并处理的转译后的消息,进而在后续过程中将该转译后的消息发送给第二客户端,使得第二客户端在接收到该转译后的消息后,对该转译后的消息进行解析并处理。
S104:用户中心将所述转译后的消息发送给所述第二客户端,使得所述第二客户端对所述转译后的消息进行解析并处理。
用户中心将第一客户端(消息发送方)发送的消息转译成可使第二客户端(消息接收方)解析并处理的转译后的消息后,可将该转译后的消息发送给第二客户端,由于该转译后的消息符合第二客户端制定的数据格式,因此,第二客户端在接收到该转译后的消息后,可对该转译后的消息进行解析并处理,并可最终以纯文本、图片等形式来将该转译后的消息显示给使用第二客户端的用户(接收消息的用户)。
从上述方法可以看出,由于用户中心可将第一客户端发送的消息转译成能够使第二客户端(消息接收方)解析并处理的转译后的消息,这样一来,第二客户端即可通过用户中心来接收第一客户端发送的消息,相应的,第一客户端也可以通过用户中心来接收第二客户端发送的消息,从而实现了不同客户端之间的消息互通,进而给用户带来了便利。
需要说明的是,在实际应用中,用户终端会存在被盗或丢失的可能,当用户终端被他人盗取或拾取时,倘若盗取或拾取该终端的用户是一个恶意用户,则该恶意用户可能会通过该终端,向第一客户端存储的联系人列表中的用户发送恶意信息,进而给这些用户以及丢失终端的用户带来损失。
为了防止上述情况的发生,在本申请实施例中,用户中心在接收到第一客户端发送的消息时,若判断出发送该消息的第一客户端处在异地时(即发送消息的所在地并不是常用所在地),则该用户中心可向该第一客户端进行鉴权, 并当第一客户端鉴权通过后,再将接收到的消息进行转译,进而将该转译后的消息发送给第二客户端(消息接收方),其中,这里提到的鉴权可以包括但不限于要求使用当前使用第一客户端的用户输入验证密码、语音验证信息、指纹验证信息,以及用户中心向第一客户端的关联设备发送验证码等方式。而当用户中心监测到第一客户端在同一地区进行了多次的消息发送,或是在预设时间内发送预设数量的消息后,则可取消对该第一客户端的鉴权操作,或是降低对该第一客户端的鉴权频率。由于用户中心当监测到第一客户端在异地发送消息时,可对该第一客户端进行鉴权,因此,在一定程度上防止了因用户终端盗取或丢失而导致的盗取或拾取该终端的恶意用户向第一客户端联系人列表中的用户发送恶意消息的情况发生,进而在一定程度上降低了用户的损失。当然,除了用户中心可以对第一客户端进行鉴权外,第一客户端也可对自身进行鉴权,即,当第一客户端在向第二客户端发送消息的过程中监测到自身(即,第一客户端)所处的位置为异地(即发送消息的所在地并不是常用所在地)时,则可向当前使用第一客户端的用户进行鉴权,并当鉴权通过后,将该消息发送至第二客户端。
还需说明的是,在上述步骤S102中,当用户中心接收到第一客户端发送的消息并确定出该消息中包含有第二客户端标识时,也可将第一客户端发送的消息所基于的用户账号自动升级为用户中心的用户账号,继而在后续过程中,将第一客户端发送的消息进行转译。
在本申请实施例中,用户中心也可向各客户端运营商或开发商提供一个网页操作页面,使得各客户端运营商或开发商可在该网页操作页面中输入自己客户端中允许与其他客户端进行消息互通的功能(如聊天功能等),并将该功能对应的运行代码、消息参数等信息输入到该网页操作页面中,这样一来,用户中心即可根据各客户端运营商或开发商提供的各功能对应的运行代码、消息参数等信息,生成各个转译规则,进而在后续过程中,用户中心可根据各转译规则,将第一客户端针对该功能发送的消息转译成能够使第二客户端解析并处理 的转译后的消息,具体的详细过程如图2所示。
图2为本申请实施例提供的转译规则生成的过程,具体包括以下步骤:
S201:用户中心向第一用户以及第二用户展示网页操作页面。
在实际应用中,用户中心通常需要根据各客户端的运营商所提供的消息参数,才能生成各个转译规则,因此,在本申请实施例中,当用户中心监测到第一用户(即第一客户端的运营商)以及第二用户(即第二客户端的运营商)登录到该用户中心时,可分别向该第一用户以及第二用户展示能够使第一用户以及第二用户将各自客户端的消息参数输入进去的网页操作页面,进而使得第一用户以及第二用户在后续的过程中,将各自客户端的消息参数输入到该网页操作页面中。
S202:接收所述第一用户通过所述网页操作页面发送的第一消息参数以及所述第二用户通过所述网页操作页面发送的第二消息参数。
第一用户(即第一客户端的运营商)以及第二用户(即第二客户端的运营商)在查看到用户中心对其各自展示的网页操作页面后,可在该网页操作页面中输入各自客户端的消息参数,相应的,用户中心可通过该网页操作页面,接收第一用户发送的第一消息参数(即第一客户端的消息参数),以及第二用户发送的第二消息参数(即第二客户端的消息参数)。其中,该消息参数中包含消息的运行代码、消息格式等等参数。
S203:确定所述第一消息参数所对应的第一客户端标识以及第二消息参数所对应的第二客户端标识。
由于用户中心在生成转译规则时,需要确定出随后生成的转译规则是针对哪两个客户端而生成的,即,生成的转译规则适用于哪两个客户端之间的消息互通,因此,用户中心除了需要接收到第一用户(即第一客户端的运营商)通过网页操作页面发送的第一消息参数(即第一客户端的消息参数),以及第二用户(即第二客户端的运营商)通过网页操作页面发送的第二消息参数(即第二客户端的消息参数)外,还需要接收第一用户以及第二用户分别通过网页操 作页面发送的第一客户端标识以及第二客户端标识,具体实施方式可以是,第一用户以及第二用户可在网页操作页面中填写各自客户端的名称,并发送给用户中心,用户中心在接收到第一用户以及第二用户各自发送的客户端名称后,可根据这两个客户端的名称,分别确定出针对第一客户端的第一客户端标识以及针对第二客户端的第二客户端标识。当然,第一用户以及第二用户也可在网页操作页面中直接填写各自客户端所对应的客户端标识,相应的,用户中心则可根据第一用户以及第二用户在网页操作页面上各自填写的客户端标识,确定出第一客户端对应的第一客户端标识,以及第二客户端对应的第二客户端标识,这样一来,用户中心结合第一用户以及第二用户分别发送的第一消息参数以及第二消息参数,则可确定出第一消息参数所对应的第一客户端标识,以及第二消息参数所对应的第二客户端标识。
S204:根据所述第一消息参数以及第二消息参数,生成针对所述第一客户端标识以及第二客户端标识对应的转译规则。
用户中心在确定出第一消息参数以及第二消息参数各自对应的客户端标识后,可根据该第一消息参数以及第二消息参数,生成针对第一客户端标识以及第二客户端标识对应的转译规则,其中,具体的转译方式可以是,用户中心可针对一个相同的消息,分别采用第一消息参数以及第二消息参数表示该消息,而后,用户中心可对针对该消息的第一消息参数以及第二消息参数进行比对,并将这两个消息参数中具有等价关系的参数录入到一个转译表,使得具有等价关系的各参数在该转译表中对应起来,而用户中心则可将该转译表就作为针对第一客户端标识以及第二客户端标识对应的转译规则。
S205:将所述转译规则保存在转译库中,使得所述用户中心接收到第一客户端发送的消息后,根据所述转译规则,将所述消息转译成能够使所述第二客户端解析并处理的转译后的消息,并将所述转译后的消息发送给所述第二客户端。
用户中心确定出针对第一客户端标识以及第二客户端标识对应的转译规 则后,可将该转译规则保存在转译库中,这样,后续用户中心在接收到第一客户端发送的消息后,可根据该消息中包含的第一客户端标识以及第二客户端标识,从转译库中确定出与该第一客户端标识以及第二客户端标识相匹配的转译规则,并根据该转译规则,将第一客户端发送的消息转译成能够使第二客户端解析并处理的转译后的消息,而后,用户中心可将该转译后的消息发送给第二客户端,进而使得第二客户端在接收到该转译后的消息后,可将该转译后的消息进行解析并处理,并将结果显示给当前使用第二客户端的用户。
另外,除了用户中心可对第一客户端发送的消息进行转译外,第一客户端也可在判断出用户输入的消息是需要发送给第二客户端联系人时,将该消息直接转译成能够使第二客户端解析并处理的转译后的消息,继而在后续过程中将该转译后的消息发送给第二客户端,具体的实施方式可以是将具有转译功能的模块集成在第一客户端之中,使得第一客户端具有将用户输入的消息进行转译的功能。当然,该具有转译功能的模块也可以集成在第二客户端上,使得第二客户端在接收到第一客户端发送的消息后,可先通过该具有转译功能的模块,将该消息转译成能够使第二客户端解析并处理的转译后的消息,而后,再将该转译后的消息进行解析并处理。
在实际应用中,不同的客户端通常都对应有各自的服务器,即,客户端通常都是将用户所要发送的消息或业务请求发送至该客户端所对应的服务器,并由服务器来完成该消息或请求的处理工作,因此,在本申请实施例中,当第一客户端接收到用户输入的消息后,也可将该消息发送至该第一客户端所对应的第一服务器,而第一服务器在接收到该消息后,可从该消息中识别出接收该消息的第二客户端标识,从而确定出需要将该消息转发至用户中心来进行处理,进而将该消息发送至用户中心中。而相应的,用户中心可将转译后的消息发送给第二客户端所对应的第二服务器,而第二服务器在接收到该转译后的消息后,可根据该转译后的消息中包含的用户标识(该用户为接收消息的用户),确定出需要将该转译后的消息发送给第二客户端的哪一个用户,进而将该转译 后的消息发送给第二客户端,使得第二客户端在接收到该转译后的消息后,可将该转译后的消息进行解析并处理,并最终以文本、图片等形式来向接收消息的用户进行显示。
基于上述说明的第一服务器以及第二服务器,下面还提供了用于实现不同客户端进行消息互通的详细系统架构,其中,该系统架构除了可用于上述说明的发送聊天消息外,还可用于第一客户端向第二客户端发送转账请求消息、建立用户关系消息等消息,为了更加清楚的描述这一系统架构,下面将以第一客户端向第二客户端发送转账请求消息为例进行详细说明。
图3为本申请实施例提供的转账请求消息发送的过程,具体包括以下步骤:
S301:第一客户端接收用户输入的转账请求消息。
在本申请实施例中,当用户想要通过第一客户端来向使用第二客户端(该第二客户端不同于第一客户端)的其他用户进行转账时,可在第一客户端中进行一系列的转账操作,而第一客户端监测到用户所执行的这一系列操作后,可根据这一系列的转账操作,生成一个转账请求消息,相当于进行用户输入的转账请求消息,进而在后续过程中,将该转账请求消息发送给用户中心,其中,该转账请求消息相当于第一客户端根据用户所执行的一系列转账操作而生成的转账请求。
S302:第一服务器接收第一客户端发送的转账请求消息。
在实际应用中,不同的客户端通常都对应有各自的服务器,而对于客户端之间的转账过程来说,其中所涉及的用户账号下的资金改动通常都是由客户端各自对应的服务器完成的,因此,在本申请实施例中,第一客户端在接收到用户输入的转账消息后,可将该转账消息发送给该第一客户端对应的第一服务器,而第一服务器也将相应的接收第一客户端发送的转账请求消息。
S303:第一服务器根据所述转账请求消息,对第一客户端的账户余额进行操作。
第一服务器在接收到该转账消息后,可根据该转账消息中包含的转账数额 信息以及用户账号(该用户账号是注册在第一客户端的),在该用户账号下对应的第一客户端账户余额中扣除与转账数额信息对应的资金数额,与此同时,该第一服务器可根据该转账消息中包含的第二客户端标识,确定出需要将该转账消息发送给用户中心来进行转译,进而在后续过程中,将该转账消息发送给用户中心。
S304:用户中心接收第一服务器发送的转账请求消息。
为了使第二客户端(转账消息接收方)能够解析并处理第一客户端发送的转账请求消息,用户中心可对第一客户端通过第一服务器发送的转账请求消息进行转译,并得到能够使第二客户端解析并处理的转译后的转账请求消息,因此,在本申请实施例中,当第一服务器接收到第一客户端发送的转账请求消息后,可将该转账请求消息发送给转账服务器,相应的,转账服务器也将接收第一服务器发送的转账请求消息,进而在后续过程中将对该转账请求消息进行转译。
S305:用户中心根据所述转账消息中包含的第一客户端标识以及第二客户端标识,从预设的转译库中选择与所述第一客户端标识以及第二客户端标识相匹配的转译规则。
在实际应用中,不同的客户端所对应的消息格式都是不同的,因此,通常情况下,不同的客户端通常也是不能进行转账操作的,而为了能够使不同的客户端也能进行转账操作,在本申请实施例中,用户中心在接收到第一服务器发送的转账请求消息后,可确定出该转账请求消息中包含的第一客户端标识以第二客户端标识,进而根据该第一客户端标识以及第二客户端标识,从预设的转译库中选出与该第一客户端标识以及第二客户端标识相匹配的转译规则,继而在后续过程中,用户中心可根据该转译规则,对第一客户端发送的转账请求消息进行转译,得到能够使第二客户端解析并处理的转译后的转账请求消息。
S306:用户中心根据所述转译规则,将所述转账请求消息进行转译,得到转译后的转账请求消息,其中,所述转译后的转账请求消息能够被所述第二客 户端解析并处理。
为了防止用户中心在对上述转账消息进行转译的过程中出现异常或Bug而导致的该转账消息无法恢复的情况出现,在本申请实施例中,用户中心在接收到第一服务器发送的转账请求消息后,可对该转账请求消息进行保存,而在实际应用中,各服务器在进行数据存储时,通常都是按照一定的数据格式来存储数据的,即,用户中心也将按照一定的数据格式来存储该转账请求消息,因此,为了能够存储该转账请求消息,用户中心需要将该转账请求消息转译成标准转账请求消息,并将该标准转账请求消息进行存储,其中,转账请求消息中通常包含有用于表示该转账请求消息类型的转账操作信息,以及用于表示该转账请求消息具体内容的转账数据信息,这两种信息在参数的表现形式上通常都是不同的,因此,用户中心在对该转账请求消息进行转译时,需要分别对该转账请求消息中包含的转账操作信息以及转账数据信息进行转译,具体的转译过程与上述图1中的步骤S103相同,在此就不进行详细赘述。
当用户中心将转译得到的标准转账请求消息进行存储后,可对该标准转账请求消息再次进行转译,进而得到能够使第二客户端解析并处理的转译后的转账请求消息,其中,具体的转译过程与上述图1中的步骤S103相同,在此也将不再详细赘述了。
S307:用户中心将所述转译后的转账请求消息发送给所述第二服务器。
用户中心将第一客户端(转账消息发送方)通过第一服务器发送的转账请求消息转译成能够使第二客户端(转账消息接收方)解析并处理的转译后的转账消息后,可该转译后的转账消息发送给第二客户端对应的第二服务器,进而使得第二服务器可根据该转译后的转账请求消息,对接收该转译后的转账请求消息的第二客户端用户的账户余额进行操作。
S308:第二服务器根据所述转译后的转账请求消息,对第二客户端的账户余额进行操作。
第二服务器在接收到该转译后的转账请求消息后,可根据该转账后的转账 消息中包含的转账数额,将该转账数额对应的资金添加到用户账号对应的第二客户端账户余额中,而后,第二服务器可将该转译后的转账消息发送给第二客户端,进而使得第二客户端对该转译后的转账请求消息进行解析并处理。
S309:第二服务器将所述转译后的转账请求消息发送给第二客户端,使得所述第二客户端对所述转译后的转账请求消息进行解析并处理。
由于该转译后的转账消息符合第二客户端制定的数据格式,因此,第二客户端在接收到该转译后的转账消息后,可对该转译后的转账消息进行解析并处理,并最终以文本、图片等形式向用户(该用户为使用第二客户端的用户)进行显示,从而完成整个转账过程。
从上述方法中可以看出,由于用户中心可将第一客户端发送的转账消息转译成能够使第二客户端(转账消息接收方)解析并处理的转译后的转账消息,因此,第二客户端即可通过用户中心接收第一客户端转移过来的资金,相应的,第一客户端也可以通过用户中心接收第二客户端转移过来的资金,从而可使不同的客户端之间也能够进行转账操作,进而给用户带来了便利。
需要说明的是,在本申请实施例中,用户中心同样可对第一客户端(转账消息发送方)进行鉴权,即,当监测到第一客户端发送转账消息的地方不是常用所在地时,则用户中心可对第一客户端进行鉴权,并当第一客户端鉴权通过时,将第一客户端发送的转账消息进行转译,具体的鉴权方式可以是要求当前使用第一客户端的用户输入验证密码、语音验证信息、指纹验证信息,以及用户中心向第一客户端的关联设备发送验证码等方式。而当用户中心监测到第一客户端在同一地区进行了多次转账消息的发送,或是在预设时间内发送了预设数量的转账消息后,可取消对该第一客户端的鉴权操作,或是降低对该第一客户端的鉴权频率。由于用户中心当监测到第一客户端在异地发送转账消息时,可对该第一客户端进行鉴权,因此,在一定程度上防止了因用户终端盗取或丢失而导致的盗取或拾取该终端的恶意用户向该恶意用户所使用的第二客户端进行转账的情况发生,进而在一定程度上降低了用户的损失。当然,第一客户 端也可对自身进行鉴权,即,当第一客户端在向第二客户端发送消息的过程中监测到自身(即,第一客户端)所处的位置为异地(即发送消息的所在地并不是常用所在地)时,则可向当前使用第一客户端的用户进行鉴权,并当鉴权通过后,将该消息发送至第二客户端。
上述说明的消息发送的过程都是基于用户之间已经建立的用户关系的基础上来完成的,即,用户使用第一客户端来向另一用户所使用的第二客户端来发送消息时,可在该第一客户端的界面上调取出第二客户端对应的联系人列表,其中,该第二客户端对应的联系人列表中所存储的联系人可以是使用第二客户端的用户。用户可根据第一客户端显示的第二客户端对应的联系人列表,在该第二客户端对应的联系人列表中选择出指定的联系人(该联系人即为接收消息的用户),相应的,第一客户端也将根据用户的选择操作,确定出用户在第二客户端对应的联系人列表中选择的联系人,进而确定出用户后续发送的消息(即将发送的消息)是发送给第二客户端的,与此同时,第一客户端可向用户弹出一个消息输入框,使得用户在查看到该消息输入框后,可在该消息输入框中输入想要发送的消息,而第一客户端在接收到用户输入的消息后,由于第一客户端已经得知该消息是发送给第二客户端的,因此,第一客户端可在该消息中添加第一客户端标识以及第二客户端标识,进而将携带有第一客户端标识以及第二客户端标识的该消息发送至用户中心中。
需要说明的是,第一客户端在将第二客户端对应的联系人列表进行显示时,可将该联系人列表与第一客户端对应的联系人列表一并进行显示,如图3所示。
图4为本申请实施例提供的第二客户端对应的联系人列表的显示示意图。
第一客户端在向用户显示第二客户端对应的联系人列表时,可将该第二客户端对应的联系人列表与第一客户端对应的联系人列表的一并显示在第一客户端的界面中,这样,用户可在该第二客户端对应的联系人列表中选择出指定的联系人(该联系人即为接收消息的用户),进而完成后续的消息发送过程。
除此之外,第一客户端也可先向用户显示第一客户端对应的联系人列表,并当监测到用户执行了指定操作后,将该第一客户端联系人列表进行切换,显示出第二客户端对应的联系人列表,其中,该指定操作具体形式可以是用户在第一客户端所显示的界面上点击了指定的操作按钮,使得第一客户端在监测到用户点击了该指定按钮后,将当前显示的第一客户端对应的联系人列表切换成第二客户端对应的联系人列表,或是当第一客户端监测到用户在执行了诸如滑动、摇动等指定操作后,将当前显示的第一客户端对应的联系人列表进行切换,进行向用户显示出第二客户端对应的联系人列表。
当然,第一客户端也可将第二客户端对应的联系人和第一客户端对应的联系人显示在同一个联系人列表中,而为了有效的区别出每个联系人所对应的客户端,第一客户端可在该联系人列表中,对每个联系人的前面或后面都相应的标记出该联系人所属的客户端,这样,第一客户端可根据该标记,确定出使用第一客户端的用户所选择的联系人所对应的客户端,进而当确定出用户选择了第二客户端的联系人时,将用户输入的消息发送给第二客户端。
当用户在第一客户端显示的第二客户端联系人列表中选取了指定的联系人时,则第一客户端可根据用户所选的该指定联系人,确定出用户所要发送的消息是发送给第二客户端的,进而在用户发送的消息中携带第一客户端以及第二客户端的标识,使得用户中心可根据该第一客户端标识以及第二客户端标识,选择出与该消息匹配的转译规程对该消息进行转译。当然,第一客户端也可在监测到用户将联系人列表切换至第二客户端对应的联系人列表后,确定出该用户基于该联系人列表所发送的消息都是发送该第二客户端的,继而在用户输入的消息中携带第一客户端标识以及第二客户端标识,并将该消息发送给用户中心。
另外,第一客户端的用户在与第二客户端的联系人建立了联系人关系后,第二客户端也可将自身保存的第二客户端对应的联系人列表同步给用户中心,即,第二客户端的联系人在与第一客户端的用户建立联系人关系后,可指示第 二客户端对应的第二服务器将该第二服务器保存的该联系人的第二客户端对应的联系人列表同步至用户中心。此举的目的在于,在实际应用中,各客户端对应的联系人列表中除了会保存除用户自身以外的其他联系人的联系信息外,通常还会对用户自身的联系信息进行保存,这样一来,由于联系人列表中通常都会保存有用户自身的联系信息(即,用户通过用户账号登录到客户端后,该客户端中的联系人列表中通常也会有用户自身的联系信息),因此,第二客户端的联系人在与第一客户端的用户建立联系人关系后,第二客户端可将该联系人的第二客户端对应的联系人列表同步至用户中心,相应的,第一客户端的用户在与第二客户端的联系人建立了联系人关系后,第一客户端也可将该用户的第一客户端对应的联系人列表同步至用户中心,而用户中心后续在监测到第一客户端的用户需要向第二客户端发送消息时,则可将预先保存的第二客户端同步的第二客户端对应的联系人列表同步给第一客户端,由于该第二客户端对应的联系人列表中包含有第二客户端的该联系人,因此,第一客户端的用户在查看到该联系人的列表后,可在该联系人列表中选中该联系人,进而将编辑的消息通过用户中心发送给第二客户端的该联系人。
当然,第一客户端的用户在与第二客户端的联系人建立了联系人关系后,用户中心也可将各客户端针对其他客户端的联系人列表进行储存,换句话说,各客户端所对应的服务器可将各自客户端针对其他客户端的联系人列表同步至用户中心中。这样一来,用户中心后续在监测到第一客户端的用户需要向第二客户端的联系人发送消息时,则可将预先保存的第一客户端针对第二客户端的联系人列表同步给第一客户端,使得第一客户端的用户在查看到该联系人列表后,可在该联系人列表中选取指定的第二客户端的联系人(即,接收第一客户端随后所发消息的第二客户端的联系人),相应的,第一客户端的用户在该联系人列表中选取了第二客户端的联系人后,第一客户端可将用户随后针对该第二客户端的联系人而发送的消息通过第一客户端对应的第一服务器发送给用户中心,而用户中心在接收到该消息后,可根据该消息中包含的第一客户端 标识以及第二客户端标识,从预设的转译库中确定出与该第一客户端标识和第二客户端标识相匹配的转译规则,并根据该转译规则,将该消息转译成能够使第二客户端解析并处理的转译后的消息,随后,用户中心可将该转译后的消息通过第二客户端对应的第二服务器发送给第二客户端,使得第二客户端在接收到该转译后的消息后,可将该转译后的消息进行解析并处理,并将得到的结果呈现给用户,如图5所示。
图5为本申请实施例提供的联系人列表同步示意图。
在图5中,使用客户端A的用户A想要与客户端B的用户B建立联系人关系时,用户A可使用客户端A向用户B的客户端发送用于建立联系人关系的消息,该消息可在经过客户端A所对应的服务器A后,由服务器A发送至用户中心。用户中心在接收到该消息后,可通过解析该消息,确定出需要将服务器A中存储的用户A针对客户端B对应的联系人列表同步至用中心中,因此,用户中心可向服务器A发送一个指令,使得服务器A在接收到该指令后,将用户A针对客户端B对应的联系人列表同步给用户中心。用户中心在接收到服务器A同步的用户A针对客户端B对应的联系人列表后,可将该消息进行转译,得到能够使客户端B解析并处理的转译后的消息,并将该转译后的消息发送给客户端B所对应的服务器B。服务器B在接收到用户中心发送的转译后的消息后,可将该转译后的消息发送给客户端B,而客户端B在接收到服务器B发送的转译后的消息后,可对该转译后的消息进行解析并处理,并将得到的结果向用户B进行显示。此时,若用户B同意与客户端A的用户A建立联系人关系,则客户端B可在监测到诸如点击同意选项的指定操作后,向服务器B发送一个指令,使得服务器B在接收到该指令后,可将用户B的联系人信息(该联系人信息可以是用户B的用户名、姓名等)添加到用户中心接收到的用户A针对客户端B对应的联系人列表之中,并且,服务器B也可将添加有用户A的联系人信息(该联系人信息可以是用户A的用户名、姓名等)的用户B针对客户端A的联系人列表同步至用户中心中。
由于用户中心已将相互建立联系人关系的用户在各自客户端(即第一客户端)中的其他客户端(即第二客户端)对应的联系人列表进行了同步,因此,后续用户中心在监测到使用第一客户端的用户向第二客户端的用户发送消息时,可向第一客户端的用户同步预先保存的第一客户端针对第二客户端所对应的联系人列表(即该联系人列表中存储的都是第二客户端所属的用户),相应的,第一客户端的用户在接收到用户中心同步的该联系人列表后,可在该联系人列表中确定出接收第一客户端随后所发消息的第二客户端的联系人,并在确定出第二客户端的联系人后,可将随后发送的消息通过用户中心发送给第二客户端的联系人。
例如,在图5中,使用客户端B的用户B向客户端B的用户C发送消息时,可通过在该客户端B上执行指定的操作后(该指定操作可以是用户B在客户端B点击了指定的按钮等),客户端B可确定出用户B接下来发送的消息是发送给客户端B的,因此,客户端B可通过客户端B对应的服务器B,向用户中心调取用户中心预先存储的客户端B针对客户端C对应的联系人列表,并将该联系人列表呈现给用户B。用户B在查看到该联系人列表后,可在该联系人列表中选取出用户C,并针对当前所选取的用户C,在客户端B上输入发送给用户C的消息。客户端B在接收到该消息后,可将该消息通过服务器B发送给用户中心,使得用户中心在接收到该消息后,可根据该消息中包含的客户端B标识以及客户端C标识,从预设的转译库中,确定出与该客户端B标识以及客户端C标识相匹配的转译规则,并根据该转译规则,将该消息转译成能够使客户端C解析并处理的转译后的消息。而后,用户中心可将该转译后的消息通过客户端C对应的服务器C发送给客户端C,使得客户端C在接收到该转译后的消息后,可将该转译后的消息进行解析并处理,进而将处理后得到的结果向用户C进行呈现。
在本申请实施例中,用户也可通过第一客户端向陌生联系人所使用的第二客户端发送消息,具体的,在实际应用中,用户有时需要向使用第二客户端的 陌生联系人(即未在第二客户端上与使用第一客户端的用户建立用户关系的用户)发送消息(如,建立好友的请求),因此,当使用第一客户端的用户向使用第二客户端的陌生联系人发送消息时,可向该第一客户端输入向第二客户端联系人发送消息的指令,而第一客户端在接收到该指令后,可根据该指令,向用户显示出能够输入第二客户端联系人用户标识的界面,用户在查看到该界面后,可相应的在该界面中输入第二客户端联系人的用户标识(该用户标识可以是用户账号、手机号、邮箱等信息),而第一客户端在接收到该用户标识后,可根据该用户标识,查找到与该用户标识相匹配的第二客户端联系人,进而将该第二客户端联系人显示在第一客户端的界面中,这样一来,用户即可在后续过程中向该第二客户端联系人发送消息。
在实际应用中,用户在向其他陌生联系人发送用于聊天的消息之前,通常需要先将用于表明自己身份的消息发送给陌生联系人,而后,当该陌生联系人根据该用于表面用户身份的消息而同意用户与该陌生联系人进行聊天后,用户方可与该陌生联系人进行聊天。因此,在本申请实施例中,第一客户端监测到用户在对第二客户端联系人(即第一客户端根据用户输入的用户标识而搜索出的与该用户标识相匹配的第二客户端联系人)执行了指定的操作(如,在第一客户端的显示界面上点击添加第二客户端联系人为好友的按钮)后,第一客户端可向用户显示输入用于表明用户身份的消息输入框,这样一来,用户即可在该消息输入框中,输入针对该第二客户端联系人(针对先前在第一客户端输入的用户标识)的用于表明自己身份的消息,进而在后续过程中,将该消息发送给该第二客户端联系人。
第一客户端在接收到用户针对所述用户标识(即,第二客户端联系人)输入的消息后,可根据先前接收到的指令,将第一客户端标识和第一客户端标识添加到该消息中,与此同时,为了使第二客户端联系人能够接收到该消息,第一客户端还可将先前接收到的用户标识(对应第二客户端联系人的用户标识)添加到该消息中,并随即将该消息发送通过与第一客户端对应的第一服务器发 送至用户中心中,相应的,为了使第二客户端能够解析并处理第一客户端发送的消息,用户中心可对第一客户端发送的消息进行转译,得到能够使第二客户端解析并处理的转译后的消息,继而在后续过程中将该转译后的消息发送给第二客户端。第二客户端在接收到用户中心发送的转译后的消息后,可对该转译后的消息进行解析并处理,进而将该转译后的消息以文本、图片等形式显示给第二客户端的用户。
需要说明的是,上述说明的消息除了可以是用于表明用户身份的消息外,还可以是用户向陌生联系人发送的聊天消息,当然,也可以是类似支付、转账等消息,例如,用户在第一客户端的界面上输入用户标识后,第一客户端可根据该用户标识,搜索出与该用户标识相匹配的第二客户端联系人,而后,第一客户端在监测到用户在显示该第二客户端联系人的界面上执行了指定操作后,可相应的弹出用于输入转账数额的输入框,用户在查看到该输入框后,可在该输入框中输入想要转给第二客户端联系人的转账数额(该转账数额即为上述提到的消息),这样,第一客户端在接收到该转账数额后,可随后将该转账数额以转账请求消息的形式发送给第二客户端,与此同时,为了使用户中心能够成功的转译该转账请求消息以及使第二客户端联系人能够成功的接收到转译后的转账请求消息,第一客户端可将用户标识(即第二客户端联系人对应的用户标识)、第一客户端标识以及第二客户端标识携带在该转账请求消息中,这样一来,用户中心在接收到第一客户端通过第一服务器发送的转账请求消息后,可根据该转账请求消息中包含的第一客户端标识以及第二客户端标识,对该转账请求消息进行转译,得到转译后的转账请求消息,而后,用户中心在将该转译后的转账请求消息发送给第二客户端对应的第二服务器后,第二服务器可根据该转译后的转账请求消息中包含的用户标识,确定出需要将该转译后的转账请求消息发送给第二客户端的哪个联系人,继而在后续过程中,将该转译后的转账请求消息发送给该用户标识对应的第二客户端联系人,并最终完成整个转账过程。
以上为本申请实施例提供的消息发送的方法,基于同样的思路,本申请实施例还提供了消息发送的装置,如图6、7、8所示。
图6为本申请实施例提供的一种消息发送的装置结构示意图,具体包括:
接收模块601,接收第一客户端发送的消息;
选择规则模块602,根据所述消息中包含的第一客户端标识以及第二客户端标识,从预设的转译库中选择与所述第一客户端标识以及第二客户端标识相匹配的转译规则;
转译模块603,根据所述转译规则,将所述消息进行转译,得到转译后的消息,其中,所述转译后的消息能够被所述第二客户端解析并处理;
发送模块604,将所述转译后的消息发送给所述第二客户端,使得所述第二客户端对所述转译后的消息进行解析并处理。
所述接收模块601,接收与所述第一客户端对应的第一服务器发送的消息,其中,所述消息是第一客户端发送给所述第一服务器的;
所述发送模块604,将所述转译后的消息发送给与所述第二客户端对应的第二服务器,使得所述第二服务器在接收到所述转译后的消息后,将所述转译后的消息发送给所述第二客户端。
所述转译模块603,根据所述转译规则,将所述消息转译成标准消息,再将所述标准消息转译成能够被所述第二客户端解析并处理的转译后的消息。
所述转译模块603,确定所述消息中包含的操作类型信息和消息内容信息;针对所述操作类型信息,根据预设的操作类型转译规则,将所述操作类型信息转译成标准操作类型信息;针对所述消息内容信息,根据预设的消息内容转译规则,将所述消息内容信息转译成标准消息内容信息;
所述转译模块603,确定所述标准消息中包含的标准操作类型信息和标准消息内容信息;针对所述标准操作类型信息,根据预设的操作类型转译规则,将所述标准操作类型信息转译成能够被所述第二客户端解析并处理的转译后的操作类型信息;针对所述标准消息内容信息,根据预设的消息内容转译规则, 将所述标准消息内容信息转译成能够被所述第二客户端解析并处理的转译后的消息内容信息;将所述转译后的操作类型信息和转译后的消息内容信息封装为转译后的消息。
所述转译模块603,根据预设的操作类型转译规则,依次将所述操作类型信息中包含的操作类型参数进行转译,得到所述标准操作类型信息;
所述转译模块603,根据预设的消息内容转译规则,依次将所述消息内容信息中包含的消息内容参数进行转译,得到所述标准消息内容信息;
所述转译模块603,根据预设的操作类型转译规则,依次将所述标准操作类型信息中包含的标准操作类型参数进行转译,得到所述转译后的操作类型信息;
所述转译模块603,根据预设的消息内容转译规则,依次将所述标准消息内容信息中包含的标准消息内容参数进行转译,得到所述转译后的消息内容信息。
所述发送模块604,在将所述转译后的消息发送给所述第二客户端之前,对所述第一客户端进行鉴权,并确定鉴权通过。
所述消息包括聊天消息、转账请求消息、建立用户关系的消息中的至少一种。
当所述消息为转账消息时,所述消息中的操作类型信息包括转账操作信息,所述消息内容信息包括转账数额信息。
图7为本申请实施例提供的一种消息发送的装置结构示意图,具体包括:
接收消息模块701,接收用户输入的消息;
消息发送模块702,将所述消息基于用户账号发送给用户中心,使得用户中心在确定所述用户账号为预先注册在所述用户中心中的用户账号后,根据所述消息中包含的第一客户端标识以及第二客户端标识,从预设的转译库中选择与所述第一客户端标识以及第二客户端标识相匹配的转译规则,并将所述消息进行转译,得到能够使第二客户端解析并处理的转译后的消息,将所述转译后 的信息发送给所述第二客户端。
所述装置还包括:
显示模块703,显示所述第二客户端对应的联系人列表;
所述显示模块703,根据用户账号,向所述用户中心请求与所述用户账号对应的、且与所述第二客户端对应的联系人列表;其中,与所述用户账号对应的、且与所述第二客户端对应的联系人列表是预先通过所述第二客户端上传到所述用户中心的;接收所述用户中心返回的联系人列表并显示。
所述接收消息模块701,确定所述用户在所述第二客户端对应的联系人列表中选择的联系人;接收所述用户针对所述选择的联系人输入的消息;
所述消息发送模块702,将第一客户端标识和第二客户端标识携带在接收到的消息中,并发送给所述用户中心。
所述接收消息模块701,接收用户输入的向第二客户端的联系人发送消息的指令;接收用户输入的所述第二客户端的联系人的用户标识;接收用户针对所述用户标识输入的消息;
所述消息发送模块702,根据所述指令,将第一客户端标识和第二客户端标识添加到所述消息中,根据所述用户标识,将所述用户标识添加到所述消息中;将添加了第一客户端标识、第二客户端标识和所述用户标识的消息发送给用户中心。
图8为本申请实施例提供的一种消息发送的装置结构示意图,具体包括:
展示模块801,向第一用户以及第二用户展示网页操作页面;
接收模块802,接收所述第一用户通过所述网页操作页面发送的第一消息参数以及所述第二用户通过所述网页操作页面发送的第二消息参数;
确定模块803,确定所述第一消息参数所对应的第一客户端标识以及第二消息参数所对应的第二客户端标识;
生成模块804,根据所述第一消息参数以及第二消息参数,生成针对所述第一客户端标识以及第二客户端标识对应的转译规则;
保存模块805,将所述转译规则保存在转译库中,使得所述用户中心接收到第一客户端发送的消息后,根据所述转译规则,将所述消息转译成能够使所述第二客户端解析并处理的转译后的消息,并将所述转译后的消息发送给所述第二客户端。
本申请实施例提供一种消息发送的方法及装置,该方法用户中心从第一客户端发送的消息中确定出该消息所包含的第一客户端标识和第二客户端标识,并从预设的转译库中选择与该第一客户端标识和第二客户端标识相匹配的转译规则,而后,根据该转译规则,将所述消息进行转译,得到转译后的消息,并将该转译后的消息发送给第二客户端,进而使得该第二客户端在接收到该转译后的消息后,对该转译后的消息进行解析并处理。从上述方法中可以看出,由于用户中心可将第一客户端发送的消息转译成能够使第二客户端解析并处理的消息,因此,即使是不同的客户端,客户端也可以通过用户中心来接收其他客户端发送的消息,从而实现了不同客户端之间的消息互通,进而给用户带来了便利。
需要说明的是,实施例2所提供方法的各步骤的执行主体均可以是同一设备,或者,该方法也由不同设备作为执行主体。比如,步骤S301和步骤S306的执行主体可以为第一客户端,步骤303的执行主体可以为第一服务器;又比如,步骤301的执行主体可以为第一客户端,步骤303和步骤306的执行主体可以为第一服务器;等等。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和 /或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算 设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。

Claims (26)

  1. 一种消息发送的方法,其特征在于,包括:
    接收第一客户端发送的消息;
    当确定所述第一客户端发送的消息所基于的用户账号为预先注册在所述用户中心的用户账号时,根据所述消息中包含的第一客户端标识以及第二客户端标识,从预设的转译库中选择与所述第一客户端标识以及第二客户端标识相匹配的转译规则;
    根据所述转译规则,将所述消息进行转译,得到转译后的消息,其中,所述转译后的消息能够被所述第二客户端解析并处理;
    将所述转译后的消息发送给所述第二客户端,使得所述第二客户端对所述转译后的消息进行解析并处理。
  2. 如权利要求1所述的方法,其特征在于,接收第一客户端发送的消息,具体包括:
    接收与所述第一客户端对应的第一服务器发送的消息,其中,所述消息是第一客户端发送给所述第一服务器的;
    将所述转译后的消息发送给所述第二客户端,具体包括:
    将所述转译后的消息发送给与所述第二客户端对应的第二服务器,使得所述第二服务器在接收到所述转译后的消息后,将所述转译后的消息发送给所述第二客户端。
  3. 如权利要求1所述的方法,其特征在于,根据所述转译规则,将所述消息进行转译,得到转译后的消息,具体包括:
    根据所述转译规则,将所述消息转译成标准消息,再将所述标准消息转译成能够被所述第二客户端解析并处理的转译后的消息。
  4. 如权利要求3所述的方法,其特征在于,根据所述转译规则,将所述消息转译成标准消息,具体包括:
    确定所述消息中包含的操作类型信息和消息内容信息;
    针对所述操作类型信息,根据预设的操作类型转译规则,将所述操作类型信息转译成标准操作类型信息;
    针对所述消息内容信息,根据预设的消息内容转译规则,将所述消息内容信息转译成标准消息内容信息;
    将所述标准消息转译成能够被所述第二客户端解析并处理的转译后的消息,具体包括:
    确定所述标准消息中包含的标准操作类型信息和标准消息内容信息;
    针对所述标准操作类型信息,根据预设的操作类型转译规则,将所述标准操作类型信息转译成能够被所述第二客户端解析并处理的转译后的操作类型信息;
    针对所述标准消息内容信息,根据预设的消息内容转译规则,将所述标准消息内容信息转译成能够被所述第二客户端解析并处理的转译后的消息内容信息;
    将所述转译后的操作类型信息和转译后的消息内容信息封装为转译后的消息。
  5. 如权利要求4所述的方法,其特征在于,针对所述操作类型信息,根据预设的操作类型转译规则,将所述操作类型信息转译成标准操作类型信息,具体包括:
    根据预设的操作类型转译规则,依次将所述操作类型信息中包含的操作类型参数进行转译,得到所述标准操作类型信息;
    针对所述消息内容信息,根据预设的消息内容转译规则,将所述消息内容信息转译成标准消息内容信息,具体包括:
    根据预设的消息内容转译规则,依次将所述消息内容信息中包含的消息内容参数进行转译,得到所述标准消息内容信息;
    针对所述标准操作类型信息,根据预设的操作类型转译规则,将所述标准操作类型信息转译成能够被所述第二客户端解析并处理的转译后的操作类型 信息,具体包括:
    根据预设的操作类型转译规则,依次将所述标准操作类型信息中包含的标准操作类型参数进行转译,得到所述转译后的操作类型信息;
    针对所述标准消息内容信息,根据预设的消息内容转译规则,将所述标准消息内容信息转译成能够被所述第二客户端解析并处理的转译后的消息内容信息,具体包括:
    根据预设的消息内容转译规则,依次将所述标准消息内容信息中包含的标准消息内容参数进行转译,得到所述转译后的消息内容信息。
  6. 如权利要求1所述的方法,其特征在于,将所述转译后的消息发送给所述第二客户端之前,所述方法还包括:
    对所述第一客户端进行鉴权,并确定鉴权通过。
  7. 如权利要求1~6任一所述的方法,其特征在于,所述消息包括聊天消息、转账请求消息、建立用户关系的消息中的至少一种。
  8. 如权利要求7所述的方法,其特征在于,当所述消息为转账消息时,所述消息中的操作类型信息包括转账操作信息,所述消息内容信息包括转账数额信息。
  9. 一种消息发送的方法,其特征在于,包括:
    第一客户端接收用户输入的消息;
    将所述消息基于用户账号发送给用户中心,使得所述用户中心在确定所述用户账号为预先注册在所述用户中心中的用户账号后,根据所述消息中包含的第一客户端标识以及第二客户端标识,从预设的转译库中选择与所述第一客户端标识以及第二客户端标识相匹配的转译规则,并将所述消息进行转译,得到能够使第二客户端解析并处理的转译后的消息,将所述转译后的信息发送给所述第二客户端。
  10. 如权利要求9所述的方法,其特征在于,第一客户端接收用户输入的消息之前,所述方法还包括:
    所述第一客户端显示第二客户端对应的联系人列表;
    第一客户端接收用户输入的消息,具体包括:
    确定所述用户在所述第二客户端对应的联系人列表中选择的联系人;
    接收所述用户针对所述选择的联系人输入的消息;
    将所述消息发送给用户中心,具体包括:
    将第一客户端标识和第二客户端标识携带在接收到的消息中,并发送给所述用户中心。
  11. 如权利要求10所述的方法,其特征在于,所述第一客户端显示第二客户端对应的联系人列表,具体包括:
    所述第一客户端根据用户账号,向所述用户中心请求与所述用户账号对应的、且与所述第二客户端对应的联系人列表;其中,与所述用户账号对应的、且与所述第二客户端对应的联系人列表是预先通过所述第二客户端上传到所述用户中心的;
    接收所述用户中心返回的联系人列表并显示。
  12. 如权利要求9所述的方法,其特征在于,第一客户端接收用户输入的消息,具体包括:
    所述第一客户端接收用户输入的向第二客户端的联系人发送消息的指令;
    所述第一客户端接收用户输入的所述第二客户端的联系人的用户标识;
    所述第一客户端接收用户针对所述用户标识输入的消息;
    将所述消息发送给用户中心,具体包括:
    所述第一客户端根据所述指令,将第一客户端标识和第二客户端标识添加到所述消息中,根据所述用户标识,将所述用户标识添加到所述消息中;
    将添加了第一客户端标识、第二客户端标识和所述用户标识的消息发送给用户中心。
  13. 一种消息发送的方法,其特征在于,包括:
    用户中心向第一用户以及第二用户展示网页操作页面;
    接收所述第一用户通过所述网页操作页面发送的第一消息参数以及所述第二用户通过所述网页操作页面发送的第二消息参数;
    确定所述第一消息参数所对应的第一客户端标识以及第二消息参数所对应的第二客户端标识;
    根据所述第一消息参数以及第二消息参数,生成针对所述第一客户端标识以及第二客户端标识对应的转译规则;
    将所述转译规则保存在转译库中,使得所述用户中心接收到第一客户端发送的消息后,根据所述转译规则,将所述消息转译成能够使所述第二客户端解析并处理的转译后的消息,并将所述转译后的消息发送给所述第二客户端。
  14. 一种消息发送的装置,其特征在于,包括:
    接收模块,接收第一客户端发送的消息;
    选择规则模块,当确定所述第一客户端发送的消息所基于的用户账号为预先注册在所述用户中心的用户账号时,根据所述消息中包含的第一客户端标识以及第二客户端标识,从预设的转译库中选择与所述第一客户端标识以及第二客户端标识相匹配的转译规则;
    转译模块,根据所述转译规则,将所述消息进行转译,得到转译后的消息,其中,所述转译后的消息能够被所述第二客户端解析并处理;
    发送模块,将所述转译后的消息发送给所述第二客户端,使得所述第二客户端对所述转译后的消息进行解析并处理。
  15. 如权利要求14所述的装置,其特征在于,所述接收模块,接收与所述第一客户端对应的第一服务器发送的消息,其中,所述消息是第一客户端发送给所述第一服务器的;
    所述发送模块,将所述转译后的消息发送给与所述第二客户端对应的第二服务器,使得所述第二服务器在接收到所述转译后的消息后,将所述转译后的消息发送给所述第二客户端。
  16. 如权利要求14所述的装置,其特征在于,所述转译模块,根据所述 转译规则,将所述消息转译成标准消息,再将所述标准消息转译成能够被所述第二客户端解析并处理的转译后的消息。
  17. 如权利要求16所述的装置,其特征在于,所述转译模块,确定所述消息中包含的操作类型信息和消息内容信息;针对所述操作类型信息,根据预设的操作类型转译规则,将所述操作类型信息转译成标准操作类型信息;针对所述消息内容信息,根据预设的消息内容转译规则,将所述消息内容信息转译成标准消息内容信息;
    所述转译模块,确定所述标准消息中包含的标准操作类型信息和标准消息内容信息;针对所述标准操作类型信息,根据预设的操作类型转译规则,将所述标准操作类型信息转译成能够被所述第二客户端解析并处理的转译后的操作类型信息;针对所述标准消息内容信息,根据预设的消息内容转译规则,将所述标准消息内容信息转译成能够被所述第二客户端解析并处理的转译后的消息内容信息;将所述转译后的操作类型信息和转译后的消息内容信息封装为转译后的消息。
  18. 如权利要求17所述的装置,其特征在于,所述转译模块,根据预设的操作类型转译规则,依次将所述操作类型信息中包含的操作类型参数进行转译,得到所述标准操作类型信息;
    所述转译模块,根据预设的消息内容转译规则,依次将所述消息内容信息中包含的消息内容参数进行转译,得到所述标准消息内容信息;
    所述转译模块,根据预设的操作类型转译规则,依次将所述标准操作类型信息中包含的标准操作类型参数进行转译,得到所述转译后的操作类型信息;
    所述转译模块,根据预设的消息内容转译规则,依次将所述标准消息内容信息中包含的标准消息内容参数进行转译,得到所述转译后的消息内容信息。
  19. 如权利要求14所述的装置,其特征在于,所述发送模块,在将所述转译后的消息发送给所述第二客户端之前,对所述第一客户端进行鉴权,并确定鉴权通过。
  20. 如权利要求14~19所述的装置,其特征在于,所述消息包括聊天消息、转账请求消息、建立用户关系的消息中的至少一种。
  21. 如权利要求20所述的装置,其特征在于,当所述消息为转账消息时,所述消息中的操作类型信息包括转账操作信息,所述消息内容信息包括转账数额信息。
  22. 一种消息发送的装置,其特征在于,包括:
    接收消息模块,接收用户输入的消息;
    消息发送模块,将所述消息基于用户账号发送给用户中心,使得用户中心在确定所述用户账号为预先注册在所述用户中心中的用户账号后,根据所述消息中包含的第一客户端标识以及第二客户端标识,从预设的转译库中选择与所述第一客户端标识以及第二客户端标识相匹配的转译规则,并将所述消息进行转译,得到能够使第二客户端解析并处理的转译后的消息,将所述转译后的信息发送给所述第二客户端。
  23. 如权利要求22所述的装置,其特征在于,所述装置还包括:
    显示模块,显示所述第二客户端对应的联系人列表;
    所述接收消息模块,确定所述用户在所述第二客户端对应的联系人列表中选择的联系人;接收所述用户针对所述选择的联系人输入的消息;
    所述消息发送模块,将第一客户端标识和第二客户端标识携带在接收到的消息中,并发送给所述用户中心。
  24. 如权利要求23所述的装置,其特征在于,所述显示模块,根据用户账号,向所述用户中心请求与所述用户账号对应的、且与所述第二客户端对应的联系人列表;其中,与所述用户账号对应的、且与所述第二客户端对应的联系人列表是预先通过所述第二客户端上传到所述用户中心的;接收所述用户中心返回的联系人列表并显示。
  25. 如权利要求22所述的装置,其特征在于,所述接收消息模块具体用于,接收用户输入的向第二客户端的联系人发送消息的指令;接收用户输入的 所述第二客户端的联系人的用户标识;接收用户针对所述用户标识输入的消息;
    所述消息发送模块,根据所述指令,将第一客户端标识和第二客户端标识添加到所述消息中,根据所述用户标识,将所述用户标识添加到所述消息中;将添加了第一客户端标识、第二客户端标识和所述用户标识的消息发送给用户中心。
  26. 一种消息发送的装置,其特征在于,包括:
    展示模块,向第一用户以及第二用户展示网页操作页面;
    接收模块,接收所述第一用户通过所述网页操作页面发送的第一消息参数以及所述第二用户通过所述网页操作页面发送的第二消息参数;
    确定模块,确定所述第一消息参数所对应的第一客户端标识以及第二消息参数所对应的第二客户端标识;
    生成模块,根据所述第一消息参数以及第二消息参数,生成针对所述第一客户端标识以及第二客户端标识对应的转译规则;
    保存模块,将所述转译规则保存在转译库中,使得所述用户中心接收到第一客户端发送的消息后,根据所述转译规则,将所述消息转译成能够使所述第二客户端解析并处理的转译后的消息,并将所述转译后的消息发送给所述第二客户端。
PCT/CN2016/086349 2016-06-20 2016-06-20 一种消息发送的方法及装置 WO2017219174A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/086349 WO2017219174A1 (zh) 2016-06-20 2016-06-20 一种消息发送的方法及装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/086349 WO2017219174A1 (zh) 2016-06-20 2016-06-20 一种消息发送的方法及装置

Publications (1)

Publication Number Publication Date
WO2017219174A1 true WO2017219174A1 (zh) 2017-12-28

Family

ID=60783151

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/086349 WO2017219174A1 (zh) 2016-06-20 2016-06-20 一种消息发送的方法及装置

Country Status (1)

Country Link
WO (1) WO2017219174A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102202015A (zh) * 2011-06-09 2011-09-28 张李影 实现不同种类即时通信工具互通的方法和系统
CN103841141A (zh) * 2012-11-23 2014-06-04 腾讯科技(深圳)有限公司 一种多媒体通信系统和方法
CN103973545A (zh) * 2014-04-22 2014-08-06 腾讯科技(深圳)有限公司 即时消息的处理方法、装置及系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102202015A (zh) * 2011-06-09 2011-09-28 张李影 实现不同种类即时通信工具互通的方法和系统
CN103841141A (zh) * 2012-11-23 2014-06-04 腾讯科技(深圳)有限公司 一种多媒体通信系统和方法
CN103973545A (zh) * 2014-04-22 2014-08-06 腾讯科技(深圳)有限公司 即时消息的处理方法、装置及系统

Similar Documents

Publication Publication Date Title
EP3484125B1 (en) Method and device for scheduling interface of hybrid cloud
CN109831456B (zh) 消息推送方法、装置、设备及存储介质
CN108521858B (zh) 基于分组的数据通信的设备标识符相关操作处理
US10397147B2 (en) Method, apparatus and device for exchanging name card
EP3349400B1 (en) Method and device for realizing service function
US20180330362A1 (en) Payment processing method and apparatus, and intelligent device
US10063547B2 (en) Authorization authentication method and apparatus
TWI761385B (zh) 設備配置方法及裝置、系統
EP2901660B1 (en) Termininal interaction methods and related devices and systems
WO2015101320A1 (zh) 一种账号的生成方法、终端及后台服务器
CN106911666B (zh) 一种可穿戴智能设备及其消息处理方法、系统
US20190362314A1 (en) Event processing method and apparatus
CN112291364A (zh) 一种消息推送处理方法和装置
JP2018500670A (ja) 非構造化メッセージの処理
CN114217989A (zh) 设备间的服务调用方法、装置、设备、介质及计算机程序
CN112202744B (zh) 一种多系统数据通信方法和装置
CN113946739A (zh) 敏感数据查询方法、装置、设备及存储介质
US20230087220A1 (en) Data processing method and apparatus based on instant messaging, device, and storage medium
WO2017219174A1 (zh) 一种消息发送的方法及装置
TW201608834A (zh) 資訊互動方法和裝置
CN115632815A (zh) 一种数据的更新方法、装置、电子设备及存储介质
US11811884B1 (en) Topic subscription provisioning for communication protocol
CN114584615A (zh) 云服务协同交互方法、装置以及设备
US9319358B2 (en) Terminal interaction methods and related devices and systems
CN110855745B (zh) 一种通讯软件的程序的接入方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16905716

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16905716

Country of ref document: EP

Kind code of ref document: A1