Display page rendering method and device, storage medium and electronic device

By storing user information in the application server and stripping away the registration identifier from the communication server, the risk of user sensitive data sharing and leakage in third-party instant communication services is solved, and the security and maintainability of user information are improved.

CN115695350BActive Publication Date: 2025-05-02HAIER YOUJIA INTELLIGENT TECH (BEIJING) CO LTD +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211152545.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-21
Publication Date
2025-05-02
Estimated Expiration
2042-09-21

AI Technical Summary

Technical Problem

For application clients that use third-party instant messaging services, some users' sensitive data may be forced to be shared with third-party instant messaging operators, which poses a risk of data leakage.

Method used

The user information is stored by the application server, and the user ID of the registered communication server is separated from the application user information, and only the user ID of the registered communication server is linked to the user ID of the registered application client, so that the user information is only stored in the application server.

Benefits of technology

It improves the maintainability of user information, reduces the risk of user information leakage, and reduces the dependence on third-party instant messaging operators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115695350B_ABST
    Figure CN115695350B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for rendering a display page, a storage medium and an electronic device, and relates to the field of smart home technology. The method for rendering a display page includes: receiving first session information sent by a communication server of a third-party instant communication, wherein an application client performs instant communication through a software development kit provided by the third-party instant communication, and the first session information includes: a first session list between a target object and a first session object and a first user identifier of the communication server registered by the session object; sending a first request information to an application server corresponding to the application client; receiving a first response information sent by the application server according to a second user identifier and the first session identifier, and rendering a display page of the application client according to the first response information, wherein the first response information includes: user information of the first session object and the second session object, and a second session list between the target object and the second session object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of smart home technology, and more specifically, to a method and device for rendering a display page, a storage medium, and an electronic device. Background Art

[0002] With the rapid development of Internet applications, Internet companies are gradually aware of the importance of user experience, so customer service instant messaging services have become particularly important. The development of major IM (instant messaging) operators in IM services has gradually improved its functionality, efficiency, convenience and security. Large-scale Internet companies can develop an instant messaging system or privatize and deploy IM services on their own servers to solve the above problems. If they develop an instant messaging system or privatize and deploy IM services on their own servers, the time, manpower and resource costs will be unimaginably high.

[0003] For small and medium-sized Internet companies that choose to purchase IM services and implant the software development kit (sdk) provided by IM operators into their own applications to complete the instant messaging function, most small and medium-sized Internet companies will encounter several realistic problems if they choose this technical solution. 1. The storage time of message records is short; 2. Some user sensitive information may be forced to be shared with IM operators, increasing the cost of user information maintenance, thus increasing the risk of information leakage; 3. Absolute dependence on IM operators. For the above problems, small and medium-sized Internet companies may choose to purchase more value-added services to extend the storage time of message records. The forced sharing of user information can only be avoided by reducing business operations as much as possible, and if they want to get rid of their dependence on a certain IM service, they can only spend a lot of resources on data migration.

[0004] Regarding the related technologies, for application clients that use third-party instant messaging services, some user sensitive information may be forced to be shared with the third-party instant messaging operator, resulting in the risk of data leakage, and no effective solution has yet been proposed. Summary of the invention

[0005] The embodiments of the present application provide a method and device for rendering a display page, a storage medium, and an electronic device, so as to at least solve the problem in the related art that, in an application client using a third-party instant messaging service, some user sensitive information may be forced to be shared with the third-party instant messaging operator, resulting in the risk of information leakage.

[0006] According to an embodiment of the present application, a method for rendering a display page is provided, which is applied to a client, and includes: receiving first session information sent by a communication server of a third-party instant communication, wherein the application client performs instant communication through a software development kit provided by the third-party instant communication, and the first session information includes: a first session list between a target object and a first session object and a first user identifier registered with the communication server by the first session object; sending first request information to an application server corresponding to the application client, wherein the first request information includes: the first user identifier, the first session identifier of the first session with the earliest timestamp in the first session list, and a second user identifier registered with the application client by the target object; receiving first response information sent by the application server according to the first user identifier, the second user identifier and the first session identifier, and rendering a display page of the application client according to the first response information, wherein the first response information includes: user information of the first session object and the second session object, and a second session list between the target object and the second session object.

[0007] In an exemplary embodiment, rendering the display page of the application client according to the first response information includes: deduplicating and merging the first session list and the second session list according to second session identifiers of multiple second sessions in the first session list and third session identifiers of multiple third sessions in the second session list to obtain a third session list; sorting all sessions in the third session list according to timestamps of all sessions to obtain a sorted fourth session list; and rendering the display page of the application client according to the fourth session list and user information of all session objects in the fourth session list.

[0008] In an exemplary embodiment, after rendering the display page of the application client according to the first response information, the method further includes: when the communication server receives the fourth session sent by the third session object, receiving the fourth session sent by the communication server; determining whether the fourth session is a newly added session according to the fourth session identifier of the fourth session and the fifth session identifier in the fourth session list; and when the fourth session is not a newly added session, directly sorting and rendering the display page of the application client.

