Information processing method and system, electronic equipment, storage medium and program product
By encrypting and decrypting the user session information of the instant messaging service in the client and updating the encryption and decryption parameters on the server, the problem of user session information being easily stolen in the prior art is solved, and higher session security and user privacy protection are achieved.
Patent Information
- Application Number
- CN202411776821.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-04-22
AI Technical Summary
In existing instant messaging services, user session information is built on plain text user ID, which makes malicious people prone to steal user ID and sensitive information, causing security risks.
The user ID in the session identifier is encrypted using the encryption and decryption algorithm in the client, and the second encryption and decryption parameter is generated on the server and the encrypted and decrypted data is updated to ensure that the user-related information is stored and transmitted in ciphertext form.
Effectively reduce the risk of malicious people stealing user-related information, preventing multiple attacks, such as spam, harassment and scams, and improving conversation security and user privacy protection.
Smart Images

Figure CN119865486A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computing technology, and in particular to an information processing method, system, electronic device, storage medium and program product. Background Art
[0002] At present, the corresponding user session information of the instant messaging services provided by most platforms is built based on user identification (UID), which makes it easy for malicious people to steal the user identification of a specific user and other sensitive information such as account, mobile phone number, password, etc. by obtaining session information, and then abuse the stolen information, which brings great security risks to users. In addition, malicious people can also use the stolen user identification to carry out various attacks, such as sending spam, harassing other unfamiliar users, defrauding, etc. Therefore, it is extremely important to improve session security and protect user privacy. Summary of the invention
[0003] In view of the above problems, the present application is proposed to provide an information processing method, system, electronic device, storage medium and program product that solve the above problems or at least partially solve the above problems. Specifically,
[0004] In the first embodiment, the present application provides an information processing method. The method includes:
[0005] Retrieve local database;
[0006] Sending communication information of the instant session to the server based on the encrypted user-related information stored in the local database;
[0007] Among them, all the encrypted user-related information stored in the local database is received from the server.
[0008] In a second embodiment, the present application also provides an information processing method. The method includes:
[0009] Receiving communication information of an instant conversation sent by a client, wherein the communication information includes first ciphertext user-related information, wherein the first ciphertext user-related information is encrypted by the server using a first encryption and decryption parameter and then sent to the client;
[0010] Decrypting the ciphertext user-related information contained in the communication information to obtain plaintext user-related information;
[0011] Based on the plaintext user related information, perform corresponding information processing on the communication information;
[0012] Generate second encryption and decryption parameters;
[0013] Encrypting the plaintext user related information using the second encryption / decryption parameter to obtain second ciphertext user related information;
[0014] The second encrypted user-related information is sent to the client, so that the client updates the first encrypted user-related information stored in the local database to the second encrypted user-related information, so as to prepare for the subsequent sending of instant conversation communication information to the server according to the second encrypted user-related information stored in the updated local database.
[0015] In a third embodiment, the present application also provides an information processing method. The method includes:
[0016] Determine a session type of an instant session of a client;
[0017] According to the session type, obtaining a user identifier of the user participating in the instant session;
[0018] Based on the acquired user identifier, generating a plaintext session identifier of the instant session for the client;
[0019] Encrypting the plaintext session identifier to obtain a ciphertext session identifier;
[0020] The encrypted session identifier is sent to the client, and the client stores the encrypted session identifier as a kind of encrypted user related information in a local database, so as to subsequently send the communication information of the instant session to the server based on the encrypted user related information stored in the local database;
[0021] The acquired user identifications include at least: the user identification of the instant session creating user and the user identification of the client-side user; and all the encrypted user-related information stored in the client local database is received from the server.
[0022] In a fourth embodiment, the present application also provides an information processing method. The method includes:
[0023] Receiving a ciphertext session identifier sent by the server for an instant session of the client;
[0024] The encrypted session identifier is stored as encrypted user related information in a local database, so that the communication information of the instant session is subsequently sent to the server based on the encrypted user related information stored in the local database;
[0025] The encrypted session identifier includes the user identifier of the instant session participant, and all the encrypted user-related information stored in the local database is received from the server.
[0026] In a fifth embodiment, the present application also provides an information processing method. The method includes:
[0027] In response to an input operation triggered on the conversation interface, determining a target user mentioned in the input conversation message; the target user is one of the users participating in the instant conversation;
[0028] Obtaining the encrypted user identifier of the target user from the encrypted user related information stored in the local database;
[0029] The session message including the encrypted user identifier of the target user is sent to the server so that the server processes the session message.
[0030] Among them, the conversation interface is an interactive interface for an online conversation session; all encrypted user-related information stored in the local database is received from the server and includes the encrypted conversation identifier of the instant conversation; the encrypted conversation identifier includes the user identifiers of the instant conversation participants.
[0031] In a sixth embodiment, the present application also provides an information processing method. The method includes:
[0032] In response to a business card sending operation triggered on the conversation interface, determining a selected target user;
[0033] Obtaining the encrypted user identifier of the target user from the encrypted user related information stored in the local database;
[0034] Generating a user business card of the target user based on the encrypted user identifier of the target user;
[0035] The user business card is sent to a server, so that the server processes and forwards the user business card.
[0036] The session interface is an interactive interface of an online conversation session displayed on a client; all encrypted user-related information stored in a local database of the client is received from a server and includes an encrypted session identifier of the instant conversation and encrypted user identifiers of all users in an address book in the client; the encrypted session identifier includes user identifiers of users participating in the instant conversation; and the target user is a user in the address book and / or a user participating in the instant conversation.
[0037] In a seventh embodiment, the present application provides an information processing system, which includes: a server and multiple clients. The server is used to process session information of instant conversations between the multiple clients, wherein the instant conversations include online conversations; wherein the server is specifically used to implement the method provided in the second embodiment above. Any of the multiple clients is used to implement the methods provided in the first, third and fourth embodiments above.
[0038] In an eighth embodiment, the present application provides an electronic device, comprising: a memory and a processor, wherein the memory is used to store a program; and the processor is coupled to the memory and is used to execute the program stored in the memory to implement any of the above methods.
[0039] In a ninth embodiment, the present application provides a computer-readable storage medium storing a computer program, and the computer program can implement any of the above-described methods when executed by a computer.
[0040] In a tenth embodiment, the present application provides a computer program product, including a computer program, which implements any of the above-mentioned methods when executed by a processor.
[0041] In the technical solution provided by the embodiment of the present application, the server is used to process the session information of the instant conversation (including the online conversation) between multiple clients, and all the user-related information stored in the server is plain text, and all the user-related information stored in any of the multiple clients is ciphertext, and all the ciphertext user-related information stored in the client is received from the server. Specifically, all the ciphertext user-related information currently stored in the client can be called the first ciphertext user-related information, and the first ciphertext user-related information can be sent to the client after the server encrypts the corresponding plaintext user-related information using the first encryption and decryption parameter. During the instant conversation, any client will send the communication information of the instant conversation to the server based on the first ciphertext user-related information currently stored in the local database (such as a request to obtain relevant session information from the server, or a forwarding request to request to forward a session information to other clients). After receiving the communication information sent by the client, the server will decrypt the first ciphertext user-related information contained therein, so as to perform corresponding information processing on the communication information based on the plaintext user-related information obtained by decryption. The present application solution enables the user-related information used in the client to be stored in ciphertext, and the client has no decryption function. Compared with the traditional solution in which the client can decrypt to use the plaintext user-related information to process the session information internally, it can effectively reduce the risk of malicious persons stealing user-related information (such as user identification) from the client. Further, when the server determines that the conditions are met (such as when it is determined that the encryption and decryption parameter replacement conditions are met and the above-mentioned information processing result for the communication information is to determine that a session information needs to be pushed to the client), it will also generate a second encryption and decryption parameter, and then use the second encryption and decryption parameter (such as salt value) to encrypt the plaintext user-related information to obtain the second ciphertext user-related information, and send the second ciphertext user-related information to the client, so that the client can update the first ciphertext user-related information stored in the local database to the second ciphertext user-related information, and then the client will subsequently send the communication information of the instant session to the server according to the second ciphertext user-related information stored in the updated local database. By providing this encryption capability that supports the replacement of encryption and decryption parameters, the present solution can avoid the hidden danger of malicious persons breaking through attacks. Further, the above-mentioned user-related information includes the session identifier of the instant session, and the session identifier includes the user identifier of the user participating in the instant session. This solution allows the session identifier to include the user identifier, so that the user identifier can be removed through the session identifier for session message processing, without the need to additionally maintain the association relationship between the session identifier and the user identifier. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 An example diagram of a traditional conversation principle provided in an embodiment of the present application;
[0044] Figure 2 and Figure 3 A schematic diagram of the information processing method provided in the embodiment of the present application;
[0045] Figure 4 A schematic diagram of the structure of an information processing system provided in one embodiment of the present application;
[0046] Figure 5 and Figure 6 A schematic diagram of the interaction between the server and the client provided in the embodiment of the present application;
[0047] Figure 7 A structural block diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0048] At present, most platforms provide instant messaging services. For example, in the case of e-commerce platforms, the corresponding user session information of the instant messaging services provided in e-commerce platforms is based on user identification (UID), which makes it easy for malicious people to steal the user identification of a specific user and other sensitive information such as account, mobile phone number, password, etc. by obtaining user session information, thereby abusing the stolen information in multiple links such as shopping guides, transactions, and live broadcasts, which brings great security risks to users. Moreover, malicious people can also use the stolen user identification to carry out various attacks, such as botnet attacks (sending spam, etc.), thereby causing serious fraud risks to users. In addition, malicious people may also use the stolen user identification to make some requests in other domains, and then obtain some commercial information of the user corresponding to the user identification on the e-commerce platform side, and may even use the stolen user identification to harass and defraud other unfamiliar users on the platform, ultimately resulting in the inability to guarantee the safety of individual consumers on the platform.
[0049] See Figure 1As shown, in the client corresponding to the e-commerce platform, the message sending process relies on a large number of plaintext user identifiers. The malicious person can use the obtained user identifiers to do things like: query the friends of the user corresponding to the user identifier in the client, thereby harassing or defrauding the corresponding friend user; or, go to the personal information page of the user corresponding to the user identifier to add friends, thereby sending some marketing messages, fraudulent information, etc. to these added friends. All of these will make the safety of individual consumers in the client corresponding to the e-commerce platform unprotected.
[0050] As can be seen above, the main source of the above problems is the leakage of a large number of user UIDs, especially at the session level. Therefore, it is extremely important to upgrade the session to improve session security and protect user privacy, which can effectively curb the occurrence of various illegal behaviors such as attacks, harassment, fraud, etc., and ensure user safety and trust.
[0051] In order to improve session security, the existing relevant technical solution is: when creating a session and sending a session message, a unique ID such as UUID (Universally Unique Identifier) or self-incrementing ID is used as a session identifier (Session ID, abbreviated as SID) to transmit session information. This solution decouples the association between the session identifier and the user identifier, and the session information transmitted by the user will not cause the leakage of account information. However, the disadvantage of this solution is that it is necessary to additionally maintain the association between the session identifier and the user identifier of the user participating in the session, and when the message is sent, an additional query link will be queried to reversely query which users are bound to the session; in addition, the compatibility cost of historical session data is relatively high, and it cannot solve the risk of plaintext IDs (such as plaintext user identifiers and plaintext session identifiers) that have been transmitted online.
[0052] Therefore, it is necessary to provide a technical solution that can better improve session security management. Security management refers to upgrading the system to achieve the purpose of not revealing plaintext user identification and reduce malicious attacks.
[0053] Based on this, the present application provides a new information processing technology solution to improve session security and prevent user information (such as user identification, etc.) from being leaked. Among them, the main technical means adopted by the present application solution are: using an encryption and decryption algorithm to encrypt the user identification (UID) in the session identification (SID), so as to achieve better improvement of the overall security level of the message, and ensure that the black industry cannot obtain the real user identification and use the user identification to send related fraudulent messages; further, it is also combined with encryption and decryption rotation to ensure that when a malicious person uses encrypted data to attack, the message service side can update the encryption and decryption algorithm by changing the encryption and decryption parameters to generate new encrypted data, so that the part of the encrypted data previously obtained by the malicious person is invalidated. In the above, the replacement of encryption and decryption parameters may refer to but is not limited to: replacing a salt parameter in the encryption and decryption algorithm.
[0054] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below according to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0055] In addition, in some processes described in the specification, claims and the above-mentioned figures of the present application, multiple operations appearing in a specific order are included, and these operations may not be executed or executed in parallel in the order in which they appear in this article. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence, nor do they limit "first" and "second" to different types. The term "or / and" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example: A or / and B, indicating that A can exist alone, A and B can exist at the same time, and B can exist alone; the character " / " in this application generally indicates that the front and back associated objects are an "or" relationship. It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a product or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such product or system. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the product or system including the elements. In addition, the following embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.
[0056] The following is an introduction to the various embodiments provided in this application.
[0057] It should be noted that the user information (such as user-related information, including but not limited to user identification, session identification, user device information, user personal information, etc.) and data (including but not limited to data used for session messages, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0058] In order to facilitate the understanding of the present application, before introducing the embodiments provided by the present application, the vocabulary involved in the embodiments of the present application is first explained. It can be understood that this explanation is for a clearer understanding of the embodiments of the present application and does not necessarily constitute a limitation on the embodiments of the present application.
[0059] The session identifier (session ID or message session ID, SID) is the message bearer when users chat. All messages need to be generated within the session.
[0060] User ID (UID): The subject of message sending and receiving when a user chats.
[0061] Encryption and decryption algorithm: A technology used for information security, mainly used to protect the confidentiality and integrity of data.
[0062] Encryption and decryption rotation: When a malicious person is found to use old encrypted data to attack, new encrypted data can be generated by replacing the encryption and decryption parameters of the encryption and decryption algorithm (such as salt parameters), so that the malicious person cannot continue to attack with the old encrypted data.
[0063] Instant conversation refers to instant messaging conversation, which allows users to communicate in real time in various forms such as text, voice, video, etc. Specifically, instant conversation includes online dialogue conversation (such as online chat conversation).
[0064] Figure 2 A flow chart of an information processing method provided by an embodiment of the present application is shown. The method is applied to a client, which is one of multiple clients conducting an instant conversation. A client refers to an application that runs on an electronic device and provides an instant messaging service, such as an application corresponding to an e-commerce platform (which may be a web version or application software, etc.), an application corresponding to a social platform (which is a social application), etc. Among them, electronic devices may include but are not limited to any terminal devices such as mobile phones, tablets, personal computers (such as desktop computers, laptops), PDAs (Personal Digital Assistants), smart wearable devices, etc. Figure 2 As shown, the information processing method includes the following steps:
[0065] 101. Retrieve the local database;
[0066] 102. Sending communication information of the instant conversation to the server based on the encrypted user related information stored in the local database;
[0067] Among them, all the encrypted user-related information stored in the local database is received from the server.
[0068] In the above, the server is mainly used to process the session information of the user instant session between multiple clients. For the specific form description of the server, please refer to the relevant content in other embodiments.
[0069] In specific implementation, all user-related information stored in the server is in plain text, and accordingly, the server processes the session information of user instant sessions between multiple clients based on the plain text user-related information. When it is necessary to push the corresponding session information to the client, the plain text user-related information contained in the session information will be encrypted to send the session information containing the ciphertext user-related information to the corresponding client. The client can store the received ciphertext user-related information locally and call it when needed.
[0070] In this application, the user-related information includes the session identifier of the instant session, and the session identifier contains the user identifiers of the instant session participants. The session identifier of the instant session will be described in detail in other embodiments in conjunction with relevant examples, and will not be repeated here.
[0071] Based on this, the encrypted user-related information stored in the client's local database includes the encrypted session identifier of the instant conversation, specifically, the encrypted session identifier corresponding to the client. Moreover, the encrypted session identifier includes the user identifiers of the users participating in the instant conversation. In the above 101, the main purpose of the client calling its own local database is to be able to obtain the encrypted session identifier of the instant conversation from it, so as to trigger the execution of the above 102. Therefore, that is: the above 102 "sending the communication information of the instant conversation to the server based on the encrypted user-related information stored in the local database" can specifically include:
[0072] 1021. Obtain the encrypted session identifier of the instant session (specifically, the session identifier corresponding to the execution subject “client” of this embodiment) from all encrypted user-related information stored in the local database;
[0073] 1022. Based on the encrypted session identifier, send communication information of the instant session to the server.
[0074] In the above, the communication information sent to the server can be an acquisition request generated based on the encrypted session identifier to request to obtain the relevant session data of the instant session; or it can be a forwarding request to request to forward the second session information, which is generated based on the encrypted session identifier and the session message input by the client-side user on the instant session interface. That is, the communication information described in 102 above is an acquisition request or a forwarding request.
[0075] In the case where the communication information is a request for obtaining, after receiving the request for obtaining, the server will decrypt the ciphertext session identifier carried in the request for obtaining, so as to find the session message to be pushed to the client in the information such as the local storage according to the plaintext session identifier, so as to determine the first session information (response data) that the client needs to return for the request for obtaining based on the plaintext session identifier and the found session message. The above-mentioned session message found is sent to the server by another client among the multiple clients. Before the determined first session information is sent outward, the plaintext user-related information in the first session information will be encrypted again, so as to realize that the first session information containing the ciphertext user-related information is sent to the client, so as to complete the response to the request for obtaining sent by the client. Among them, if the found session message also contains user-related information (such as the user identifier of the user mentioned in the message (such as the user who is tagged), the user identifier, contact information (such as telephone number, email address), social account and other sensitive user information contained in the user business card), before the first session information is sent outward, the user-related information contained in the session message will also be encrypted.
[0076] Before performing the encryption process, the server will first determine whether it is necessary to replace the first encryption and decryption parameters of the current version, and if it is determined that it is necessary, it will generate the second encryption and decryption parameters, and then use the second encryption and decryption parameters to perform the encryption process. In addition, the version information corresponding to the second encryption and decryption parameters will be sent to the client, so that the client can determine whether it is necessary to update the information stored in the local database based on the received version information.
[0077] Of course, after receiving a session message sent by any of the multiple clients, the server can also actively push it to the corresponding client without waiting for a request. For example, assuming that the execution subject of this embodiment is a client A among multiple clients, then when the above communication information is the second session information sent by client A to the server, then: when the server receives the second session information, it will first decrypt the plaintext user related information (such as ciphertext session identifier, ciphertext user identifier, other ciphertext user sensitive information (such as ciphertext contact information, etc.) contained in the second session information before performing subsequent processing, such as storing, forwarding, etc. the session message according to the decrypted plaintext session identifier. Among them, in addition to forwarding to the outside, relevant encryption processing will still be performed first.
[0078] For a detailed description of the above-mentioned implementation of the server functions, please refer to the relevant content in other embodiments.
[0079] Based on the above content, the method provided in this embodiment may also include the following steps:
[0080] 103. Receive first session information sent by the server for the instant session and version information corresponding to the encrypted user related information in the first session information;
[0081] 104. Compare the received version information with the version information stored in the local database;
[0082] 105. When the comparison result is different, it is determined that the server has changed the encryption and decryption parameters when performing encryption processing to obtain the ciphertext user related information in the first session information, and updates the local database according to the received ciphertext user related information and version information.
[0083] In specific implementation, the version information corresponding to the ciphertext user-related information in the above-mentioned first session information can be understood to refer to the version information corresponding to the encryption and decryption parameters used by the server to encrypt the plaintext user-related information in the first session information, and the version information corresponding to the encryption and decryption parameters can be understood to be the version information of the encryption and decryption algorithm. When the received version information is different from the version information stored in the local database, it means that the server has updated the encryption and decryption algorithm used by changing the encryption and decryption parameters (such as the salt value) when encrypting the first session information. Further, the client will update the corresponding ciphertext user-related information stored in the local database according to the received ciphertext user-related information, and update the version information stored in the local database to the received version information.
[0084] In addition, the client can also render and display the received first session information. Therefore, the method provided in this embodiment can also include the following steps:
[0085] 106. Display the first conversation information on the conversation interface of the instant conversation.
[0086] The encrypted user-related information in the first session information includes an encrypted session identifier. After receiving the first session information, the client can determine the corresponding instant session according to the encrypted session identifier included therein, and render and display the session message included in the first session information on the session interface of the instant session.
[0087] That is, the above 106 “displaying the first conversation information on the conversation interface of the instant reply” may include:
[0088] 1061. Obtain a ciphertext session identifier from the ciphertext user related information included in the first session information;
[0089] 1062. Display the session message included in the session information on the session interface corresponding to the ciphertext session identifier.
[0090] The above ciphertext session identifier includes the ciphertext user identifiers of the users participating in the session. For the description of the session identifier, please refer to the relevant contents in other embodiments.
[0091] In this application, the encrypted session identifier of the instant conversation stored in the client is generated by the server. Based on this, from the perspective of the encrypted session identifier, this application also provides an information processing method for the application client, which includes the following steps:
[0092] S11, receiving a ciphertext session identifier sent by the server for an instant session of the client;
[0093] S12: storing the encrypted session identifier as encrypted user-related information in a local database, so as to subsequently send the communication information of the instant session to the server based on the encrypted user-related information stored in the local database.
[0094] The encrypted session identifier includes the user identifier of the instant session participant, and all encrypted user-related information stored in the client local database is received from the server.
[0095] The generation and implementation of the encrypted session identifier and the description of the user identifiers of the instant session participants that may be included in the encrypted session identifier will be described in detail below and will not be described in detail here.
[0096] In some instant conversations, some extended protocol functions are also supported, such as "@" and sending user business cards. These functions also contain user-related information, such as the user ID of the user being tagged (the user being tagged is generally one of the users participating in the instant conversation), the user ID contained in the user business card, contact information (such as telephone number, email address), social account and other user information of the corresponding user. In order to further improve the security of the conversation, encryption is also supported for the user-related information involved in the extended protocol function in the instant conversation. Based on this, the ciphertext user-related information stored in the local database of the client may also include: the ciphertext user ID of all users in the address book of the client. The users in the address book are generally friends added by the user on the client side. In specific implementation, when the client applies to the server to add a friend, the server will encrypt the user-related information (such as the user ID) of the added friend and return it to the client, so that the client can save the ciphertext user ID of the added friend in the local database. Subsequently, based on this ciphertext user ID, it is possible to send a user business card, apply to establish a corresponding instant conversation, tagged the corresponding user, and so on.
[0097] In this application, the instant conversation includes an online conversation session. An online conversation session is an online chat mode that supports multiple media contents such as text, voice, video, and documents.
[0098] Based on the above content, the present application also provides corresponding method embodiments for the extended protocol functions such as "@" and "send business card" in the instant conversation, which are all applied to the client. The details are as follows:
[0099] For the extended protocol function of "@", the present application provides an information processing method comprising the following steps:
[0100] 201. In response to an input operation triggered on a conversation interface, determine a target user mentioned in an input conversation message; the target user is one of the users participating in the instant conversation;
[0101] 202. Obtain the encrypted user identifier of the target user from the encrypted user related information stored in the local database;
[0102] 203. Send the session message including the encrypted user identifier of the target user to the server, so that the server processes the session message;
[0103] The session interface is an interactive interface for an instant session; all encrypted user-related information stored in the local database is received from the server and includes the encrypted session identifier of each participating user of the instant session.
[0104] When the target user is one of the instant session parameter users, he may also be one of all the users in the address book in the client. And all the ciphertext user related information stored in the local database of the client may also include the ciphertext user related information (such as ciphertext user ID) of each user in the address book. Therefore, when the target user is also a user in the address book, specifically, the ciphertext user ID of the target user can also be obtained by searching the ciphertext user ID of each user in the address book stored in the local database.
[0105] Furthermore, all the encrypted user-related information stored in the local database may also include the encrypted session identifier of the instant session, which also includes the user identifiers of the instant session participants. When the client sends a session message, it may send the encrypted session identifier and the session message (including the encrypted user identifier of the target user) to the server, which can be understood as sending a session message including the encrypted session identifier and the session message to the server, so that the server can perform corresponding processing (such as decryption, storage, encryption, forwarding, etc.).
[0106] For the processing implementation of the server for the received session information, please refer to the relevant content in other embodiments, which will not be described in detail here.
[0107] For the extended protocol function of "sending business card", the present application provides an information processing method comprising the following steps:
[0108] 301. In response to a business card sending operation triggered on a conversation interface, determine a selected target user;
[0109] 302. Obtain the encrypted user identifier of the target user from the encrypted user related information stored in the local database;
[0110] 303. Generate a user name card of the target user based on the encrypted user identifier of the target user;
[0111] 304. Send the user business card to a server, so that the server processes and forwards the user business card.
[0112] Among them, the session interface is an interactive interface of the instant session displayed on the client; all the encrypted user-related information stored in the local database of the client is received from the server, and includes the encrypted session identifier of the instant session and the encrypted user identifiers of all users in the address book in the client; the encrypted session identifier includes the user identifier of the user participating in the instant session; the target user is a user in the address book and / or a user among the users participating in the instant session.
[0113] In specific implementation, after obtaining the ciphertext user identifier of the target user, the client can send a request to the server based on the ciphertext user identifier of the target user to request the user information of the target user. The user information of the target user may include but is not limited to: nickname, personal avatar picture, personal profile, contact information (such as telephone number, email address, etc.), social account (such as social media account link), and other information (such as position, company, geographic location, etc.). In response to the received request, the server will decrypt the ciphertext user identifier of the target user carried in the request, and search for the user information of the target user in its own local database based on the plaintext user identifier of the target user obtained by decryption, and return the user information of the target user found to the client. Among them, before returning, if it is determined that the user information of the target user contains sensitive user information (such as contact information, social account, etc., these user-related information), the user information of the target user is sent to the client after the sensitive user information is encrypted. The client will encapsulate the received user information of the target user into a user business card, and send the user business card as a special session message to the server for processing by the server. The client will also send the encrypted session identifier of the instant conversation obtained from its local database to the server, so that the server can determine the recipient of the user business card according to the plaintext session identifier after decryption. In addition, the server's processing of the received user business card may include but is not limited to: decrypting the encrypted data in the user business card, verifying whether the format and content of the user business card are correct, storing the user business card (the user business card can be stored in the local database or cache), and forwarding the user business card (forwarding the user business card to the specified recipient, and encrypting the sensitive information in the user business card before forwarding).
[0114] Based on this, the “sending the user business card to the server” in 304 may include:
[0115] 3041. Obtain the encrypted session identifier corresponding to the instant session (that is, the encrypted session identifier corresponding to the client) from the encrypted user related information stored in the local database;
[0116] 3042. Send the encrypted session identifier and the user business card as a session message to the server.
[0117] It should be supplemented here that: for relevant contents not described in detail in the above-mentioned method embodiment applied to the client, reference can be made to relevant contents in other embodiments.
[0118] The above-described embodiments are described from the perspective of the client. From the perspective of the server, the present application also provides an information processing method. The server is an instant messaging server (also called a message server). Specifically, the server may be, but is not limited to, a single physical server, a server cluster consisting of multiple physical servers, a virtual server, a cloud server, etc. Figure 3 As shown, the information processing method includes the following steps:
[0119] 401. Receive communication information of an instant conversation sent by a client, wherein the communication information includes first ciphertext user related information, and the first ciphertext user related information is encrypted by the server using a first encryption and decryption parameter and then sent to the client;
[0120] 402. Decrypt the first ciphertext user-related information to obtain corresponding plaintext user-related information;
[0121] 403. Based on the plaintext user related information, perform corresponding information processing on the communication information;
[0122] 404. Generate second encryption and decryption parameters;
[0123] 405. Encrypt the plaintext user-related information using the second encryption / decryption parameter to obtain second ciphertext user-related information;
[0124] 406. Send the second encrypted user-related information to the client, so that the client updates the first encrypted user-related information stored in the local database to the second encrypted user-related information, so as to prepare for sending communication information of the instant conversation to the server later according to the second encrypted user-related information stored in the updated local database.
[0125] In this application, an instant conversation is an instant messaging service provided in the client. An instant messaging service is a service that allows users to send and receive messages in real time over the Internet. This service often supports multiple functions such as one-to-one chat, group chat, file transfer, voice and video calls, etc.
[0126] In the actual instant messaging process (such as online chat conversation), the session information sent by the user through the client will first be transmitted to the server through the network, and the server will process and forward the session information to the corresponding receiving client. Generally, if the receiving party is online, the session information will be sent in real time, and if the receiving party is offline, the session information will be saved in the corresponding database and sent after the other party comes online. The receiving party can be a single user, multiple users or a group, etc. That is, the server is mainly responsible for processing the client's request, maintaining the client's connection information, and processing and forwarding the session information.
[0127] Based on this, in this application, the server is mainly used to process the session information of the instant messaging sessions of users between multiple clients. In specific implementation, all user-related information stored in the server is plain text, and accordingly, the server processes the session information of the instant messaging sessions of users between multiple clients based on the plain text user-related information.
[0128] In the above 401, the client is one of multiple clients and can be a receiving client and / or a sending client. In the case of a receiving client, the communication information can be a request to obtain the relevant session message of the instant session. In the case of a sending client, the communication information can be a forwarding request sent by the client to request to process and forward the second session information, and the second session information contains the session message input by the user on the client side. Regardless of the type of communication information, the first ciphertext user-related information included in the communication information contains the ciphertext session identifier of the instant session (that is, the ciphertext session identifier corresponding to the client), the ciphertext session identifier contains the user identifier of the instant session participant, and the ciphertext session identifier is obtained by the client from all the ciphertext user-related information stored in its own local database for the current instant session. All the ciphertext user-related information stored in the client's own local database is received from the server, and the aforementioned first ciphertext user-related information is one of the ciphertext user-related information stored in the client's own local database.
[0129] For the specific form description of the client, please refer to the relevant content in other embodiments, which will not be described in detail here.
[0130] And, it is understandable that in this application, an instant conversation refers to: a conversation between multiple clients in an instant messaging service, which is created by the server according to the client request, and multiple client users can pass messages through the conversation. In specific implementation, an instant conversation includes at least an online chat dialogue session (such as a single chat, a group chat), and an instant conversation can be, for example, a single chat session (such as a normal single chat session, a customer service session, etc.) or a group chat session. In addition, an instant conversation is usually identified by a unique session identifier (SID) to ensure that the conversation message can be correctly routed to the corresponding session.
[0131] Based on the above content, in the above 402, the plaintext user related information obtained by decryption includes: the plaintext session identifier of the instant session. The server uses the current version encryption and decryption algorithm to implement decryption, and the encryption and decryption parameters corresponding to the current version encryption and decryption algorithm are the first encryption and decryption parameters.
[0132] Furthermore, in the case where the communication information is an acquisition request, the above 403 "based on the plaintext user related information, performing corresponding information processing on the communication information" may include:
[0133] 4031. Search for a session message that needs to be pushed to the client according to the plaintext session identifier obtained by decryption;
[0134] 4032. Determine first session information that needs to be pushed to the client based on the plaintext session identifier and the found session message.
[0135] The above steps 4031 to 4032 actually describe a passive triggering instance in which the server performs "determining the first session information that needs to be pushed to the client." Passive triggering refers to the client initiating a request to obtain information from the server. Since all user-related information stored in each client is encrypted, when the client sends a request to the server (such as a request to obtain information, a request to send information), the user-related information carried in the request (such as a session identifier) will be encrypted. When the server responds to the client request, it will first perform decryption processing, and then trigger the subsequent internal processing steps (such as "determining the first session information that needs to be pushed to the client") based on the request. Based on this, in the passive triggering scenario, for the above steps 4031 to 4032, a detailed description may include the following steps 4030 to 4032:
[0136] 4030. In response to the acquisition request sent by the client, decrypt the ciphertext session identifier carried in the acquisition request to obtain the plaintext session identifier;
[0137] 4031. Searching for a session message to be pushed to the client according to the plaintext session identifier obtained by decryption;
[0138] 4032. Determine first session information that needs to be pushed to the client based on the plaintext session identifier and the found session message.
[0139] In the above 4030, the client can call the local database through the encryption module (also called the rotating encryption module) therein, and obtain the ciphertext session identifier of the instant session from the local database, thereby generating a retrieval request based on the ciphertext session identifier and sending it to the server.
[0140] In the above 4031, the session message found is sent to the server by another client (the sending client) among the multiple clients. The users among the multiple clients are in an instant session. When any of the clients sends a session message to the server, it will also send the corresponding ciphertext session identifier to the server, that is, the session information sent by any client to the server includes the ciphertext session identifier and the session message. After that, the server will decrypt the ciphertext session identifier and determine the recipient of the session message according to the plaintext session identifier. If the corresponding recipient is online, the server will encrypt the plaintext session identifier again to send the session information including the ciphertext session identifier and the session message to the client on the recipient side in real time. If the corresponding recipient is not online, the server will temporarily store the session message and send it after the recipient is online, such as sending it according to the client request on the recipient side (i.e. corresponding to the above steps 4030 to 4032). Among them, the server can store the received session message in the local database according to the plaintext session identifier, and the storage format includes but is not limited to "plaintext session identifier: session message".
[0141] In the above 4032, the first session information includes the session message and the session identifier to which the session message belongs (the plaintext session identifier corresponding to the client). The session identifier is key information for uniquely identifying a specific instant session, and different applications providing instant messaging services may use different strategies to generate the session identifier. In this embodiment, the session identifier contains at least the user identifiers of the users participating in the instant session. Specifically, the session identifier contains the user identifiers of all the users participating in the instant session, or the session identifier contains the user identifiers of some of the users participating in the instant session.
[0142] For example, in a one-on-one chat session in a two-person chat scenario, the session identifier may include the user identifiers of all participating users in the session. Exemplarily, user 1 and user 2 are having a one-on-one chat, and the user identifier of user 1 is userId1 and the user identifier of user 2 is userid2. The session identifier of the one-on-one chat session may include userId1 and userId2. In addition, it may also include its characters and / or fields, such as the "U" character and the "biztype" session type field. Among them, the full name of U can be User, and the session type represented by biztype is one-on-one chat. The above-mentioned two session identifiers userId1 and userId2 may be located between "U" and "biztype".
[0143] For another example, in a group chat session with more than two people, the session identifier may include the user identifiers of at least some of the users participating in the session. For example, during the session, for any user participating in the group chat session, the session identifier included in the session information sent by the client to the server may include: the user identifier of the creator of the group chat session and the user identifier of any user. In addition, other fields and / or characters may also be included, such as the "U" character and the "biztype" session type field. Among them, G stands for Group, biztype indicates that the session type is group chat, the user identifier of the creator of the group chat session may be located between "U" and "biztype", and the user identifier of any other user may be spliced after the "biztype" field by using, but not limited to, the "pound sign (#)".
[0144] Specifically, assuming that the group chat session is created by a request initiated by user 1 (whose user ID is userId1), then: during the session, for any other user participating in the group chat session, such as user 2 (whose user ID is userId2), the session identifier contained in the session information sent by the user may include: "U" character, "biztype" session type field, and userId1 between "U" and "biztype", and userId2 spliced after "biztype" by "pound sign (#)", so that the session identifier can be used to uniquely identify the interaction between the client side of user 2 and the server side in the group chat. Among them, the combination of "U", "biztype" and userId1 between "U" and "biztype" indicates that user 1 initiated the request to create a group entity of this group chat type.
[0145] Therefore, based on the above content, it can be understood that the session identifier is a type of user-related information included in the session information. That is, the user-related information included in the session information includes the session identifier.
[0146] At the same time, based on the above session identification example content, the server may also perform the following steps before processing the communication information of the instant session sent by the client:
[0147] S400a, determining a session type of an instant session of the client;
[0148] S400b, obtaining a user identifier of the instant conversation participant according to the conversation type;
[0149] S400c, generating a plaintext session identifier of the instant session for the client based on the acquired user identifier;
[0150] S400d. Encrypt the plaintext session identifier and send the encrypted ciphertext session identifier to the client, which stores the ciphertext session identifier as a ciphertext user-related information in a local database, so as to subsequently send the communication information of the instant session to the server based on the ciphertext user-related information stored in the local database.
[0151] In the above, the types of conversations include one-to-one chat and group chat. And the acquired user IDs of the instant conversation participants include at least: the user ID of the instant conversation creator (or instant conversation initiator) and the user ID of the client-side user.
[0152] And, accordingly, the specific implementation of the above S400c may include: generating a plaintext session identifier of the instant session for the client based on at least the user identifier of the instant session creator (or instant session initiator) and the user identifier of the client-side user.
[0153] For example, see Figure 4, assuming that the user identifier of the user on the client A side is userId1, the user identifier of the user on the client B side is userId2, the user identifier of the user on the client C side is userId3, and the client described in this embodiment (i.e., the client described in steps 401 and 400a) is client A. The user on the client A side initiates an online one-on-one chat (an instant conversation) with the user on the client B side. For this one-on-one chat, the plaintext session identifier generated by the server for client A may include: "U" character, "biztype" session type field, and _userId1 and userId2 located between "U" and "biztype", and _userId1 is located before userId2; and the plaintext session identifier generated for client B may include: "U" character, "biztype" session type field, and _userId1 and userId2 located between "U" and "biztype", and _userId2 is located before userId1. Alternatively, a user on the client A side initiates a group chat with users on the client B side and users on the client C side. For this group chat, the plaintext session identifier generated by the server for client A may include: the "G" character, the "biztype" session type field, _userId1 between "G" and "biztype", and userId1 spliced after bizType by, for example, "#"; the plaintext session identifier generated for client B may include: the "G" character, the "biztype" session type field, _userId1 between "G" and "biztype", and userId2 spliced after bizType by, for example, "#"; the plaintext session identifier generated for client C may include: the "G" character, the "biztype" session type field, _userId1 between "G" and "biztype", and userId3 spliced after bizType by, for example, "#".
[0154] From this example, it can be seen that when multiple clients conduct an instant conversation (such as an online chat conversation), the session identifier of each client is different. The session identifier corresponding to each client can be used to uniquely identify the interaction between this client and the server, ensuring that the state and data of each client are independent.
[0155] After the plaintext session identifier of the instant conversation is generated for the client, the above S400d will be triggered to encrypt the plaintext session identifier based on the current version of the encryption and decryption algorithm (corresponding to the use of the first encryption and decryption parameter), and send the encrypted ciphertext session identifier to the client for storage. Among them, the client will store the ciphertext session identifier as a ciphertext user related information (the first ciphertext user related information) in the local database, so that the communication information of the instant conversation can be sent to the server later based on the ciphertext user related information (specifically the first ciphertext user related information) stored in the local database.
[0156] Furthermore, in the present application, since the server processes the session information of the instant messaging sessions of multiple clients based on the plain text user related information, the first session information determined in 4032 contains the plain text user related information, and the plain text user related information includes the plain text session identifier of the instant messaging session corresponding to the client.
[0157] It should be noted that: the above describes an example of the server passively triggering the execution of "determining the first session information that needs to be pushed to the client". Of course, in some other embodiments, the server can also actively trigger the execution of "determining the first session information that needs to be pushed to the client". Active triggering means that the server directly forwards the received session message to the client on the receiving side according to certain rules or conditions (such as the receiving party is online), and the client does not need to initiate a request. For example, after receiving a session information containing a ciphertext session identifier and a session message, the server decrypts the ciphertext session identifier, and determines the corresponding receiving party according to the decrypted plaintext session identifier. If the receiving party is online, the server can actively trigger the execution of the above "determining the first session information that needs to be pushed to the client", so as to determine the decrypted plaintext session identifier and the received session message as the first session information that needs to be pushed to the client on the receiving side. Among them, if the receiving party is not online, the server can also push the first session information to the client on the receiving side, and this push mode is offline push. The details of offline push will be described in detail in the content related to step 4034 below.
[0158] Furthermore, after determining the first session information to be pushed to the client, the plaintext user-related information contained in the first session information may be encrypted before being sent out. Thus, the method provided in this embodiment may further include:
[0159] 4033. Encrypt the plaintext user related information contained in the first session information to obtain ciphertext user related information;
[0160] 4034. Send the first session information including the encrypted user related information to the client;
[0161] Based on the above example content, it can be known that in the above 4033, the plaintext user-related information included in the first session information includes a plaintext session identifier. And accordingly, in an implementation scheme, the "encrypting the plaintext user-related information included in the first session information" in the above 4033 may include:
[0162] 40331. Encrypt the plaintext session identifier included in the first session information.
[0163] In addition, the user identifier may not only exist in the session identifier, but also in the session message body, that is, in addition to media content such as text and pictures, the session message body may also contain some display protocol content agreed on by the end, and these display protocols themselves may also contain user identifiers. For example, in a group chat session, an "@" function is provided. The "@" function is mainly used to mention a specific member or all members in a group chat. When this "@" function is used when sending a session message, the user identifier of the user who is tagged will be included in the session message. For another example, when sending a business card message, the session message will also contain the corresponding user identifier or other sensitive information (such as contact information, etc.). When the above-mentioned "@" and "send business card" functions are implemented, the user identifier contained in the session message sent by the client to the server is also ciphertext. Accordingly, when the server implements the reception and forwarding of the session message, it is also necessary to decrypt and encrypt the user identifier contained in the session message.
[0164] Therefore, further, when the session message included in the first session information also contains user-related information, the encryption performed in the above step 4033 may also include:
[0165] 40332. Encrypt the plaintext user-related information contained in the first conversation message.
[0166] The plaintext user-related information contained in the conversation message includes, but is not limited to: the user ID of the user mentioned in the message (such as the user being tagged), and / or the user ID contained in the user's business card. In addition, the conversation message may also contain other sensitive user information, such as contact information (such as telephone number, email address), social account, etc., and encryption may also be supported for these types of user-related information.
[0167] After the encryption of the first session information to be pushed is completed, the above step 4034 will be triggered to send the first session information including the encrypted user-related information to the client, so that the client can perform message display rendering processing.
[0168] During specific implementation, a suitable method can be selected to send the first session information to the client according to the online status of the client. For example, if the message channel established between the server and the client is in a keep-alive state, the server can push the first session information to the client online in real time through this message channel. Among them, the above-mentioned message channel is a transmission service channel, and specifically, the message channel is a long link message channel. Therefore, when the long link established between the server and the client is in a keep-alive state, the server pushes the corresponding first session information to the corresponding client through the long link. If the long link between the server and the client is disconnected and not kept alive due to certain factors such as network problems or the client application is not opened, then the server's online real-time push of the first session information to the client through the message channel will fail. In this case, the push of the first session information can be done offline, and the offline push method can be but is not limited to the manufacturer channel. The manufacturer channel refers to the use of the push service provided by the device manufacturer to implement message push. Specifically, the manufacturer channel and the notification bar are important mechanisms to ensure that users can receive messages even when the application is not running or the terminal device is in a dormant state. Therefore, for example, when performing offline push, the corresponding first session information can be sent to the terminal device (electronic device) where the client is located. If the terminal device starts the notification, the first session information can be pushed to the notification bar through the manufacturer channel provided by the terminal device. The notification bar is an area provided by the device operating system for displaying various notifications from applications. Users can view and manage received messages through the notification bar.
[0169] Figure 5The schematic diagram of the principle of the server sending session information to the corresponding client is shown. Among them, the server includes two push modules, one of which is an offline push module (Push) for offline push of session information to the corresponding client, and the other is an online push module (Sync) for online real-time push of session information to the corresponding client through a message channel. In addition, the above-mentioned online push module can also push some data contents of other instant messaging functions to the client for the client to process. For example, the above-mentioned online push module can also push data contents such as "typing...", "personalized configuration", and "instant pop-up window". "Typing..." is a status prompt, specifically, it is used to show the status of the other party typing a message in an instant messaging session, which can improve the user's communication experience and reduce unnecessary waiting and misunderstandings. For example, in a one-to-one chat, when one party starts typing a message, the other party will see a prompt of "typing"; or in a group chat, when a member starts typing a message, other members will see the member's "typing" prompt. "Personalized configuration" refers to customized settings of the conversation interface (such as theme, color, font, font size, background image or animation) and functions (such as notification type, time and method, message reminder method, conversation sorting method, input assistance, message format) of the instant messaging conversation according to the needs and preferences of the user. "Instant pop-up window" is a window temporarily used to display important information or reminders on the conversation interface, which can be displayed anywhere on the conversation interface (such as the top, etc.).
[0170] Continue to see Figure 5 The server also includes an encryption and decryption module. The decryption and encryption processing performed by the aforementioned server are all implemented by the encryption and decryption module. The encryption and decryption algorithms used by the encryption and decryption module include but are not limited to: symmetric encryption and decryption, asymmetric encryption and decryption. Symmetric encryption and decryption refers to the use of the same key for encryption and decryption. Asymmetric encryption and decryption refers to the use of public key encryption and private key decryption. In the present application, the preferred encryption and decryption algorithm is symmetric encryption and decryption.
[0171] For other functional modules that the server may include, please refer to other embodiments for detailed description of the relevant content.
[0172] Furthermore, considering that when the client requests the server and the server sends session information to the client, both use encrypted user-related information, it is possible that as time goes by, malicious users record the acquired encrypted user-related information and perform collision decryption to obtain user-related information such as user IDs, and then use the acquired user IDs to carry out malicious attacks. Among them, collision decryption can refer to the use of credential stuffing attacks, such as obtaining user IDs and other information through information decryption in the form of data mapping. In view of the above situation, the encryption and decryption module in the server also has an encryption and decryption rotation function, which is used to replace the current version of the encryption and decryption algorithm when a malicious user is detected to have an attack. For example, if the encryption and decryption module currently uses a V1 version encryption and decryption algorithm, the encryption and decryption parameters in the encryption and decryption algorithm can be changed to switch the current V1 version encryption and decryption algorithm to a V2 version encryption and decryption algorithm. In this case, the ciphertext user-related data previously generated online will become invalid and incompatible data. Even if a malicious person obtains the previous ciphertext user-related information to make a request to the server, the server will return an error when processing the request. Based on this, before executing the above step 4033, this embodiment may also include the following steps:
[0173] S21, determining whether the encryption and decryption parameter replacement condition is met;
[0174] S22. When satisfied, generate a second encryption / decryption parameter and version information corresponding to the second decryption parameter, and accordingly: when the above 4033 is subsequently executed, the encryption processing is implemented based on the second encryption / decryption parameter.
[0175] S23. If it is not satisfied, then: when the above 4033 is subsequently executed, the encryption process is still implemented based on the first encryption and decryption parameter of the current version.
[0176] Based on this, the triggering execution of the aforementioned step 404 "generating second encryption and decryption parameters" may specifically include:
[0177] 4041. When it is determined that the encryption and decryption parameter replacement condition is met and the information processing result is that it is determined that the first session information needs to be pushed to the client, generate the second encryption and decryption parameter and version information corresponding to the second encryption and decryption parameter; wherein the first session information includes plain text user related information;
[0178] And, accordingly, when executing the aforementioned step 405 "using the second encryption and decryption parameter to encrypt the plaintext user related information to obtain the second ciphertext user related information", it may specifically include:
[0179] 4051. Use the second encryption and decryption parameters to encrypt the plaintext user-related information included in the first session information to obtain second ciphertext user-related information.
[0180] Further, when executing the aforementioned step 406 of "sending the second encrypted user related information to the client", it may specifically include:
[0181] 4061. Send the first session information including the second ciphertext user-related information and the version information corresponding to the second encryption and decryption parameters to the client.
[0182] When the client determines that the received version information is different from the version information currently stored locally, it updates the first encrypted user related information and version information stored in the local database according to the received second encrypted user related information and version information.
[0183] In the above S21, it is determined whether the encryption and decryption parameter replacement condition is met. It can be understood that it is determined whether the first encryption and decryption parameter of the current version needs to be replaced.
[0184] In the above S22 and step 4041, determining that the encryption and decryption parameter replacement conditions are met may include: detecting a malicious attack, and / or may also include reaching a set replacement time interval, for example, the encryption and decryption parameters may be regularly replaced every 2 days, every week, every month, etc.
[0185] Generally, in order to increase the security of encryption, especially when dealing with sensitive information such as user identification, salt is used in encryption and decryption algorithms (symmetric encryption and decryption algorithms). Salt is a randomly generated value, usually used with a password to increase the difficulty of cracking. And the salt value can be generated using a secure random number generator.
[0186] Based on this, the encryption and decryption parameters described above can be but are not limited to encryption and decryption salt values (salt values). Thus, in the above S22 and step 4041, when it is determined that the first encryption and decryption parameter of the current version of the encryption and decryption algorithm needs to be replaced, a salt value can be randomly generated as the second encryption and decryption parameter, and the version information corresponding to the second encryption and decryption parameter (i.e., the version information of the upgraded encryption and decryption algorithm) is generated, and the version information includes but is not limited to the version identifier (such as the version number). Further, when executing the above 4051, the second encryption and decryption parameter (the newly generated salt value) can be first combined with the plaintext user-related information to be encrypted, and then the encryption and decryption algorithm is used to encrypt the plaintext user-related information combined with the second encryption and decryption parameter to obtain the second ciphertext user-related information. Moreover, further, when executing the above step 4061, in addition to sending the first session information containing the second ciphertext user-related information to the client, the version information corresponding to the second encryption and decryption parameters will also be sent to the client, so that the client can determine whether the received ciphertext user-related information has undergone encryption and decryption rotation based on the received version information. If it has occurred, the corresponding first ciphertext user-related information stored locally will be updated with the second ciphertext user-related information received. Among them, the client can compare the received version information with the locally stored version information. If the comparison result is different, it will be determined that the received second ciphertext user-related information has undergone encryption and decryption rotation. Subsequently, the client will use this second ciphertext user-related information when making a request to the server, and the server will inevitably be able to decrypt the second ciphertext user-related information carried in the decryption request when processing the client request. Among them, when the server decrypts the second ciphertext user-related information carried in the request, the decryption process can be as follows: extract the corresponding second encryption and decryption parameters (salt value) from the locally stored data, then combine the second encryption and decryption parameters with the second ciphertext user-related information, and then use the encryption and decryption algorithm to decrypt the second ciphertext user-related information combined with the second encryption and decryption parameters.
[0187] The conversation scenarios corresponding to the aforementioned embodiments are real-time conversation scenarios, which include but are not limited to online voice conversations, online video conversations, online dialogue conversations, etc., wherein online dialogue conversations are online chat methods that support multiple media contents such as text, voice, video, and documents. With respect to the online dialogue conversation scenarios, this application also provides the following information processing method embodiments from the perspective of the server. Specifically:
[0188] The present application also provides an information processing method applied to a server, the method comprising the following steps:
[0189] 501. Responding to an acquisition request sent by a client, the acquisition request carries a ciphertext session identifier of an online conversation session;
[0190] 502. Decrypt the encrypted session identifier in the acquisition request to obtain a plaintext session identifier;
[0191] 503. Based on the plaintext session identifier, search for a session message that needs to be pushed to the client;
[0192] 504. Encrypt the plaintext session identifier to determine the first session information according to the ciphertext session identifier and the found session message;
[0193] 505. Send the first session information to the client.
[0194] Among them, all user-related information stored in the client is encrypted, and the user-related information includes a session identifier, and the session identifier includes user identifiers of users participating in the online dialogue session.
[0195] It should be noted that: for the contents not fully described in the steps of the method provided in the embodiment of the present application, please refer to the corresponding contents of the above embodiments, which will not be repeated here. In addition, in addition to the above steps, the method provided in the embodiment of the present application may also include other parts or all of the steps in the above embodiments, which can be specifically referred to the corresponding contents of the above embodiments, which will not be repeated here.
[0196] Another information processing method applied to a server is also provided in the present application, and the method comprises the following steps:
[0197] 601. Receive second session information of an online conversation session sent by a client, where the second session information includes encrypted user related information;
[0198] 602. Decrypt the ciphertext user related information to obtain plaintext user related information;
[0199] 603: Perform corresponding processing on the second session information according to the plain text session identifier included in the plain text user related information.
[0200] The plaintext session identifier includes a user identifier; all user-related information stored in the client is ciphertext; and the processing of the second session information includes at least one of the following: forwarding and storing. When forwarding the second session information, the plaintext user-related information is encrypted to forward the session information containing the ciphertext user-related information, wherein, when the session message included in the session information contains plaintext user-related information, the plaintext user-related information in the session message is also encrypted when forwarding.
[0201] It should be noted that: for the contents not fully described in the steps of the method provided in the embodiment of the present application, please refer to the corresponding contents of the above embodiments, which will not be repeated here. In addition, in addition to the above steps, the method provided in the embodiment of the present application may also include other parts or all of the steps in the above embodiments, which can be specifically referred to the corresponding contents of the above embodiments, which will not be repeated here.
[0202] The present application also provides an information processing system. Figure 4 The structural diagram of the information processing system is shown in FIG. Figure 4 The information processing system includes: a server and multiple clients (two or more clients).
[0203] The server is used to process the session information of the instant conversations between the multiple clients, where the instant conversations include online dialogue sessions; the server is specifically used to implement the above-mentioned information processing methods applied to the server provided in this application.
[0204] Any client among the multiple clients runs on a corresponding electronic device and is used to implement the steps in the information processing methods applied to the client provided in the above-mentioned application.
[0205] For the specific description of the server, client and electronic device, please refer to the relevant content in other embodiments.
[0206] In specific implementation, in the information processing system provided by this application, the core idea of information processing is as follows:
[0207] All user-related information stored in the server is in plain text, and accordingly, the server also processes session messages based on normal plain text user-related information. For example, the server normally uses plain text session identifiers (including plain text user identifiers UID) to store and deliver session messages. When the session message needs to be synchronized to the corresponding client (such as online real-time push or offline push to the client through the corresponding transmission service channel), the server will encrypt the session identifier and the user identifier contained in the session message at the exit, so as to synchronize the session information containing ciphertext user-related information to the corresponding client. The session information synchronized to the client includes the session message, and the ciphertext user message information contained therein includes not only the ciphertext session identifier, but also the ciphertext user identifier in the session message.
[0208] Also, for the client, it has no decryption function for the received information, and all user-related information stored therein is ciphertext, and accordingly, the client uses the encrypted field to request the server, wherein using the encrypted field to request the server means sending a request to the server based on the stored ciphertext user-related information (such as ciphertext session identifier, ciphertext user identifier). The server decrypts the ciphertext user-related information carried in the request at the entrance and then performs subsequent processing. Subsequent processing includes but is not limited to: user configuration, resource position (refers to the position used to display specific content or functions in the session interface, such as the top, top, left, right, etc.), group data, relationship platform, etc., and also includes session message query, storage, etc. Among them, if the client requests the server for related session messages, the subsequent main processing is: session message query.
[0209] For example, when the client needs to request relevant session messages from the server, it sends a request containing a ciphertext session identifier (and / or a ciphertext user identifier) to the server. The server will decrypt the ciphertext session identifier carried in the received request at the entry point and then perform subsequent processing, such as searching for the corresponding session message, encrypting the plaintext session identifier, encrypting the user identifier contained in the session message, determining the session information based on the encrypted data and the found session information to return the corresponding session information for the request, etc.
[0210] For another example, when the client needs to send a session message to the server, the request will carry the session message and the ciphertext session identifier. The server will decrypt the ciphertext session identifier carried in the request at the entry point before performing subsequent processing. For example, the session message is stored and forwarded according to the plaintext session identifier obtained by decryption. For the specific implementation of this, please refer to the relevant content in other embodiments.
[0211] Figure 5 The specific functional logical structures of the server and the client are shown, wherein for the server, the relevant functional logical structure of the server downlink data (ie, sending session information to the client) is mainly shown.
[0212] See Figure 5The functional logic structure of the server shown on the left side of the figure, the server includes: the application layer (located in the upper layer, also known as the service layer, etc.) is mainly used to process the logic and rule flow of specific functions of the application, such as interaction (such as likes, comments), message reporting, store cards, passwords, sharing, message business cards and other function implementation logic and rule flow. Furthermore, it also includes a message sending logic layer (also known as a message downlink logic layer), which is located below the application layer and is mainly used to implement the outward sending of session messages. Specifically, the application layer retrieves the session message (msg) sent by the client, and after the session message is transferred through the message sending logic layer, it will reach the encryption and decryption module for processing. In addition, the plaintext session identifier to which this session message belongs will also reach the encryption and decryption module for processing. The encryption and decryption module will encrypt the plaintext session identifier, and then send out the session information determined based on the ciphertext session identifier and the session message. Among them, if the session message also contains a user identifier, the encryption and decryption module will also encrypt the user identifier contained in the session message. And, when the session information is sent out, it is implemented through a push module (such as an online push module Sync or an offline push module Push). That is, the server also includes an encryption and decryption module and a push module, and the encryption and decryption module has an encryption and decryption rotation function. The detailed description of the encryption and decryption module and the push module can also be found in the relevant content of other embodiments.
[0213] In addition, the server also includes an external interface, which can be used to receive requests sent by the client, that is, the external interface can be a request entry provided by the server. Exemplarily, the external interface may include event reporting, session blacklisting and do not disturb, Amp code forwarding, message base layer (message ext), "input...", global configuration, user configuration, resource location, group data, relationship platform and other functional modules.
[0214] Among them, the Amp code conversion layer function module is mainly used for some code conversion to achieve compatibility between the new and old versions, because when the system is doing session upgrade, there is a new and old version migration process, and this conversion is to decrypt the encrypted data first and then convert it into the old protocol. The reason for converting it into the old protocol is: because there is a compatible logic in the process of session upgrade, this conversion is for compatibility. And, the above message ext (message base layer) refers to the message extension field, which may include custom fields or other additional content related to the message. For example, "At (@)" (@atUserIds), sending business cards and other extended protocols are all extended protocols in this message extension field ext. Based on this, in addition to media content such as text and pictures, the session message body can also include some extended protocols agreed on the client. These extended protocols themselves may also contain user identifiers. Therefore, in order to improve session security, the server will also encrypt and decrypt user-related information such as user identifiers contained in the session message. Therefore, this application will also support ciphertext capabilities (support encryption and decryption rotation capabilities) for @atUserIds, sending celebrities, etc.
[0215] And, see Figure 5 The client function logic shown on the right side is in the scenario where the client actively requests the server. For example, taking the case where the client actively requests the server for relevant session messages, the request sent by the client will reach the external interface of the server, and the external interface will send the request to the encryption and decryption module, so that the encryption and decryption module can decrypt the ciphertext user-related information in the request, such as the ciphertext session identifier (including the ciphertext user identifier), and then the server will respond based on the decrypted plaintext session identifier to return the corresponding session information to the client, and the client will render and display the received session information. Among them, the client includes an encryption module (or a rotating encryption module), and accordingly, the client can generate a corresponding request based on the ciphertext user-related information (such as the ciphertext session identifier and the plaintext user identifier) stored in the local database by calling the encryption module and send it to the server. For example, when requesting a related session message from the server, the encryption module can be used to find the corresponding ciphertext session identifier from the local database, and then generate a request based on the ciphertext session identifier and send it to the server; or, when sending a session message to other clients, the encryption module can be used to find the corresponding ciphertext session identifier from the local database, and then generate a forwarding request based on the ciphertext session identifier and the session message to be sent and send it to the server. In addition, the client can also use the encryption module to trigger the update of the ciphertext user-related information stored in the local database according to the received ciphertext user-related information.
[0216] In addition, the client may also include other functional modules, such as message settings page (profile), online status, "@", card and other functional modules. In addition, the client can also synchronize session messages through the gateway offline, that is, the client can also obtain relevant session messages from the server by pulling down (pulling through the gateway offline). For example, due to network problems, the client's long link with the server is broken, and the real-time communication is interrupted, so that the client cannot receive the session message sent by the sender. In this case, the session message sent by the sender has already been stored in the server (that is, it has been stored in the server). Therefore, the client can still pull the corresponding session message from the server by pulling.
[0217] Figure 6 The schematic diagram of the information processing principle in the information processing system provided in this application is shown. Figure 6 As shown, before the instant session is upgraded, all user-related information stored in the client is plain text, and the user-related information includes the user identifier UID, the session identifier SID (often containing the user identifier), etc. After the instant session is upgraded, for example, after the first upgrade, all user-related information stored in the client is the ciphertext of the V1 version. When a malicious person uses the user-related information of the V1 version to attack or request, the server will rotate the encryption and decryption parameters for the second upgrade. After the upgrade, all user-related information stored in the client is also the ciphertext of the V2 version. This type of encryption and decryption parameter rotation is performed for continuous upgrading. For the server, all user-related information stored in it is plain text, and it is only encrypted and decrypted at the entrance and exit, and the internal model and processing logic are changed. Specifically, the server decrypts the ciphertext data (ciphertext user-related information) in the received request at the entrance; and at the exit, the plaintext user-related information contained in the information to be synchronized to the client is encrypted and then pushed. Among them, the corresponding information is pushed to the client through the corresponding transmission service channel (such as the long link message channel, etc.).
[0218] Among them, before encryption, it can also be determined whether encryption upgrade is required, that is, whether encryption and decryption rotation is required. When necessary, new encryption and decryption parameters (such as salt value Slat2) will be generated through the encryption and decryption service provided by the key center, and the new encryption and decryption parameters will be used to perform encryption processing at the exit; and a rotation notification will be sent to the client, and the rotation notification carries the version information corresponding to the new encryption and decryption parameters (including version number, such as V2), so that the client can judge whether the server has performed encryption and decryption rotation according to the received version information, such as by comparing the received version information with the locally stored version information. If they are different, it means that the server has performed encryption and decryption rotation. Accordingly, the client will abolish the ciphertext user-related information stored locally, and the ciphertext user-related information returned by the server will prevail, that is, the client will update the ciphertext user-related information stored locally to the ciphertext user-related information returned by the server, and will also update the locally stored version information to the received version information. If the version information received by the client contains the V2 version number, after the update is completed, the server and the client will re-enter the V2 version of encryption and decryption logic information push. If the client does not determine whether the server has performed encryption and decryption rotation, it will not be able to update the locally stored data. Since the session information sent by the server to the client contains the V2 version of the ciphertext session identifier, ciphertext user identifier and other ciphertext data, this will cause the ciphertext session identifier of the V1 version stored locally on the client to be inconsistent with the ciphertext session identifier sent by the server, which will also cause the client to be unable to display the session message contained in the session information on the corresponding session interface.
[0219] The following points need to be supplemented here:
[0220] 1) The "user-bound version" shown above the arrow pointing from device service to encryption and decryption refers to the version information corresponding to the encryption and decryption parameters stored in the client, such as version V2.
[0221] 2) The system also provides grayscale capabilities, that is, different versions of the client will first be allowed to enter a grayscale logic for testing. If any problems occur during the test, it can be rolled back to the original initial version (plaintext version).
[0222] Among them, in the grayscale capability, the grayscale release is carried out according to the client version + user identification hash code value (userId.hashCode())% setting value (such as 10000, 100, etc.) = N, and once a problem occurs, it is rolled back to the initial version (plain text version) through the switch.
[0223] For example, the current client version (the version of the e-commerce platform) is 1.5.1, and then a 1.5.2 version of the client is released. Assuming that the 1.5.2 version of the client is released at a rate of 1% (that is, the set value is 100, N is 1), the hash value of the user ID of the user using the 1.5.2 version of the client and the remainder of 100 will be determined. Those users with a remainder of 1 will be grayed out, and then the ciphertext user-related information will be used on the client used by these users to implement the session to verify online whether the encryption and decryption logic provided by this application for the session is feasible. For the remaining clients that have not been grayed out, the plaintext user-related information will still be used to implement the session.
[0224] 3) Compatibility of external services: The client (providing open API, opening sessions, push, jump links and other services) is previously compatible, and the external output part needs to support plain text and cipher text, and the plain text ID is gradually downloaded according to the scenario.
[0225] It can be understood here that the session message is internal to the client itself, but on the client side, in addition to sending session messages, you can also click in the session message to jump to details (such as order details, product details, etc.), add cards, etc. These are currently compatible with plain text. Later, if other external domains (such as transactions, details) support ciphertext, the encryption and decryption logic provided by this application will be modified to replace it with a ciphertext scenario.
[0226] 4) The server has not changed the interface model and internal message processing logic. In addition, the client can transparently transmit gateway parameters to the server. The server can achieve encryption and decryption rotation by replacing the encryption and decryption parameters, and can determine the version information corresponding to the encryption and decryption parameters after the replacement. In addition, the server also returns the corresponding encrypted data after the encryption and decryption rotation (which is ciphertext user-related information, such as ciphertext session identifier and ciphertext user identifier). Among them, the client transparently transmits gateway parameters to the server, which can be understood as: transmitting some client-related information to the server through the gateway, such as the client's device information on the electronic device, device version information, IP on the device, etc.
[0227] 5) The client compares the received version information corresponding to the encryption and decryption rotation with the locally stored version information to determine whether to clean up the local database and reload the data. Reloading may refer to updating the locally stored ciphertext data and version information to the received ciphertext data and version information.
[0228] 6) The encryption and decryption service in the server is pure memory computing, replacing the plaintext UID at the entrance and exit, only taking up CPU resources, and no RPC call. RPC (Remote Procedure Call) is a service request from a remote computer program over the network.
[0229] In addition, the existing problems mentioned in the above description of the related technical solutions are solved by the present application solution as follows:
[0230] 1) The need to maintain the association between the session identifier SID and the user identifier UID, and the problem of one more query link when sending a message, is solved in the solution provided in this application as follows: the user identifier UID is used as the splicing field of the session identifier SID, so that the user identifier UID of the user can be reversed from the session identifier SID for use in sending session messages, without creating an association between the session and the user. That is, in this application, the user identifier is included in the session identifier.
[0231] 2) Regarding compatibility issues, since the actual stored data of the session is not modified in this application solution, but the data is encrypted and decrypted at the message transmission layer, there is no need to consider the compatibility issues between the new and old session identifiers SID. The session identifier SID essentially does not change at the server level, but the encryption and decryption of the session identifier SID is completed through the message encryption and decryption module SDK.
[0232] 3) By rotating encryption and decryption, the hidden danger of malicious persons attacking by means of data mapping is avoided. When malicious persons have an attack behavior, the encryption and decryption parameters (such as salt value) can be replaced by rotating encryption and decryption, thereby making it impossible for malicious persons to attack.
[0233] In summary, the present application scheme completes the decryption processing of the session identifier at the entrance and the encryption processing of the session identifier SID at the exit through the message encryption and decryption module SDK without changing the message core session creation link. In fact, the old session logic processing is still used in the logic inside the server, which ensures the stable switching of the system. At the same time, considering that subsequent malicious actors may break through this layer of defense by maintaining data mapping, the encryption and decryption rotation logic is also introduced. When a large number of malicious actors are found to attack through new ciphertext fields such as ciphertext session identifiers and ciphertext user identifiers, the server can consider replacing the encryption and decryption parameters (such as salt value) of the encryption and decryption algorithm to generate new ciphertext session identifiers, ciphertext user identifiers, etc., so that the old ciphertext session identifier cannot be used to obtain real data from the system.
[0234] This application also provides device embodiments corresponding to each method embodiment. The details are as follows:
[0235] The present application provides an information processing device, which is deployed on a client. The device includes: a retrieval module and a sending module. The retrieval module is used to retrieve a local database. The sending module is used to send communication information of an instant conversation to a server based on ciphertext user-related information stored in the local database. Among them, all ciphertext user-related information stored in the local database is received from the server.
[0236] Furthermore, the device also includes: a receiving module, a comparing module, and an updating module. The receiving module is used to receive the first session information sent by the server for the instant session and the version information corresponding to the ciphertext user related information in the first session information. The comparing module is used to compare the received version information with the version information stored in the local database. The updating module is used to determine that the server has changed the encryption and decryption parameters when performing encryption processing to obtain the ciphertext user related information in the first session information when the comparison result is different, and update the local database according to the received ciphertext user related information and version information.
[0237] Furthermore, the encrypted user-related information includes the encrypted session identifier of the instant session, and the encrypted session identifier includes the user identifier of the instant session participant. And, the sending module is specifically used to: obtain the encrypted session identifier of the instant session from all the encrypted user-related information stored in the local database; based on the encrypted session identifier, send the communication information of the instant session to the server. The communication information is a request to obtain related session information, or the communication information is a forwarding request to request forwarding processing of the second session.
[0238] The present application also provides an information processing device, which is deployed on the server side. The device includes: a receiving module, an encryption and decryption module, a processing module, a generating module, and a sending module. The above-mentioned receiving module is used to receive the communication information of the instant conversation sent by the client, and the communication information contains the first ciphertext user-related information, and the first ciphertext user-related information is sent to the client after the server side encrypts the plaintext user-related information using the first encryption and decryption parameter. The above-mentioned encryption and decryption module is used to decrypt the first ciphertext user-related information to obtain the plaintext user-related information. The above-mentioned processing module performs corresponding information processing on the communication information based on the plaintext user-related information. The above-mentioned generating module is used to generate a second encryption and decryption parameter. And, the above-mentioned encryption and decryption module is also used to encrypt the plaintext user-related information using the second encryption and decryption parameter to obtain the second ciphertext user-related information. The above-mentioned sending module is used to send the second ciphertext user-related information to the client, so that the client updates the first ciphertext user-related information stored in the local database to the second ciphertext user-related information, so as to prepare for the subsequent sending of the communication information of the instant conversation to the server according to the second ciphertext user-related information stored in the updated local database.
[0239] Furthermore, the generation module is specifically used to: when it is determined that the encryption and decryption parameter replacement condition is met, and the information processing result is to determine that the first session information needs to be pushed to the client, generate the second encryption and decryption parameter and the version information corresponding to the second encryption and decryption parameter. Wherein, when an attack is detected and / or the set replacement time interval is reached, it is determined that the encryption and decryption parameter replacement condition is met; the first session information includes plain text user related information;
[0240] Furthermore, the above-mentioned encryption and decryption module, when used to encrypt the plaintext user-related information using the second encryption and decryption parameters to obtain second ciphertext user-related information, is specifically used to: use the second encryption and decryption parameters to encrypt the plaintext user-related information contained in the first session information to obtain new ciphertext user-related information.
[0241] Furthermore, the sending module, when used to send the second ciphertext user-related information to the client, includes: sending the first session information including the second ciphertext user-related information and the version information corresponding to the second encryption and decryption parameters to the client. When the client determines that the received version information is different from the version information stored in the local database, the client updates the ciphertext user-related information and version information stored in the local database according to the received ciphertext user-related information and version information.
[0242] Furthermore, the first session information includes a session message and a plaintext session identifier to which the session message belongs (the plaintext session identifier corresponding to the client), the plaintext session identifier includes a plaintext user identifier of a user participating in the instant session; and the plaintext user-related information includes the plaintext session identifier. And, the encryption and decryption module, when used to encrypt the plaintext user-related information included in the first session information, is specifically used to: encrypt the plaintext session identifier included in the first session information.
[0243] Furthermore, the session message also contains plaintext user-related information. And, the encryption and decryption module, when used to encrypt the plaintext user-related information contained in the first session message, is also specifically used to: encrypt the plaintext user-related information contained in the session message. The plaintext user-related information contained in the session message includes: the user ID of the user mentioned in the message, and / or the user ID contained in the user's business card.
[0244] The present application also provides an information processing device, which is deployed on the server side. The device includes: a determination module, an acquisition module, a generation module, an encryption and decryption module, and a sending module. The above-mentioned determination module is used to determine the session type of an instant session of the client. The acquisition module is used to obtain the user identification of the user participating in the instant session according to the session type. The above-mentioned generation module is used to generate a plaintext session identification of the instant session for the client based on the acquired user identification. The above-mentioned encryption and decryption module is used to encrypt the plaintext session identification to obtain the ciphertext session identification. The above-mentioned sending module is used to send the ciphertext session identification to the client, and the client stores the ciphertext session identification as a ciphertext user-related information in the local database, so as to subsequently send the communication information of the instant session to the server based on the ciphertext user-related information stored in the local database. Among them, the acquired user identification at least includes: the user identification of the instant session creation user and the user identification of the client-side user; all the ciphertext user-related information stored in the client local database is received from the server.
[0245] The present application also provides an information processing device, which is deployed on a client. The device includes: a response module, an acquisition module, a generation module, and a sending module. The response module is used to determine the selected target user in response to a business card sending operation triggered on a conversation interface. The acquisition module is used to obtain the ciphertext user identifier of the target user from the ciphertext user related information stored in a local database. The generation module is used to generate a user business card of the target user based on the ciphertext user identifier of the target user. The sending module is used to send the user business card to a server so that the server processes and forwards the user business card. The conversation interface is an interactive interface of an instant conversation displayed on the client; all ciphertext user related information stored in the local database of the client is received from the server and includes the ciphertext conversation identifier of the instant conversation and the ciphertext user identifiers of all users in the address book of the client; the ciphertext conversation identifier includes the user identifier of the user participating in the instant conversation; the target user is a user in the address book and / or a user participating in the instant conversation.
[0246] The present application also provides an information processing device, which is deployed on the client. The device includes: a response module, an acquisition module, and a sending module. The above-mentioned response module is used to determine the target user mentioned in the input conversation message in response to the input operation triggered on the conversation interface; the target user is one of the users participating in the instant conversation. The above-mentioned acquisition module is used to obtain the ciphertext user identifier of the target user from the ciphertext user-related information stored in the local database. The above-mentioned sending module is used to send the conversation message containing the ciphertext user identifier of the target user to the server, so that the server processes the conversation message. Among them, the conversation interface is the interactive interface of the instant conversation; all the ciphertext user-related information stored in the local database is received from the server, and contains the ciphertext user identifiers of each participating user of the instant conversation.
[0247] What needs to be explained here about the above-mentioned devices is that the information processing devices provided by the above-mentioned embodiments can implement the technical solutions described in the above-mentioned corresponding method embodiments. The specific implementation principles of the above-mentioned modules or units can refer to the relevant contents in the above-mentioned corresponding method embodiments, and will not be described in detail here.
[0248] Figure 7 The structure diagram of an electronic device provided by an embodiment of the present application is shown, and the electronic device may be an electronic device where a server or a client is located. Figure 7As shown, the electronic device includes a memory 1101 and a processor 1102. The memory 1101 can be configured to store various other data to support operations on the electronic device. Examples of these data include instructions for any application or method operating on the electronic device. The memory 1101 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. Among them,
[0249] The memory 1101 is used to store programs;
[0250] The processor 1102 is coupled to the memory 1101 and is used to execute the program stored in the memory 1101 to implement the methods provided by the above-mentioned method embodiments.
[0251] Further, if Figure 7 As shown, the electronic device also includes: a communication component 1103, a display 1104, a power component 1105, an audio component 1106 and other components. Figure 7 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 5 Components shown.
[0252] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a computer, the steps or functions of the methods provided in the above-mentioned method embodiments can be implemented.
[0253] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, can implement the steps or functions of the methods provided in the above-mentioned method embodiments.
[0254] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM (Read Only Memory) / RAM (Random Access Memory), a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0255] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An information processing method, characterized in that: include: Retrieve local database; Sending communication information of the instant session to the server based on the encrypted user-related information stored in the local database; Among them, all the encrypted user-related information stored in the local database is received from the server.
2. The method according to claim 1, characterized in that Also includes: Receive the first session information sent by the server for the instant session and the version information corresponding to the encrypted user related information in the first session information; Compare the received version information with the version information stored in the local database; When the comparison result is different, it is determined that the server has changed the encryption and decryption parameters when performing encryption processing to obtain the encrypted user-related information in the first session information, and updates the local database according to the received encrypted user-related information and version information.
3. The method according to claim 1 or 2, characterized in that: The encrypted user related information includes the encrypted session identifier of the instant session, and the encrypted session identifier includes the user identifier of the instant session participating user; And, based on the encrypted user-related information stored in the local database, send the communication information of the instant session to the server, including: Obtaining the encrypted session identifier of the instant session from all encrypted user related information stored in the local database; Based on the ciphertext session identifier, sending communication information of the instant session to the server; The communication information is an acquisition request for requesting related session information, or the communication information is a forwarding request for requesting forwarding processing of the second session information.
4. An information processing method, characterized in that: include: Receiving communication information of an instant conversation sent by a client, wherein the communication information includes first ciphertext user-related information, wherein the first ciphertext user-related information is encrypted by the server using a first encryption and decryption parameter and then sent to the client; Decrypting the first ciphertext user-related information to obtain plaintext user-related information; Based on the plaintext user related information, perform corresponding information processing on the communication information; Generate second encryption and decryption parameters; Encrypting the plaintext user related information using the second encryption / decryption parameter to obtain second ciphertext user related information; The second encrypted user-related information is sent to the client, so that the client updates the first encrypted user-related information stored in the local database to the second encrypted user-related information, so as to prepare for the subsequent sending of instant conversation communication information to the server according to the second encrypted user-related information stored in the updated local database.
5. The method according to claim 4, characterized in that Generate the second encryption and decryption parameters, including: When it is determined that the encryption and decryption parameter replacement condition is met and the information processing result is that it is determined that the first session information needs to be pushed to the client, generating the second encryption and decryption parameter and version information corresponding to the second encryption and decryption parameter; When an attack is detected and / or a set replacement time interval is reached, it is determined that the encryption and decryption parameter replacement condition is met; the first session information includes plain text user related information.
6. The method according to claim 5, characterized in that The plaintext user related information is encrypted using the second encryption / decryption parameter to obtain second ciphertext user related information, including: Using the second encryption / decryption parameter, encrypt the plaintext user-related information contained in the first session information to obtain second ciphertext user-related information; And, sending the second ciphertext user related information to the client, including: Sending the first session information including the second ciphertext user-related information and the version information corresponding to the second encryption and decryption parameters to the client; When the client determines that the received version information is different from the version information stored in the local database, it updates the first encrypted user related information and version information stored in the local database according to the received second encrypted user related information and version information.
7. The method according to claim 6, characterized in that The first session information includes a session message and a plaintext session identifier to which the session message belongs, and the plaintext session identifier includes a plaintext user identifier of a user participating in the instant session; The plaintext user related information includes the plaintext session identifier; And, encrypting the plain text user related information contained in the first session information includes: The plaintext session identifier included in the first session information is encrypted.
8. The method according to claim 7, characterized in that The session message also contains plain text user related information; And, encrypting the plaintext user related information contained in the first session information further includes: Encrypting the plaintext user-related information contained in the session message; The plain text user-related information contained in the conversation message includes: the user identifier of the user mentioned in the message and / or the user identifier contained in the user's business card.
9. An information processing method, characterized in that: include: Determine a session type of an instant session of a client; According to the session type, obtaining a user identifier of the user participating in the instant session; Based on the acquired user identifier, generating a plaintext session identifier of the instant session for the client; Encrypting the plaintext session identifier to obtain a ciphertext session identifier; The encrypted session identifier is sent to the client, and the client stores the encrypted session identifier as a kind of encrypted user related information in a local database, so as to subsequently send the communication information of the instant session to the server based on the encrypted user related information stored in the local database; The acquired user identifications include at least: the user identification of the instant session creating user and the user identification of the client-side user; and all the encrypted user-related information stored in the client local database is received from the server.
10. An information processing method, characterized in that: include: In response to an input operation triggered on the conversation interface, determining a target user mentioned in the input conversation message; The target user is one of the users participating in the instant conversation; Obtaining the encrypted user identifier of the target user from the encrypted user related information stored in the local database; Sending the session message including the encrypted user identifier of the target user to the server so that the server processes the session message; The conversation interface is an interactive interface for an instant conversation; all encrypted user-related information stored in the local database is received from the server and includes encrypted user identifiers of all participating users of the instant conversation.
11. An information processing method, characterized in that: include: In response to a business card sending operation triggered on the conversation interface, determining a selected target user; Obtaining the encrypted user identifier of the target user from the encrypted user related information stored in the local database; Generating a user business card of the target user based on the encrypted user identifier of the target user; Sending the user business card to a server, so that the server processes and forwards the user business card; Among them, the session interface is an interactive interface of the instant session displayed on the client; all the encrypted user-related information stored in the local database of the client is received from the server, and includes the encrypted session identifier of the instant session and the encrypted user identifiers of all users in the address book in the client; the encrypted session identifier includes the user identifier of the user participating in the instant session; the target user is a user in the address book and / or a user participating in the instant session.
12. An information processing system, characterized in that: include: Server and multiple clients; The server is used to process the session information of the instant conversations between the multiple clients, wherein the instant conversations include online conversations; wherein the server is specifically used to implement the method described in any one of claims 4 to 9 above; Any client among the multiple clients is used to implement the method described in any one of claims 1 to 3, or to implement the method described in claim 10 or 11.
13. An electronic device, characterized in that: include: A memory and a processor, wherein The memory is used to store programs; The processor is coupled to the memory, and is configured to execute the program stored in the memory to implement the method according to any one of claims 1 to 11.
14. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a computer, the method according to any one of claims 1 to 11 can be implemented.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.