[0009] In an exemplary embodiment, after determining whether the fourth session is a newly added session according to the fourth session identifier of the fourth session and the fifth session identifier in the fourth session list, the method further includes: if the fourth session is a newly added session, sending second request information to the application server, wherein the second request information is used to request to obtain user information of the third session object; receiving the user information of the third session object sent by the application server based on the second request information, and rendering a display page of the application client according to the user information of the third session object and the fourth session.

[0010] In an exemplary embodiment, after rendering the display page of the application client according to the first response information, the method further includes: in a case where the page turning logic is triggered by the conversation window between the target object and the fourth conversation object, determining whether all conversation messages between the target object and the fourth conversation object stored in the application server have been sent to the application client; in a case where all conversation messages between the target object and the fourth conversation object stored in the application server have not been sent to the application client, determining whether all conversation messages between the target object and the fourth conversation object stored in the communication server have been sent to the application client; in a case where all conversation messages between the target object and the fourth conversation object stored in the communication server have been sent to the application client, sending third request information to the application server through the backend interface of the application server, wherein the third request information is used to request to obtain historical conversation messages between the target object and the fourth conversation object.

[0011] In an exemplary embodiment, after rendering the conversation window between the target object and the conversation object according to the first response information, the method further includes: when the target object sends the fifth conversation to the fourth conversation object, sending the message body corresponding to the fifth conversation to the communication server; when the communication server successfully sends the fifth conversation to the application client corresponding to the fourth conversation object, receiving a feedback result sent by the communication server indicating that the fifth conversation is successfully sent, wherein when the communication server successfully sends the fifth conversation to the application client corresponding to the conversation object, the fifth conversation is sent to the application server.

[0012] In an exemplary embodiment, before receiving the first session information sent by the communication server of the third-party instant communication, the method also includes: when the target object successfully logs in to the application client, sending a fourth request information to the application server, wherein the fourth request information includes: the second user identifier; receiving the fourth user identifier of the target object registered on the communication server determined by the application server according to the second user identifier, and the key for the target object to log in to the communication server; and logging in to the communication server according to the fourth user identifier and the key.

[0013] According to another embodiment of the embodiment of the present application, a rendering device for a display page is also provided, including: a receiving module, used to receive first session information sent by a communication server of a third-party instant communication, wherein an application client performs instant communication through a software development kit provided by the third-party instant communication, and the first session information includes: a first session list between a target object and a first session object and a first user identifier of the first session object registered with the communication server; a sending module, used to send a first request information to an application server corresponding to the application client, wherein the first request information includes: the first user identifier, the first session identifier of the first session with the earliest timestamp in the first session list, and a second user identifier of the target object registered with the application client; a rendering module, used to receive a first response information sent by the application server according to the first user identifier, the second user identifier and the first session identifier, and render the display page of the application client according to the first response information, wherein the first response information includes: user information of the first session object and the second session object, and a second session list between the target object and the second session object.

[0014] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned display page rendering method when running.

[0015] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for rendering a display page through the computer program.

[0016] In an embodiment of the present application, first session information sent by a communication server of a third-party instant messaging is received, wherein the application client performs instant messaging through a software development kit provided by the third-party instant messaging, and the first session information includes: a first session list between a target object and a first session object and a first user identifier of the communication server registered by the first session object; a first request information is sent to an application server corresponding to the application client, wherein the first request information includes: the first user identifier, the first session identifier of the first session with the earliest timestamp in the first session list, and the second user identifier of the application client registered by the target object; a first response information sent by the application server according to the first user identifier, the second user identifier and the first session identifier is received, and The display page of the application client is rendered according to the first response information, wherein the first response information includes: user information of the first session object and the second session object, and a second session list between the target object and the second session object; the above technical solution is adopted to solve the problem that for an application client using a third-party instant messaging service, some user sensitive information may be forced to be shared with a third-party instant messaging operator, and there is a risk of information leakage. In this application, the application server stores the user information, and the user identifier registered with the communication server is separated from the application user information. Only the user identifier registered with the communication server and the user identifier registered with the application client are linked, so that the user information can be stored only in the application server, which improves the maintainability of the user information and reduces the risk of leakage of the user information. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0019] Figure 1 It is a hardware environment diagram of a method for rendering a display page according to an embodiment of the present application;

[0020] Figure 2 is a flowchart of a method for rendering a display page according to an embodiment of the present application;

[0021] Figure 3 is a timing diagram of logging into an application client according to an embodiment of the present application;

[0022] Figure 4 is a timing diagram of an application client loading a session list according to an embodiment of the present application;

[0023] Figure 5 is a timing diagram of an application client loading a message list according to an embodiment of the present application;

[0024] Figure 6 It is a structural block diagram of a rendering device for displaying a page according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with 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 ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] According to one aspect of an embodiment of the present application, a method for rendering a display page is provided. The method for rendering a display page is widely used in smart home, smart home, smart home device ecology, smart residential (Intelligence House) ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the above-mentioned method for rendering a display page can be applied to Figure 1 In the hardware environment composed of the terminal device 102 and the server 104 shown in FIG. Figure 1As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or a client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.

[0028] The network may include but is not limited to at least one of the following: wired network, wireless network. The wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 may be but is not limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart TV, a smart clothes drying rack, a smart curtain, a smart audio and video, a smart socket, a smart speaker, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.

[0029] In this embodiment, a method for rendering a display page is provided, which is applied to an application client. Figure 2 : is a flowchart of a method for rendering a display page according to an embodiment of the present application, the process comprising the following steps:

[0030] Step S202, receiving first session information sent by a communication server of a third-party instant messaging, wherein the application client performs instant messaging through a software development kit provided by the third-party instant messaging, and the first session information includes: a first session list between a target object and a first session object and a first user identifier of the first session object registered with the communication server;

[0031] Step S204, sending a first request message to the application server corresponding to the application client, wherein the first request message includes: the first user identifier, the first session identifier of the first session with the earliest timestamp in the first session list, and the second user identifier of the target object registering the application client;

[0032] Step S206: Receive a first response message sent by the application server according to the first user identifier, the second user identifier, and the first session identifier, and render a display page of the application client according to the first response message, wherein the first response message includes: user information of the first session object and the second session object, and a second session list between the target object and the second session object.

[0033] The user information includes but is not limited to: avatar, nickname, account number, address, telephone number and other information.

[0034] Through the above steps, first session information sent by a communication server of a third-party instant communication is received, wherein the application client performs instant communication through a software development kit provided by the third-party instant communication, and the first session information includes: a first session list between a target object and a first session object and a first user identifier of the communication server registered by the first session object; a first request information is sent to an application server corresponding to the application client, wherein the first request information includes: the first user identifier, the first session identifier of the first session with the earliest timestamp in the first session list, and the second user identifier of the application client registered by the target object; a first response information sent by the application server according to the first user identifier, the second user identifier and the first session identifier is received, And render the display page of the application client according to the first response information, wherein the first response information includes: user information of the first session object and the second session object, and a second session list between the target object and the second session object, which solves the problem in the related art that, for an application client using a third-party instant messaging service, some user sensitive information may be forced to be shared with a third-party instant messaging operator, resulting in the risk of information leakage. In the present application, the application server stores the user information, separates the user identifier registered with the communication server from the application user information, and only links the user identifier registered with the communication server and the user identifier registered with the application client, thereby only storing the user information in the application server, improving the maintainability of the user information and reducing the risk of leakage of the user information.

[0035] It should be noted that, in step S204, when the application server receives the first request information sent by the application client, the application server is further configured to perform the following operations:

[0036] The application server determines the first registration identifier of the first session object according to the correspondence between the first user identifier and the first registration identifier of the first session object registering the application client; determines the user information of the first session object according to the first registration identifier, and determines the session list corresponding to the target object stored in the application server according to the second user identifier, and searches the second session list in the session list in reverse order starting from the first session identifier.

[0037] In an exemplary embodiment, rendering a display page of the application client according to the first response information includes:

[0038] Step 1: deduplicating and merging the first session list and the second session list according to the second session identifiers of the plurality of second sessions in the first session list and the third session identifiers of the plurality of third sessions in the second session list to obtain a third session list;

[0039] Step 2: sorting all the sessions in the third session list according to the timestamps of all the sessions to obtain a sorted fourth session list;

[0040] Step 3: Rendering a display page of the application client according to the fourth session list and the user information of all session objects in the fourth session list.

[0041] That is, the application client deduplicates and merges the second session list returned by the application server with the first session list (keeping the latest session when deduplicating), and finally reorders them according to the time when the session messages were sent, and then renders the user information of all session objects in the sorted session list.

[0042] Furthermore, when the application client processes the paging logic, the application client deduplicates and merges the second session list returned by the application server with the first session list (retaining the latest session when deduplicating), and finally reorders them according to the time when the session messages are sent, and then renders the user information of all session objects in the sorted session list.

[0043] In an exemplary embodiment, a method for updating a session list is provided, specifically:

[0044] Step 1: When the communication server receives the fourth session sent by the third session object, receiving the fourth session sent by the communication server;

[0045] Step 2: determining whether the fourth session is a newly added session according to the fourth session identifier of the fourth session and the fifth session identifier in the fourth session list;

[0046] Step 3: When the fourth session is not a newly added session, directly sort and render the display page of the application client.

[0047] That is to say, when the fourth conversation sent by the third conversation object is received, it is determined whether there is a conversation box between the target object and the third conversation object in the fourth conversation list; when there is a conversation box between the target object and the third conversation object in the fourth conversation list, it is determined that the fourth conversation is not a newly added conversation; if the fourth conversation is not a newly added conversation, the conversation box between the target object and the third conversation object is directly placed at the front of the fourth conversation list.

[0048] In an exemplary embodiment, after determining whether the fourth session is a newly added session according to the fourth session identifier of the fourth session and the fifth session identifier in the fourth session list, the method further includes: if the fourth session is a newly added session, sending a second request message to the application server, wherein the second request message is used to request to obtain user information of the third session object; receiving the user information of the third session object sent by the application server based on the second request message, and rendering a display page of the application client according to the user information of the third session object and the fourth session.

[0049] That is, when there is no session box between the target object and the third session object in the fourth session list, it is determined that the fourth session is a newly added session. When the fourth session is a newly added session, a second request message is sent to the application server, wherein the second request message includes: a fifth user identifier of the third session object for registering the communication server, querying user information of the third session object according to the fifth user identifier, and rendering a display page of the application client according to the user information of the third session object and the fourth session.

[0050] In an exemplary embodiment, after rendering the display page of the application client according to the first response information, the method further includes:

[0051] Step 1: in the case where the page turning logic is triggered by the conversation window between the target object and the fourth conversation object, determining whether all conversation messages between the target object and the fourth conversation object stored in the application server have been sent to the application client;

[0052] Step 2: if all the session messages between the target object and the fourth session object stored in the application server have not been sent to the application client, determine whether all the session messages between the target object and the fourth session object stored in the communication server have been sent to the application client;

[0053] Step 3: When all the conversation messages between the target object and the fourth conversation object stored in the communication server have been sent to the application client, a third request message is sent to the application server through the back-end interface of the application server, wherein the third request message is used to request to obtain the historical conversation messages between the target object and the fourth conversation object.

[0054] The above embodiment provides a method for obtaining historical conversation messages between a target object and a fourth conversation object. Specifically: when the page turning logic is triggered by the conversation window between the target object and the fourth conversation object, first determine whether all the conversation messages in the application server have been pulled, and if so, end the process; if not, determine whether all the conversation messages on the communication server have been pulled; if so, call the interface of the application server to request conversation messages that exceed the cache period according to the paging logic; if not, continue to call the SDK of the application client, paging the conversation messages of the communication server, and after obtaining the data, merge it with the previous conversation messages for rendering.

[0055] In an exemplary embodiment, after rendering the conversation window between the target object and the conversation object according to the first response information, it also includes: when the target object sends the fifth conversation to the fourth conversation object, sending the message body corresponding to the fifth conversation to the communication server; when the communication server successfully sends the fifth conversation to the application client corresponding to the fourth conversation object, receiving a feedback result sent by the communication server to indicate the successful sending of the fifth conversation, wherein when the communication server successfully sends the fifth conversation to the application client corresponding to the conversation object, the fifth conversation is sent to the application server.

[0056] That is to say, when the target object wants to send a message (equivalent to the fifth session in the above embodiment) to the fourth session object, it first creates a message body through the application client sdk, and then calls the application client sdk to send the message. If the message is sent successfully, the communication server will at least perform the following steps: 1. Notify the application client of the fourth session object to render the page by triggering the IM_MESSAGE_RECEIVED callback, and the callback will follow the "read" status reporting process; 2. Notify the application server of the feedback information that the message is sent successfully through the backend callback, and the application server will save the message. 3. Notify the application client that the message is sent successfully and process the application client rendering; if the message is not sent successfully, the application client will be directly notified that the message fails to be sent, and the application client rendering logic will be processed. If user 1 clicks the "Resend" button, the message body just created can be used to call the application client sdk to resend the message.

[0057] In an exemplary embodiment, before receiving the first session information sent by the communication server of the third-party instant communication, the method also includes: when the target object successfully logs in to the application client, sending a fourth request information to the application server, wherein the fourth request information includes: the second user identifier; receiving the fourth user identifier of the target object registered on the communication server determined by the application server according to the second user identifier, and the key for the target object to log in to the communication server; and logging in to the communication server according to the fourth user identifier and the key.

[0058] In order to better understand the process of the rendering method of the above-mentioned display page, the implementation method flow of the rendering of the above-mentioned display page is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of the present application.

[0059] In this embodiment, a method for rendering a display page is provided. Figure 3 is a timing diagram of logging into an application client according to an embodiment of the present application, such as Figure 3 As shown, the specific steps are as follows:

[0060] Step S301: When user 1 (equivalent to the target object in the above embodiment) uses device A to open the application client (hereinafter referred to as the front end);

[0061] Step S302: calling the SDK provided by the IM operator to the front end (hereinafter referred to as the front end SDK) to add event monitoring such as IM login success (IM_READY), IM being kicked off the line by other devices (IM_KICKED_OUT) and IM logout (IM_NOT_READY);

[0062] Step S303: The user logs in to the front end;

[0063] Step S304: call the interface of the application server (hereinafter referred to as the backend) to obtain login_key;

[0064] It should be noted that login_key is the key used by the front-end to log in to the IM server.

[0065] Step S305: After receiving the request, the backend queries the IM_connectId of user 1 according to the identification information of user 1 registered with the frontend;

[0066] Among them, IM_connectId is the field of IM registration, and it is also the key that can connect the backend user with the IM user.

[0067] Step S306: if the IM_connectid of user 1 is not found, generate IM_connectid and store it in the user information table, and use IM_connectid to insert a new user into the IM server;

[0068] Step S307: after the IM_connectid of user 1 is found, the IM user is searched according to the IM_connectid;

[0069] Step S308: Returning the IM user query result;

[0070] It should be noted that, when an IM user logs out, the IM user cannot be found based on IM_connectid.

[0071] Step S309: Determine whether IM_connectid has a corresponding IM user;

[0072] Step S310: if it is determined that IM_connectid has no corresponding IM user, generate a new IM_connectid and insert the new user into the IM server;

[0073] Step S311: When a new user is inserted or it is determined that IM_connectid has a corresponding IM user, IM_connectid is stored in the user information table and the backend SDK is called to generate a login key login_key;

[0074] Step S312: Send login_key and IM_connectid to the front end;

[0075] Step S313: the front end calls the login method of the embedded SDK to log in to the IM server (transmitting IM_connectid and login_key);

[0076] Step S314: The IM server returns a login success message;

[0077] Step S315: monitor IM_READY response, the callback is triggered, and IM login is successful;

[0078] Step S316: User 1 successfully logs into the IM server on device B;

[0079] Step S317: The IM_KICKED_OUT callback of the device A application is triggered, and a pop-up window prompts: Your account has been logged in on another device, please log in again. The pop-up window has only one button "OK". Click it to continue the process;

[0080] Step S318: The user logs out of the IM server;

[0081] Step S319: the front end calls the login method of the embedded SDK to log out of the IM server;

[0082] Step S320: the IM_NOT_READY callback is triggered, and the relevant business logic is processed in the callback.

[0083] Optional, Figure 4 is a timing diagram of an application client loading a session list according to an embodiment of the present application, such as Figure 4 As shown, the specific steps are as follows:

[0084] Step S401: When the user logs in to the application and the IM server, the conversation list page is entered;

[0085] Step S402: Add a listener for the conversation list update (IM_CONVERSATION_LIST_UPDATED);

[0086] Step S403: calling the front-end SDK to obtain a list of all first sessions within the IM server cache period (hereinafter referred to as the cache period);

[0087] Step S404: Return all session records (with IM_connectid) stored in the IM server;

[0088] Step S405: Processing the first conversation list;

[0089] Step S406: Obtain the IM_connectId of each session object in the first session list, and transmit these IM_connectIds to the backend to query the corresponding user information;

[0090] Step S407: Send the queried user information to the front end;

[0091] Step S408: combining the first conversation list returned by the IM server with the user information returned by the backend and displaying them;

[0092] Step S409: extract the id of the earliest conversation in the first conversation list (if the list returned by the IM server is empty, no query is required);

[0093] Step S410: The id of the earliest session (if the list returned by the IM server is empty, it is not necessary to transmit) is transmitted to the backend as a parameter;

[0094] Step S411: starting from the ID transmitted by the front end (if no ID is transmitted, the timestamp at that time is used as the starting point), searching in reverse order for a number of session records and their corresponding user combination data, and then returning them to the front end;

[0095] Step S412: the front end processes the paging logic, and removes duplicates and merges the list returned by the back end with the first session list (retaining the latest session when removing duplicates), to obtain a second session list;

[0096] Step S413: re-arrange and render the conversation messages according to their sending time;

[0097] Step S414: end;

[0098] Step S415: the user operates the page to the bottom;

[0099] Step S416: Determine whether all the backend data has been pulled; if all the backend data has not been pulled, execute steps S410-S414;

[0100] Step S417: the IM server receives messages sent by other users;

[0101] Step S418: triggering the backend callback to push the information to the backend;

[0102] Step S419: Push to the front end via IM_CONVERSATION_LIST_UPDATED;

[0103] Step S420: After receiving the conversation list, the front end directly removes duplicates and merges it with the second conversation list;

[0104] Step S421: Determine whether there is a new session;

[0105] Step S422: if there is a new session, the IM_connectId carried in the new session is transmitted to the backend to query the user information of the user;

[0106] Step S423: merging the user information into the second conversation list;

[0107] Step S424: after merging the user information into the second session list, or directly sorting and rendering when there is no new session.

[0108] Optional, Figure 5 FIG. 1 is a timing diagram of an application client loading a message list according to an embodiment of the present application. Figure 5 As shown, the specific steps are as follows:

[0109] Step S501: When the user logs into the application and the IM server, a conversation window with a person is entered;

[0110] Step S502: add a listener IM_MESSAGE_RECEIVED for receiving messages from the other party;

[0111] Step S503: calling the SDK to obtain the current session details;

[0112] Step S504: Returning detailed session information;

[0113] Step S505: the front-end session information is received successfully;

[0114] Step S506: calling the front-end SDK to report the "read" information;

[0115] Step S507: After receiving the read report, the IM server pushes it to the backend through the backend callback;

[0116] Step S508: the backend sets the message record as read;

[0117] Step S509: the front end queries the back end for user information according to the IM_connectId carried in the session information;

[0118] Step S510: Return user information;

[0119] Step S511: Rendering the overall framework of the page according to the user information and messages;

[0120] Step S512: Quantitatively query historical messages from the IM server through the front-end SDK;

[0121] Step S513: Return the queried historical message;

[0122] Step S514: message quantity and paging logic processing;

[0123] Step S515: Determine whether all messages on the IM server have been pulled;

[0124] Step S516: If all messages on the IM server have been pulled, directly call the backend interface to pull several message records that exceed the cache period;

[0125] Step S517: the backend searches for messages according to the paging conditions;

[0126] Step S518: Return the queried message records;

[0127] Step S519: merging several message records with the historical data obtained from the IM server;

[0128] Step S520: the front end renders a message list in the conversation window;

[0129] Step S521: end;

[0130] Step S522: the user pulls down the page to trigger the page turning logic;

[0131] Step S523: Determine whether all the data has been pulled from the backend server, if so, end the process;

[0132] Step S524: if not, determine whether all message records on the IM server have been pulled;

[0133] Step S525: If yes, call the backend interface to request the message record that exceeds the cache period according to the paging logic;

[0134] Step S526: If not, continue to call the front-end SDK, request the message records of the IM server in pages, and after obtaining the data, merge it with the previous message list for rendering;

[0135] Step S527: front-end user 1 sends a message to front-end user 2;

[0136] Step S528: Create a message body through the front-end SDK;

[0137] Step S529: call the front-end SDK to send a message to user 2;

[0138] Step S530: Determine whether the message is sent successfully;

[0139] Step S531: If the message is sent successfully, the IM server will at least perform the following steps:

[0140] Step S5311: Notify the front-end user 2 to render the page by triggering the IM_MESSAGE_RECEIVED callback, and the callback will follow the "read" status reporting process; Step S5312: Notify the back-end server of the message sent successfully through the back-end callback, and the back-end will save the message. Step S5313: Notify the front-end user 1 that the message was sent successfully and process the front-end rendering;

[0141] Step S532: If the message is not sent successfully, the front-end user 1 will be directly informed that the message sending failed;

[0142] Step S533: Set the message to "failed to send" status and process the front-end rendering logic;

[0143] Step S534: If the front-end user 1 clicks the "Resend" button

[0144] Step S535: Use the message body just created to call the front-end SDK to resend the message;

[0145] Step S536: receiving a read report;

[0146] Step S537: informing user 1 of the reading status of user name 2;

[0147] Step S538: Set the message record in the database as read.

[0148] This embodiment synchronizes the user's message records to a private server, which can freely control the storage time of the user's message records and reduce the cost of IM services. The solution of sharing user information has a greater risk of data leakage and a higher data maintenance cost. For example, if a user modifies his nickname, the IM database and the application database must be modified synchronously to maintain data consistency. The IM user and application user information are separated and only a unique ID is used to link them, which improves the maintainability of user information and reduces the risk of leakage of user information. Backing up user data in the IM service to a private server reduces dependence on the IM server, is relatively flexible, and easy to migrate. Compared with the solution of independently developing the entire IM system and privatizing the IM system, there are fewer technical difficulties and various costs will be greatly reduced.

[0149] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0150] Figure 6 is a structural block diagram of a rendering device for displaying a page according to an embodiment of the present application; Figure 6 As shown, including:

[0151] The receiving module 62 is used to receive first session information sent by a communication server of a third-party instant communication, wherein the application client performs instant communication through a software development kit provided by the third-party instant communication, and the first session information includes: a first session list between a target object and a first session object and a first user identifier registered by the first session object on the communication server;

[0152] A sending module 64 is configured to send a first request message to an application server corresponding to the application client, wherein the first request message includes: the first user identifier, the first session identifier of the first session with the earliest timestamp in the first session list, and the second user identifier of the target object registering the application client;

[0153] The rendering module 66 is used to receive the first response information sent by the application server according to the first user identifier, the second user identifier and the first session identifier, and render the display page of the application client according to the first response information, wherein the first response information includes: user information of the first session object and the second session object, and a second session list between the target object and the second session object.

[0154] By means of the above-mentioned device, first session information sent by a communication server of a third-party instant communication is received, wherein the application client performs instant communication through a software development kit provided by the third-party instant communication, and the first session information includes: a first session list between a target object and a first session object and a first user identifier of the communication server registered by the first session object; a first request information is sent to an application server corresponding to the application client, wherein the first request information includes: the first user identifier, a first session identifier of the first session with the earliest timestamp in the first session list, and a second user identifier of the application client registered by the target object; a first response information sent by the application server according to the first user identifier, the second user identifier and the first session identifier is received, and The display page of the application client is rendered according to the first response information, wherein the first response information includes: user information of the first session object and the second session object, and a second session list between the target object and the second session object, which solves the problem in the related art that, for an application client using a third-party instant messaging service, some user sensitive information may be forced to be shared with a third-party instant messaging operator, resulting in a risk of information leakage. In the present application, the application server stores the user information, separates the user identifier of the registered communication server from the application user information, and only links the user identifier of the registered communication server with the user identifier of the registered application client, so that the user information can be stored only in the application server, thereby improving the maintainability of the user information and reducing the risk of leakage of the user information.

[0155] In an exemplary embodiment, the rendering module 66 is configured to deduplicate and merge the first session list and the second session list according to the second session identifiers of the plurality of second sessions in the first session list and the third session identifiers of the plurality of third sessions in the second session list to obtain a third session list; sort all the sessions in the third session list according to the timestamps of the sessions to obtain a sorted fourth session list; and render a display page of the application client according to the fourth session list and the user information of all the session objects in the fourth session list.

[0156] In an exemplary embodiment, the rendering module 66 is used to receive the fourth session sent by the communication server when the communication server receives the fourth session sent by the third session object; determine whether the fourth session is a newly added session based on the fourth session identifier of the fourth session and the fifth session identifier in the fourth session list; and directly sort and render the display page of the application client when the fourth session is not a newly added session.

[0157] In an exemplary embodiment, the rendering module 66 is used to send a second request message to the application server when the fourth session is a newly added session, wherein the second request message is used to request to obtain user information of the third session object; receive the user information of the third session object sent by the application server based on the second request message, and render the display page of the application client according to the user information of the third session object and the fourth session.

[0158] In an exemplary embodiment, the receiving module 62 is used to determine whether all the session messages between the target object and the fourth session object stored in the application server have been sent to the application client when the page turning logic is triggered by the session window between the target object and the fourth session object; if all the session messages between the target object and the fourth session object stored in the application server have not been sent to the application client, determine whether all the session messages between the target object and the fourth session object stored in the communication server have been sent to the application client; if all the session messages between the target object and the fourth session object stored in the communication server have been sent to the application client, send a third request message to the application server through the backend interface of the application server, wherein the third request message is used to request to obtain the historical session messages between the target object and the fourth session object.

[0159] In an exemplary embodiment, the sending module 64 is used to send the message body corresponding to the fifth session to the communication server when the target object sends the fifth session to the fourth session object; and receive a feedback result sent by the communication server to indicate the successful sending of the fifth session when the communication server successfully sends the fifth session to the application client corresponding to the fourth session object, wherein the fifth session is sent to the application server when the communication server successfully sends the fifth session to the application client corresponding to the session object.

[0160] In an exemplary embodiment, a receiving module is used to send a fourth request message to the application server when the target object successfully logs in to the application client, wherein the fourth request message includes: the second user identifier; receiving the fourth user identifier of the target object registered on the communication server determined by the application server based on the second user identifier, and the key for the target object to log in to the communication server; and logging in to the communication server based on the fourth user identifier and the key.

[0161] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.

[0162] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:

[0163] S1, receiving first session information sent by a communication server of a third-party instant messaging, wherein the application client performs instant messaging through a software development kit provided by the third-party instant messaging, and the first session information includes: a first session list between a target object and a first session object and a first user identifier registered by the first session object on the communication server;

[0164] S2, sending a first request message to the application server corresponding to the application client, wherein the first request message includes: the first user identifier, the first session identifier of the first session with the earliest timestamp in the first session list, and the second user identifier of the target object registering the application client;

[0165] S3: Receive a first response message sent by the application server according to the first user identifier, the second user identifier, and the first session identifier, and render a display page of the application client according to the first response message, wherein the first response message includes: user information of the first session object and the second session object, and a second session list between the target object and the second session object.

[0166] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0167] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0168] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0169] S1, receiving first session information sent by a communication server of a third-party instant messaging, wherein the application client performs instant messaging through a software development kit provided by the third-party instant messaging, and the first session information includes: a first session list between a target object and a first session object and a first user identifier registered by the first session object on the communication server;

[0170] S2, sending a first request message to the application server corresponding to the application client, wherein the first request message includes: the first user identifier, the first session identifier of the first session with the earliest timestamp in the first session list, and the second user identifier of the target object registering the application client;

[0171] S3: Receive a first response message sent by the application server according to the first user identifier, the second user identifier, and the first session identifier, and render a display page of the application client according to the first response message, wherein the first response message includes: user information of the first session object and the second session object, and a second session list between the target object and the second session object.

[0172] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.

[0173] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0174] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps can be made into a single integrated circuit module for implementation. In this way, the present application is not limited to any specific combination of hardware and software.

[0175] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for rendering a display page, characterized in that: Applied to application clients, including: Receiving first session information sent by a communication server of a third-party instant communication, wherein the application client performs instant communication through a software development kit provided by the third-party instant communication, and the first session information includes: a first session list between a target object and a first session object and a first user identifier registered by the first session object on the communication server; Sending a first request message to an application server corresponding to the application client, wherein the first request message includes: the first user identifier, the first session identifier of the first session with the earliest timestamp in the first session list, and the second user identifier of the target object registering the application client; receiving a first response message sent by the application server according to the first user identifier, the second user identifier and the first session identifier, and rendering a display page of the application client according to the first response message, wherein the first response message includes: user information of the first session object and the second session object, and a second session list between the target object and the second session object; The rendering of the display page of the application client according to the first response information includes: deduplicating and merging the first session list and the second session list according to the second session identifiers of the plurality of second sessions in the first session list and the third session identifiers of the plurality of third sessions in the second session list to obtain a third session list; sorting all the sessions in the third session list according to the timestamps of all the sessions to obtain a sorted fourth session list; and rendering the display page of the application client according to the fourth session list and the user information of all the session objects in the fourth session list.

2. The method for rendering a display page according to claim 1, characterized in that: After rendering the display page of the application client according to the first response information, the method further includes: In the case where the communication server receives the fourth session sent by the third session object, receiving the fourth session sent by the communication server; determining whether the fourth session is a newly added session according to the fourth session identifier of the fourth session and the fifth session identifier in the fourth session list; When the fourth session is not a newly added session, the display pages of the application client are directly sorted and rendered.

3. The method for rendering a display page according to claim 2, characterized in that: After determining whether the fourth session is a newly added session according to the fourth session identifier of the fourth session and the fifth session identifier in the fourth session list, the method further includes: In the case where the fourth session is a newly added session, sending a second request message to the application server, wherein the second request message is used to request to obtain the user information of the third session object; The application server receives user information of a third session object sent based on the second request information, and renders a display page of the application client according to the user information of the third session object and the fourth session rendering.

4. The method for rendering a display page according to claim 1, characterized in that: After rendering the display page of the application client according to the first response information, the method further includes: In a case where the page turning logic is triggered by the conversation window between the target object and the fourth conversation object, determining whether all conversation messages between the target object and the fourth conversation object stored in the application server have been sent to the application client; In a case where all the session messages between the target object and the fourth session object stored in the application server have not been sent to the application client, determining whether all the session messages between the target object and the fourth session object stored in the communication server have been sent to the application client; When all the conversation messages between the target object and the fourth conversation object stored in the communication server have been sent to the application client, a third request message is sent to the application server through the back-end interface of the application server, wherein the third request message is used to request to obtain the historical conversation messages between the target object and the fourth conversation object.

5. The method for rendering a display page according to claim 4, characterized in that: After rendering the conversation window between the target object and the conversation object according to the first response information, the method further includes: in a case where the target object sends a fifth conversation to the fourth conversation object, sending a message body corresponding to the fifth conversation to the communication server; In a case where the communication server successfully sends the fifth session to the application client corresponding to the fourth session object, receiving a feedback result sent by the communication server to indicate that the fifth session is successfully sent, wherein in a case where the communication server successfully sends the fifth session to the application client corresponding to the session object, the fifth session is sent to the application server.

6. The method for rendering a display page according to claim 1, characterized in that: Before receiving the first session information sent by the communication server of the third-party instant messaging, the method further includes: When the target object successfully logs in to the application client, fourth request information is sent to the application server, wherein the fourth request information includes: the second user identifier; receiving a fourth user identifier of the target object registered on the communication server, and a key for the target object to log in to the communication server, determined by the application server according to the second user identifier; The communication server is logged in according to the fourth user identification and the key.

7. A rendering device for displaying a page, characterized in that: include: A receiving module, configured to receive first session information sent by a communication server of a third-party instant messaging, wherein the application client performs instant messaging through a software development kit provided by the third-party instant messaging, and the first session information includes: a first session list between a target object and a first session object and a first user identifier of the first session object registered with the communication server; a sending module, configured to send a first request message to an application server corresponding to the application client, wherein the first request message includes: the first user identifier, the first session identifier of the first session with the earliest timestamp in the first session list, and the second user identifier of the target object registering the application client; a rendering module, configured to receive a first response message sent by the application server according to the first user identifier, the second user identifier and the first session identifier, and render a display page of the application client according to the first response message, wherein the first response message includes: user information of the first session object and the second session object, and a second session list between the target object and the second session object; The rendering module is further configured to deduplicate and merge the first session list and the second session list according to the second session identifiers of the plurality of second sessions in the first session list and the third session identifiers of the plurality of third sessions in the second session list to obtain a third session list; sort all the sessions in the third session list according to the timestamps of all the sessions to obtain a sorted fourth session list; and render a display page of the application client according to the fourth session list and the user information of all the session objects in the fourth session list.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 6 when executed.

9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 6 through the computer program.

Citation Information

Patent Citations

  • Session creation method, terminal, third-party application server, and system

    CN109510758A