CN114594881B - Message display method and device - Google Patents

Message display method and device Download PDF

Info

Publication number
CN114594881B
CN114594881B CN202011307348.7A CN202011307348A CN114594881B CN 114594881 B CN114594881 B CN 114594881B CN 202011307348 A CN202011307348 A CN 202011307348A CN 114594881 B CN114594881 B CN 114594881B
Authority
CN
China
Prior art keywords
message
display
displayed
style
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011307348.7A
Other languages
Chinese (zh)
Other versions
CN114594881A (en
Inventor
刘旭
何碧莹
黎翠莹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202011307348.7A priority Critical patent/CN114594881B/en
Publication of CN114594881A publication Critical patent/CN114594881A/en
Application granted granted Critical
Publication of CN114594881B publication Critical patent/CN114594881B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus

Abstract

The embodiment of the invention discloses a message display method and a message display device; the embodiment of the invention receives the first message display data sent by the message server, wherein the first message display data comprises the message to be displayed and display style information corresponding to the message to be displayed, the display style information is used for indicating the display style of the message to be displayed, then, according to the display style information, the display resources of the message to be displayed are obtained, when a user triggers the message display page, the message display page is displayed, the message display page comprises a target message display area based on the display resources, and the message to be displayed is displayed in the target message display area.

Description

Message display method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for displaying a message.
Background
In recent years, with the rapid development of internet technology, instant messaging is becoming more and more abundant in life. In instant messaging, a sending terminal sends a message to a receiving terminal, and the receiving terminal needs to display the received message when receiving the message. The existing message display method mainly displays the received message in the form of message bubbles.
In the research and practice process of the prior art, the inventor discovers that the existing message display method displays the message bubbles with the same display pattern for the received message, and the display pattern of the message bubbles is relatively single, so that the display effect of the message display is greatly reduced.
Disclosure of Invention
The embodiment of the invention provides a message display method and a message display device, which can improve the message display effect.
A message display method, comprising:
Receiving first message display data sent by a message server, wherein the first message display data comprises a message to be displayed and display style information corresponding to the message to be displayed, and the display style information is used for indicating the display style of the message to be displayed;
According to the display style information, obtaining display resources of the message to be displayed;
when a user triggers a message display page, displaying the message display page, wherein the message display page comprises a target message display area;
and displaying the message to be displayed in the target message display area based on the display resource.
Optionally, another message display method may be provided in the embodiment of the present invention, including:
receiving a message to be displayed, and determining a sending user identifier and a receiving user identifier of the message to be displayed;
Acquiring target display style setting information corresponding to the received user identifier from a display style setting information set;
According to the target display style setting information, determining display style information corresponding to the sending user identifier;
And fusing the information to be displayed and the display style information to obtain first message display data, and sending the first message display data to a receiving terminal corresponding to the receiving user identifier, so that the receiving terminal displays the information to be displayed according to the first message display data.
Correspondingly, the embodiment of the invention provides a message display device, which comprises:
The first receiving unit is used for receiving first message display data sent by the message server, wherein the first message display data comprises a message to be displayed and display style information corresponding to the message to be displayed, and the display style information is used for indicating the display style of the message to be displayed;
the first acquisition unit is used for acquiring the display resources of the message to be displayed according to the display style information;
the display unit is used for displaying the message display page when a user triggers the message display page, wherein the message display page comprises a target message display area;
and the display unit is used for displaying the message to be displayed in the target message display area based on the display resource.
Correspondingly, the embodiment of the invention also provides another message display device, which comprises:
the second receiving unit is used for receiving the message to be displayed and determining the sending user identification and the receiving user identification of the message to be displayed;
The second acquisition unit is used for acquiring target display style setting information corresponding to the received user identifier from the display style setting information set;
The determining unit is used for determining display style information corresponding to the sending user identifier according to the target display style setting information;
And the sending unit is used for fusing the message to be displayed and the display style information to obtain first message display data, and sending the first message display data to a receiving terminal corresponding to the receiving user identifier so that the receiving terminal displays the message to be displayed according to the first message display data.
Optionally, in some embodiments, the display unit may be specifically configured to screen at least one display material corresponding to the display style from the display resource; according to the display material, rendering the message to be displayed in the target message display area to obtain a rendered message to be displayed; and displaying the rendered message to be displayed on the message display page.
Optionally, in some embodiments, the display unit may be specifically configured to obtain content information of the message to be displayed, and determine a type of the content information; determining rendering information of the message to be displayed according to the format of the display material and the type of the content information; and rendering the display material and the content information in the target message display area based on the rendering information to obtain the message to be displayed after rendering.
Optionally, in some embodiments, the display unit may be specifically configured to draw the display material in the target message display area based on the drawing manner, to obtain a message display carrier; adding the content information to the message display carrier to obtain a message to be rendered; and rendering the message to be rendered based on the rendering mode to obtain the message to be displayed after rendering.
Optionally, in some embodiments, the display unit may be specifically configured to obtain local global variable information, and query resource variable information corresponding to a static display resource package in the local global variable information; when the resource variable information does not exist in the local global variable information, sending a resource acquisition request to the message server, wherein the resource acquisition request carries a local user identifier; receiving a static display resource packet corresponding to the local user identifier returned by the message server, and adding resource variable information corresponding to the static display resource packet into the local global variable information; the obtaining the display resource of the message to be displayed according to the display style information comprises the following steps: and acquiring the display resources of the message to be displayed according to the display style information and the static display resource package.
Optionally, in some embodiments, the display unit may be specifically configured to determine, in response to a viewing operation of the viewing control, that a display state of the rendered message to be displayed is viewed; and adjusting the display style of the message to be displayed after rendering to obtain a displayed message, and displaying the displayed message on the message display page.
Optionally, in some embodiments, the message display apparatus may further include an updating unit, where the updating unit may specifically be configured to, when receiving the second message display data sent by the message server, compare the receiving times of the first message display data and the second message display data; when the receiving time of the first message display data is earlier than the receiving time of the second message display data, adjusting the display position of the rendered message to be displayed to a target message display area; rendering the updated message to be displayed corresponding to the second message display data in the target message display area so as to display the updated message to be displayed.
Optionally, in some embodiments, the message display apparatus may further include a setting unit, where the setting unit may be specifically configured to display a display style display page, where the display style display page includes at least one display style and a preview control corresponding to the display style; responding to the preview operation of the preview control, displaying a display style preview page, wherein the display style preview page comprises a setting control; and generating display style setting information in response to the setting operation of the setting control, and sending the display style setting information to the message server.
Optionally, in some embodiments, the setting unit may be specifically configured to send a presentation style preview request to the message server in response to a preview operation of the preview control, where the presentation style preview request carries a style identifier of a presentation style; receiving target display style information corresponding to the style identification returned by the message server; and generating the display style preview page according to the target display style information, and displaying the display style preview page.
Optionally, in some embodiments, the setting unit may be specifically configured to display a presentation style setting page in response to a setting operation of the setting control, where the presentation style setting page includes an application range selection control; responding to the selection operation of the application range selection control, displaying a display style application page, wherein the display style application page comprises a contact list with association relation with a local user; determining at least one contact of the display style application to obtain contact information in response to a selection operation for the contact list; and generating display style setting information according to the contact information.
Optionally, in some embodiments, the first receiving unit may be specifically configured to send a data channel construction request to the message server, where the data channel construction request carries an identity of a local user; receiving data channel construction data returned by the message server for the data channel construction request, and constructing a data channel between the message server and the message server based on the data channel construction data; the receiving the first message display data sent by the message server includes: and receiving first message display data sent by the message server through the data channel, and analyzing the message display data to obtain a message to be displayed and display style information corresponding to the message to be displayed.
Optionally, in some embodiments, the second obtaining unit may be specifically configured to receive the display style setting information sent by the receiving terminal, and store the display style to the display style setting information set; determining at least one display style selected by the receiving terminal according to the display style setting information; and generating a static display resource package based on the memory information of the display style, and sending the static display resource package to the receiving terminal.
In addition, the embodiment of the invention also provides electronic equipment, which comprises a processor and a memory, wherein the memory stores application programs, and the processor is used for running the application programs in the memory to realize the message display method provided by the embodiment of the invention.
In addition, the embodiment of the invention also provides a computer readable storage medium, which stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor to execute the steps in any message display method provided by the embodiment of the invention.
After receiving first message display data sent by a message server, the first message display data comprises a message to be displayed and display style information corresponding to the message to be displayed, the display style information is used for indicating the display style of the message to be displayed, then, according to the display style information, display resources of the message to be displayed are obtained, when a user triggers a message display page, the message display page is displayed, wherein the message display page comprises a target message display area, and the message to be displayed is displayed in the target message display area based on the display resources.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a message display system provided by an embodiment of the present invention;
fig. 2 is a schematic view of a scenario of a message display method according to an embodiment of the present invention;
fig. 3 is a flow chart of a message display method according to an embodiment of the present invention;
Fig. 4 is a schematic diagram of a display style presentation page according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a presentation style setup page provided by an embodiment of the present invention;
FIG. 6 is a schematic diagram of a presentation style application page provided by an embodiment of the present invention;
FIG. 7 is a schematic flow chart of acquiring a static display resource package according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a message presentation page provided by an embodiment of the present invention;
FIG. 9 is a schematic diagram of a rendered message to be presented provided by an embodiment of the present invention;
FIG. 10 is a schematic diagram of a rendered message presentation to be presented according to an embodiment of the present invention;
fig. 11 is a schematic diagram of a display process for updating a message to be displayed according to an embodiment of the present invention;
FIG. 12 is another flow chart of a message presentation provided by an embodiment of the present invention;
FIG. 13 is a third flow diagram of a message display according to an embodiment of the present invention;
fig. 14 is a schematic structural diagram of a first message display device according to an embodiment of the present invention;
Fig. 15 is another schematic structural diagram of a first message display device according to an embodiment of the present invention;
fig. 16 is a third schematic structural view of the first message display device according to the embodiment of the present invention;
fig. 17 is a schematic structural diagram of a second message display device according to an embodiment of the present invention;
fig. 18 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
The embodiment of the invention provides a message display method, a message display device and a computer readable storage medium. The message display device can be integrated in electronic equipment, and the electronic equipment can be a server, a terminal and other equipment. Specifically, the message display device (for distinguishing, may be referred to as a first message display device) applicable to a first electronic device, and the message display device (for distinguishing, may be referred to as a second message display device) applicable to a second electronic device provided by the embodiment of the present invention.
The first electronic device may be a device such as a terminal, and the terminal may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a smart car, or the like, but is not limited thereto. The second electronic device may be a network side device such as a server, where the server may be an independent physical server, or may be a server cluster or a distributed system formed by multiple physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), and basic cloud computing services such as big data and an artificial intelligent platform. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the present application is not limited herein.
In the embodiment of the invention, the first electronic device is taken as a terminal, the second electronic device is taken as a server, wherein the terminal corresponding to the first electronic device mainly displays the received information to be displayed, so that the first electronic device can be taken as a receiving terminal, and in the information display method, the terminal which sends the information to be displayed to the information server can be taken as a sending terminal.
For example, referring to fig. 1, the message display system provided in the embodiment of the present invention includes a receiving terminal 10, a message server 20, and a transmitting terminal 30, where the receiving terminal 10, the message server 20, and the transmitting terminal 30 are connected through a wired or wireless network, and the message display device is integrated in the receiving terminal, for example, may be in the form of a client.
The receiving terminal 10 may be configured to receive first message display data sent by the message server, where the first message display data includes a message to be displayed and display style information corresponding to the message to be displayed, where the display style information is used to indicate a display style of the message to be displayed, then, according to the display style information, obtain display resources of the message to be displayed, and when a user triggers a message display page, display the message display page, where the message display page includes a target message display area, and then, based on the display resources, display the message to be displayed in the target message display area, as shown in fig. 2.
The message to be displayed may be a message in instant messaging, and the type of the message may be various, for example, a video message, a voice message, a text message, an image message, or the like.
The message server 20 may be configured to receive a message to be displayed, determine a sending user identifier and a receiving user identifier of the message to be displayed, obtain target display style setting information corresponding to the receiving user identifier from a display style setting information set, then determine display style information corresponding to the sending user identifier according to the target display style setting information, fuse the message to be displayed and the display style information to obtain first message display data, and send the first message display data to a receiving terminal corresponding to the receiving user identifier, so that the receiving terminal displays the message to be displayed according to the first message display data.
The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
The embodiment will be described from the perspective of a first message display apparatus, where the first message display apparatus may be specifically integrated in an electronic device, and the electronic device may be a device such as a terminal; the terminal may include a smart phone, a tablet computer, a notebook computer, a personal computer (PC, personal Computer), a wearable device, a virtual reality device, or other devices that may display a message.
A message display method, comprising:
Receiving first message display data sent by a message server, wherein the first message display data comprises a message to be displayed and display style information corresponding to the message to be displayed, the display style information is used for indicating a display style of the message to be displayed, display resources of the message to be displayed are obtained according to the display style information, and when a message display page is triggered by a user, the message display page is displayed, the message display page comprises a target message display area, and the message to be displayed is displayed in the target message display area based on the display resources.
As shown in fig. 3, the specific flow of the message display method is as follows:
101. and receiving first message display data sent by the message server.
The first message display data comprises a message to be displayed and display style information corresponding to the message to be displayed. The display style information is used for indicating a display style of a message to be displayed, and may include information such as a storage path of display materials of the display style. The presentation style may be a style for presenting a message to be presented, for example, may include theme elements such as dynamic background of the message to be presented, style animation, sound effects, background pictures, or fonts of text messages.
The first message display data may be data of a message to be displayed for a user to fuse the message to be displayed and display style information corresponding to the message to be displayed.
For example, the first message display data sent by the message server may be directly received, and when the first message display data sent by the message server is received, the first message display data may be parsed, for example, the first message display data may be decompressed according to a preset parsing policy, so that a message to be displayed in the first message display data is separated from display style information, and thus the message to be displayed and display style information corresponding to the message to be displayed may be obtained.
Optionally, before receiving the first message display data sent by the message server, a data channel between the first message display device and the message server may be further constructed, through which the first message display data sent by the message server may be received, so that the message display method further includes:
The method comprises the steps of sending a data channel construction request to a message server, wherein the data channel construction request carries an identity of a local user, receiving data channel construction data returned by the message server aiming at the data channel construction request, and constructing a data channel between the message server and the message server based on the data channel construction data, wherein the data channel construction request comprises the following specific steps:
For example, a data channel construction request may be sent to the message server, where the data channel construction request carries an identity of the local user, the message server verifies the identity after receiving the identity of the local user, and when the identity verification is passed, the data channel construction data may be sent to the first message display device, where the data channel construction data is mainly data required for constructing a long link, and after receiving the data channel construction data, the first message display device may call the long link as a data channel between the message server and the message server based on the long link between the construction and the message server. Through the long link, the first message display device can receive the first message display data sent by the message server in real time.
Optionally, before receiving the first message display data sent by the message server, a display style of the message to be displayed corresponding to different contacts may be set, so that the message display method further includes;
Displaying a display style display page, wherein the display style display page comprises at least one display style and a preview control corresponding to the display style, responding to the preview operation of the preview control, displaying the display style preview page, wherein the display style preview page comprises a setting control, responding to the setting operation of the setting control, generating display style setting information, and sending the display style setting information to a message server. The method can be concretely as follows:
(1) And displaying a display style display page.
The display style display page comprises at least one display style and a preview control corresponding to the display style. The so-called presentation style presentation page may be a presentation page that provides a message presentation style for a user.
For example, the user may operate the user operation page of the message display client, so as to trigger displaying the display style display page, for example, the user may operate the display style display page on the personality decorating page of the message display client, for example, open a new webview (web page view) and jump to the personality decorating page, at this time, send data of the personality decorating page to the message server, parse the callback to obtain the callback of the message server, draw and render at webview to obtain the personality decorating page, monitor a click event clicking the personality decorating page, open another new webview when the user clicks a click event of the message display control on the personality decorating page, jump to the display style display page, at this time, request page data of the display style page from the message server, parse the page data, render at webview, thereby displaying the display style display page, and detect a click event of the user on the display style display page, and the specific process may be as shown in fig. 4.
(2) And responding to the preview operation of the preview control, and displaying a display style preview page.
Wherein, in response to a condition or state that is used to represent the operation being performed, one or more operations being performed may be in real-time or may have a set delay when the condition or state being relied upon is satisfied; without being specifically described, there is no limitation in the execution sequence of the plurality of operations performed.
The presentation style preview page can provide a page for presenting style preview for a user. The presentation style preview page includes a set control.
For example, in response to a preview operation of the preview control, a presentation style preview request is sent to the message server, where the presentation style preview request carries a style identifier of a presentation style, for example, a user selects an a presentation style in a presentation style presentation page and triggers the preview control corresponding to the a presentation style, and at this time, a presentation style preview request is sent to the message server, where the presentation style preview request carries a style identifier of the a presentation style. Receiving target display style information corresponding to the style identifier returned by the message server, for example, after the message server receives the display style preview request, the message server returns style materials and the like of the display style corresponding to the style identifier to the first message display device as the target display style information. Generating a display style preview page according to the target display style, for example, constructing a preview area in the display style display page, acquiring target display materials of the display style to be previewed according to the target display style information, rendering the target display materials in the preview area to obtain the display style preview page, for example, drawing a preview popup window in the preview area, selecting a corresponding mode for rendering according to the file type of the display materials, and accordingly obtaining a display style prejudging page and displaying the display style preview page.
(3) And generating display style setting information in response to the setting operation of the setting control, and sending the display style setting information to the message server.
The display style setting information may be information of an application range of a display style, for example, may include setting information of a mapping relationship between a style identifier of the application display style and a contact to which the display style is applied.
For example, when the user triggers the setting control on the presentation style preview page, a presentation style setting page is displayed in response to a setting operation of the setting control, the presentation style setting page including an application range selection control, as shown in fig. 5. When the user triggers the application range selection control on the presentation style setting page, the presentation style application page is displayed in response to the selection operation of the application range selection control, and the presentation style application page includes a contact list with an association relationship with the local user, for example, the association relationship is taken as a friend relationship, as shown in fig. 6, the contact list may include a friend, all friends, a multi-person conversation group chat friend, and the like, and the user may directly select at least one friend or group chat, and the like, which need to be set, in the contact list, and may also directly apply all friends. In response to a selection operation for the contact list, at least one contact of the display style application is determined, and contact information is obtained, for example, in response to a contact selected by a user in the contact list, the contact of the display style application can be determined, and the contact information is obtained. And generating display style setting information according to the contact information, for example, associating or mapping the contact information with the style identification of the selected display style to obtain the display style setting information. And sending the display style setting information to a message server.
102. And acquiring display resources of the message to be displayed according to the display style information.
The display resources may include resources composed of various corresponding display materials in a display style, such as audio materials, video materials, animation materials, image materials, or text materials.
For example, a storage path of a presentation resource is identified in presentation style information, e.g., path information is screened out in the presentation style information, a storage path of each presentation resource is identified in the path information, and a type of the storage path is determined. When the type of the storage path is the external path, for example, when the storage path is the external path, the display resource corresponding to the storage path can be downloaded according to the storage path, so as to obtain the display resource.
Optionally, before acquiring the display resource of the message to be displayed, whether a static resource packet exists or not may be further queried locally, so that when the message to be displayed is received, a quick response may be performed, and rendering of the message to be displayed is enabled and completed, so that the message display method further includes:
Acquiring local global variable information, inquiring resource variable information corresponding to a static display resource package in the local global variable information, and when the resource variable information does not exist in the local global variable information, sending a resource acquisition request to a message server, wherein the resource acquisition request carries a local user identifier, receiving the static display resource package corresponding to the local user identifier returned by the message server, and adding the resource variable information corresponding to the static display resource package in the local global variable information. The method can be concretely as follows:
For example, for whether a static resource package exists locally, whether a user logs in a message display client on a receiving terminal for the first time is mainly determined, if so, a resource acquisition request can be directly sent to a message server, so that the static resource package corresponding to the local user is acquired from the message server. If the user does not log in the message display client at the receiving terminal for the first time, the local global variable information is required to be acquired, and the resource variable information corresponding to the static resource package is queried in the local global variable information. When the resource variable information does not exist in the local global variable information, it can be determined that the static resource package does not exist locally, and a resource acquisition request needs to be sent to the server, so that the static display resource package is obtained. After the static display resource package is obtained from the message server, the resource variable information corresponding to the static resource package needs to be added into the local global variable information, for example, the resource identification information can be set to be wire in the local global variable, so that the addition of the resource variable information into the local global variable information is completed. Thus, the flow of acquiring static resource packages may be as shown in FIG. 7.
103. When the user triggers the message display page, the message display page is displayed.
The message display page is used for displaying a message page for a user, and can display messages sent by one or more contacts. The message display page includes a target message display area, which is an area for displaying a message to be displayed, and may be a top area of the message display page or other preset display area.
For example, the user may trigger a message presentation page on the message presentation client, e.g., the user may operate a login page of the message presentation client, e.g., input login information such as an account number and a password of the local user, thereby generating a message presentation page, and displaying the message presentation page. The message display control can be triggered on the session page of the message display client, so that a message display page is generated, and the message display page is displayed, wherein the generated message display page can be shown in fig. 8.
After the message display page is displayed, a target display area for displaying the message to be displayed can be determined on the message display page, for example, the display time of the historical display message displayed in each message display area in the message display page can be obtained, the message display areas are ordered according to the display time, the area with the shortest display time in the message display areas is selected as the target message display area for displaying the message to be displayed, for example, the message display area with 3 message display areas included in the message display page is ordered according to the display time, the display time of the first message display area is the shortest, and therefore the first message display area can be used as the target message display area for displaying the message to be displayed. When the user sets messages of certain specific contacts on the message display page, the messages are always set on the top, so that a part of immovable message display areas exist in the message display page, and when the messages to be displayed are received, the rest movable message display areas are required to be ordered according to display time, so that the target message display areas of the messages to be displayed are determined.
It should be noted that, the acquiring of the display resource of the message to be displayed may be before the displaying of the message display page or may be after the displaying of the message display page, so the order of steps 102 and 103 is not fixed and may be interchanged.
104. And displaying the message to be displayed in the target message display area based on the display resource.
For example, at least one display material corresponding to the display style may be screened out from the display resource, and according to the display material, the message to be displayed is rendered in the target message display area, so as to obtain the rendered message to be displayed, and the message to be displayed after the rendering is displayed on the message display page may be specifically as follows:
s1, screening at least one display material corresponding to a display style from display resources.
The presentation material may be a material resource for generating a presentation style for a user, for example, may be a material such as an audio material, a video material, a text material, an animation material, or an image material.
For example, the material information of the display style is screened out from the display resource, at least one display material corresponding to the display style is identified in the material information, and the format of each display material is determined. For example, presentation materials such as style animation, dynamic background, sound effect, background picture and the like are identified in the material information.
And S2, rendering the message to be displayed in the target message display area according to the display material to obtain the rendered message to be displayed.
The display material may be a personalized material for decorating the message to be displayed, for example, the display material may be a material such as a background image, an animation, music or a video corresponding to the message to be displayed, or may be a material such as an image, an animation or music corresponding to the content of the message to be displayed.
For example, the content information of the message to be displayed may be acquired, and the type of the content information may be determined, for example, the head portrait, the nickname, the message content, the sending time, etc. of the sending user of the message to be displayed are acquired as the content information of the message to be displayed, where the type of the content information may be information including an image and a text. According to the format of the display material and the type of the content information, the rendering information of the message to be displayed is determined, for example, according to the format of the display material and the type of the content information, the drawing mode and the rendering mode of the drawing content information and the display material can be determined, and therefore the rendering information can be obtained. Rendering the display material and the content information in the target message display area based on the rendering information to obtain a message to be displayed after rendering, for example, drawing the display material in the target message display area based on a drawing mode to obtain a message display carrier, wherein the message display carrier can be understood as a background message frame and the like except the content information, and the message display carrier can comprise an head portrait display frame, a nickname display frame, a message content display frame, a time display frame, a number of display frames and the like. And adding the content information to the message display carrier to obtain the message to be rendered, for example, adding each piece of information in the content information to a corresponding area, so that the message to be rendered can be obtained. Rendering the message to be rendered based on the rendering mode to obtain a message to be displayed after rendering, for example, rendering the background animation, the background sound effect, the text display effect and the like in the message to be rendered based on the rendering mode respectively to obtain the message to be displayed after rendering, wherein the message to be displayed after rendering can be shown in fig. 9.
S3, displaying and rendering the message to be displayed on the message display page.
For example, when an animation or other dynamic effects exist in the message to be displayed after rendering, the dynamic effects may be played, so that the message to be displayed after rendering is displayed in the target message display area of the message display page, and the display process of the message to be displayed after rendering may be as shown in fig. 10. When the message display page displays the rendered message to be displayed, preset auxiliary display information can be added for the rendered message to be displayed, for example, a specific message display bell can be vibrated or played in the first message display device to assist a user to view or read the rendered message to be displayed.
Optionally, after the message to be displayed is displayed and rendered on the message display page, the user can view the message to be displayed through a view control on the message display page, and respond to the view operation of the view control to determine that the display state of the message to be displayed after the rendering is viewed, at this time, the display style of the message to be displayed after the rendering can be adjusted, for example, the current display style can be converted from a personalized model to a common mode, so that the user is prompted that the message to be displayed is viewed, interference on the display of the new message to be displayed can be avoided, and the displayed message can be obtained and displayed on the message display page. The display style of the message to be displayed after rendering can be kept continuously, and when a new message to be displayed is received, the display style of the historical message to be displayed is unchanged.
Optionally, when the receiving terminal receives other message display data, the receiving terminal may display the message to be displayed respectively, for example, when receiving the second message display data sent by the server, compare the receiving time of the first display message data with the receiving time of the second display message data, when the receiving time of the first message display data is earlier than the receiving time of the second message display data, adjust the display position of the rendered message to be displayed to the target message display area, for example, when receiving a new message to be displayed, the currently displayed message to be displayed needs to be removed from the target message display area, so that the new message to be displayed is rendered in the target message display area. Rendering the update message to be displayed corresponding to the second message display data in the target message display area to display the update message to be displayed, wherein the display process is shown in fig. 11. The specific rendering process is the same as the current rendering process of the message to be displayed, and will not be described here again.
As can be seen from the foregoing, in the embodiment of the present invention, when receiving first message display data sent by a message server, the first message display data includes a message to be displayed and display style information corresponding to the message to be displayed, where the display style information is used to indicate a display style of the message to be displayed, and then, according to the display style information, display resources of the message to be displayed are obtained, and when a user triggers a message display page, the message display page is displayed, where the message display page includes a target message display area, and based on the display resources, the message to be displayed is displayed in the target message display area.
According to the method described in the above embodiments, examples are described in further detail below.
In this embodiment, the description will be made from the perspective of a second message display device, which may be specifically integrated in an electronic device, where the electronic device is used as an access server, and the server may be an independent physical server, or may be a server cluster or a distributed system formed by multiple physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), and basic cloud computing services such as big data and an artificial intelligence platform.
A message display method, comprising:
receiving a message to be displayed, determining a transmitting user identifier and a receiving user identifier of the message to be displayed, acquiring target display style setting information corresponding to the receiving user identifier from a display style setting information set, determining display style information corresponding to the transmitting user identifier according to the target display style setting information, fusing the message to be displayed and the display style information to obtain first message display data, and transmitting the first message display data to a receiving terminal corresponding to the receiving user identifier so that the receiving terminal displays the message to be displayed according to the first message display data.
As shown in fig. 12, the message display method specifically includes the following steps:
201. and receiving the message to be displayed, and determining the sending user identification and the receiving user identification of the message to be displayed.
The sending user identifier may be an identity identifier of a user sending the message to be displayed, and the receiving user identifier may be an identity identifier of a user receiving and displaying the message to be displayed.
For example, a data packet sent by the sending terminal may be directly received, where the data packet may include a message to be displayed and attribute information of the message to be displayed, and determine, according to the attribute information of the message to be displayed, a sending user representation and a receiving user identifier of the message to be displayed. When the memory of the message to be displayed is larger, the message to be displayed sent by the sending terminal can be indirectly received, for example, the sending terminal stores the message to be displayed in the memory or the buffer memory, then the storage address is sent to the second message display device, the second message display device can acquire the message to be displayed and the attribute information of the message to be displayed in the memory or the buffer memory of the sending terminal according to the storage address, and the sending user identification and the receiving user identification of the message to be displayed are determined according to the attribute information of the message to be displayed.
202. And acquiring target display style setting information corresponding to the received user identifier from the display style setting information set.
For example, whether target display style setting information corresponding to the received user identifier exists is inquired in the display style setting information set, and when the target display style setting information exists in the display style setting information set, the target display style setting information is acquired in the display style setting information set. When the target display style setting information does not exist in the display style setting information set, the fact that the personalized message display style is not set by the user corresponding to the receiving user identifier is indicated, and therefore the display style setting information defaulted by the system can be used as the target display style setting information corresponding to the receiving user.
Optionally, before the target display style setting information corresponding to the user identifier is obtained from the display style setting information set, the user may set a display style, the set display style setting information is sent to the second message display device through the receiving terminal, the second message display device receives the display style setting information sent by the receiving terminal, and the display style setting information is stored in the display style setting information set, so that the display style setting information is used as the target display style setting information corresponding to the user identifier. And determining at least one display style selected by the user through the receiving terminal according to the display style setting information. Generating a static display resource package based on the memory information of the display style, for example, acquiring the memory information of the display style, when the memory of the display style exceeds a preset memory threshold, packing the resources such as the storage address of the display material in the display style at this time to obtain the static display resource package, when the memory of the display style does not exceed the preset memory threshold, downloading the display material of the display style, packing the downloaded resources such as the display material, and obtaining the static display resource package. And transmitting the static display resource packet to the receiving terminal.
203. And determining display style information corresponding to the user identification according to the target display style setting information.
For example, a display style corresponding to the sending user identifier is determined in the target display style setting information, a storage path of display materials contained in the display style is obtained, and the storage paths of the display materials are fused, so that display style information corresponding to the sending user identifier is obtained.
204. And fusing the information to be displayed and the display style information to obtain first information display data, and sending the first information display data to a receiving terminal corresponding to the user identification for receiving so that the receiving terminal displays the information to be displayed according to the first information display data.
For example, the message to be displayed and the display style information of the message to be displayed are assembled, and the assembled data packet is used as first message display data. And sending the first message display data to a receiving terminal corresponding to the receiving user identifier through the data channel, so that the receiving terminal analyzes the first message display data to obtain the message to be displayed and display style information of the message to be displayed, and displaying the message to be displayed according to the display style information.
As can be seen from the foregoing, in this embodiment, after receiving a message to be displayed, a sending user identifier and a receiving user identifier of the message to be displayed are determined, then, target display style setting information corresponding to the receiving user identifier is obtained in a display style setting information set, display style information corresponding to the sending user identifier is determined according to the target display style setting information, then, the message to be displayed and the display style information are fused to obtain first message display data, and the first message display data is sent to a receiving terminal corresponding to the receiving user identifier, so that the receiving terminal displays the message to be displayed according to the first message display data.
According to the method described in the above embodiments, examples are described in further detail below.
In this embodiment, the first message display device is integrated in the receiving terminal, and the second message display device is integrated in the message server will be described as an example.
The receiving terminal sets the display style to obtain display style setting information, and sends the display style setting information to the message server.
For example, the receiving terminal displays a display style display page, the display style display page includes at least one display style and a preview control corresponding to the display style, the display style preview page is displayed in response to a preview operation of the preview control, the display style preview page includes a setting control, display style setting information is generated in response to a setting operation of the setting control, and the display style setting information is sent to the message server. The method can be concretely as follows:
(1) And the receiving terminal displays a display style display page.
For example, a user operates a personalized decoration page of a message display client of a receiving terminal, opens a new webview and jumps to the personalized decoration page, at this time, sends data of the personalized decoration page to a message server, analyzes the package after obtaining the package of the message server, and draws and renders at webview to obtain the personalized decoration page, monitors a click event clicking the personalized decoration page, opens another new webview when the user clicks the click event of a message display control on the personalized decoration page, jumps to the display style display page, at this time, requests page data of the display style page from the message server, obtains page data returned by the message server, parses the page data, draws and renders at webview, thereby displaying the display style display page, and detects the click event of the user on the display style display page.
(2) And the receiving terminal responds to the preview operation of the preview control, and displays a display style preview page.
For example, taking the example that the user selects the A presentation style, in response to a preview operation of the preview control, a presentation style preview request is sent to the message server, wherein the presentation style preview request carries a style identifier of the A presentation style. After receiving the display style preview request, the message server returns style materials and the like of the display style corresponding to the style identifier to the receiving terminal as target display style information. And constructing a preview area in the display style display page, acquiring target display materials of the display style to be previewed according to the target display style information, drawing a preview popup window in the preview area, and selecting a corresponding mode for rendering according to the file type of the display materials, so that a display style prejudging page can be obtained, and the display style preview page can be displayed.
(3) The receiving terminal responds to the setting operation of the setting control, generates display style setting information and sends the display style setting information to the message server.
For example, when a user triggers a setting control on a display style preview page, a display style setting page is displayed in response to a setting operation of the setting control, when the user triggers an application range selection control on the display style setting page, a display style application page is displayed in response to a selection operation of the application range selection control, the display style application page comprises a friend list of a local user, the friend list comprises recently contacted friends, all friends, multi-person conversation group chat friends and the like, the user can directly select at least one friend or group chat and the like which need to be set in the contact list, and can also directly apply all friends. And responding to the contact person selected by the user in the contact person list, so that the contact person of the display style application can be determined, and the contact person information is obtained. And associating or mapping the contact information with the style identification of the selected display style to obtain the display style setting information. And sending the display style setting information to a message server.
(II) the receiving terminal and the message server construct a data channel
For example, the receiving terminal sends a data channel construction request to the message server, where the data channel construction request carries an identity of the local user, the message server verifies the identity after receiving the identity of the local user, and when the identity verification is passed, the receiving terminal sends data channel construction data to the receiving terminal, where the data channel construction data is mainly data required for constructing a long link, and after receiving the data channel construction data, the receiving terminal can base on the long link between the construction and the message server, and the long link can be called as a data channel between the long link and the message server. Through the long link, the receiving terminal can receive the first message display data sent by the message server in real time.
And thirdly, receiving the message to be displayed and displaying the message to be displayed.
As shown in fig. 13, a message display method specifically includes the following steps:
301. the message server receives the message to be displayed, and determines the sending user identification and the receiving user identification of the message to be displayed.
For example, the message server may directly receive a data packet sent by the sending terminal, where the data packet may include a message to be displayed and attribute information of the message to be displayed, and determine, according to the attribute information of the message to be displayed, a sending user representation and a receiving user identifier of the message to be displayed. When the memory of the message to be displayed is large, the sending terminal stores the message to be displayed in the memory or the cache, then the storage address is sent to the message server, and the message server can acquire the message to be displayed and the attribute information of the message to be displayed in the memory or the cache of the sending terminal according to the storage address, and determine the sending user identification and the receiving user identification of the message to be displayed according to the attribute information of the message to be displayed.
302. And the message server acquires target display style setting information corresponding to the received user identifier from the display style setting information set.
For example, the message server queries whether the target display style setting information corresponding to the received user identifier exists in the display style setting information set, and when the target display style setting information exists in the display style setting information set, the message server acquires the target display style setting information from the display style setting information set. When the target display style setting information does not exist in the display style setting information set, the fact that the personalized message display style is not set by the user corresponding to the receiving user identifier is indicated, and therefore the display style setting information defaulted by the system can be used as the target display style setting information corresponding to the receiving user.
Optionally, before obtaining the target display style setting information corresponding to the receiving user identifier, the user may set a display style, send the set display style setting information to the message server through the receiving terminal, and the message server receives the display style setting information sent by the receiving terminal and stores the display style setting information to the display style setting information set, so as to be used as the target display style setting information corresponding to the receiving user identifier. And determining at least one display style selected by the user through the receiving terminal according to the display style setting information. Obtaining memory information of a display style, packing resources such as storage addresses of display materials in the display style at the moment when the memory of the display style exceeds a preset memory threshold value to obtain a static display resource package, downloading the display materials of the display style completely when the memory of the display style does not exceed the preset memory threshold value, and packing the downloaded resources such as the display materials to obtain the static display resource package. And transmitting the static display resource packet to the receiving terminal.
303. And the message server determines to send the display style information corresponding to the user identifier according to the target display style setting information.
For example, the message server determines a display style corresponding to the sending user identifier from the target display style setting information, acquires a storage path of display materials contained in the display style, and fuses the storage path of the display materials, so as to obtain display style information corresponding to the sending user identifier.
304. The message server fuses the message to be displayed and the display style information to obtain first message display data, and sends the first message display data to a receiving terminal corresponding to the user identification for receiving.
For example, the message server assembles the message to be displayed and the display style information of the message to be displayed, and takes the assembled data packet as the first message display data. And sending the first message display data to a receiving terminal corresponding to the receiving user identifier through a data channel.
305. When first message display data sent by a message server is received, the receiving terminal analyzes the first message display to obtain a message to be displayed and display style information corresponding to the message to be displayed.
For example, when receiving the first message display data sent by the message server, the receiving terminal may decompress the first message display data according to a preset parsing policy, so as to separate the message to be displayed and the display style information in the first message display data, thereby obtaining the message to be displayed and the display style information corresponding to the message to be displayed.
306. And the receiving terminal acquires the display resources of the message to be displayed according to the display style information.
For example, the receiving terminal screens out path information from the presentation style information, identifies a storage path of each presentation resource in the path information, and determines a type of the storage path. When the storage path is an external path, the display resource corresponding to the storage path can be downloaded according to the storage path, so that the display resource is obtained.
Optionally, before acquiring the display resource of the message to be displayed, the receiving terminal may further query whether a static resource packet exists locally, so that when the message to be displayed is received, the rendering of the message to be displayed may be quickly responded, and enabled and completed, where for the local existence of the static resource packet, whether the user logs in the message display client on the receiving terminal for the first time is mainly determined, and if so, the message server may directly send a resource acquisition request, so as to acquire the static resource packet corresponding to the local user from the message server. If the user does not log in the message display client at the receiving terminal for the first time, the local global variable information is required to be acquired, and the resource variable information corresponding to the static resource package is queried in the local global variable information. When the resource variable information does not exist in the local global variable information, it can be determined that the static resource package does not exist locally, and a resource acquisition request needs to be sent to the server, so that the static display resource package is obtained. After the static presentation resource package is obtained from the message server, the resource identification information can be set to wire in the local global variable, thereby completing the addition of the resource variable information to the local global variable information.
307. When a user triggers the message display page, the receiving terminal displays the message display page, and a target message display area for displaying the message to be displayed is determined in the message display page.
For example, the user may operate a login page of the message display client, for example, input login information such as an account number and a password of the local user, so as to generate a message display page, and display the message display page. The message display control can be triggered on the session page of the message display client, so that a message display page is generated and displayed. The receiving terminal obtains the display time of the historical display messages displayed in each message display area in the message display page, sorts the message display areas according to the display time, and screens out the area with the shortest display time from the message display areas as a target message display area of the message to be displayed. When the user sets messages of certain specific contacts on the message display page, the messages are always set on the top, so that a part of immovable message display areas exist in the message display page, and when the messages to be displayed are received, the rest movable message display areas are required to be ordered according to display time, so that the target message display areas of the messages to be displayed are determined.
It should be noted that, the acquiring of the display resource of the message to be displayed may be before or after the displaying of the message display page.
308. And the receiving terminal screens out at least one display material corresponding to the display style from the display resource.
For example, the receiving terminal screens out the material information of the display style from the display resource, identifies at least one display material corresponding to the display style in the material information, and determines the format of each display material.
309. And the receiving terminal renders the message to be displayed in the target message display area according to the display material to obtain the message to be displayed after rendering.
For example, the receiving terminal obtains the head portrait, nickname, message content, sending time, and the like of the sending user of the message to be displayed as content information of the message to be displayed, and the type of the content information can be information including images and texts. According to the format of the display material and the type of the content information, the drawing mode and the rendering mode of drawing the content information and the display material can be determined, so that the rendering information can be obtained. And drawing the display materials in a target message display area based on a drawing mode to obtain a message display carrier, wherein the message display carrier can be understood as a background message frame and the like except content information, and the message display carrier can comprise an avatar display frame, a nickname display frame, a message content display frame, a time display frame, a number of display frames and the like. And adding each piece of information in the content information to the corresponding area, so that the message to be rendered can be obtained. And respectively rendering the background animation, the background sound effect, the text display effect and the like in the message to be rendered based on the rendering mode, so as to obtain the message to be displayed after rendering.
310. And the receiving terminal displays and renders the message to be displayed on the message display page.
For example, when animation or other dynamic effects exist in the message to be displayed after rendering, the receiving terminal can play the dynamic effects, so that the message to be displayed after rendering is displayed in the target message display area of the message display page, and when the message to be displayed after rendering is displayed in the message display page, vibration or playing a specific message display bell can be performed in the receiving terminal, so as to assist a user to view or read the message to be displayed after rendering.
Optionally, after the message to be displayed is displayed and rendered on the message display page, the user can view the message to be displayed through a view control on the message display page, and in response to the view operation of the view control, the display state of the message to be displayed after the rendering is determined to be viewed, at this time, the current display mode can be converted from the personalized model into the common mode, so that the user is prompted that the message to be displayed is viewed, interference on the display of the new message to be displayed can be avoided, the displayed message is obtained, and the displayed message is displayed on the message display page. The display style of the message to be displayed after rendering can be kept continuously, and when a new message to be displayed is received, the display style of the historical message to be displayed is unchanged.
Optionally, when the receiving terminal receives other message display data, the messages to be displayed may be displayed respectively, for example, when receiving second message display data sent by the server, the receiving time of the first display message data and the receiving time of the second display message data are compared, and when receiving a new message to be displayed, the currently displayed message to be displayed needs to be moved out of the target message display area, so that the new message to be displayed is rendered in the target message display area. Rendering the update message to be displayed corresponding to the second message display data in the target message display area so as to display the update message to be displayed.
As can be seen from the foregoing, in this embodiment, the receiving terminal receives first message display data sent by the message server, where the first message display data includes a message to be displayed and display style information corresponding to the message to be displayed, where the display style information is used to indicate a display style of the message to be displayed, and then, according to the display style information, display resources of the message to be displayed are obtained, when a user triggers a message display page, the message display page includes a target message display area, and based on the display resources, the message to be displayed is displayed in the target message display area.
In order to better implement the above method, the embodiment of the present invention further provides a message display device (i.e., a first message display device), where the first message display device may be integrated in a terminal, and the terminal may include a smart phone, a tablet computer, a notebook computer, and/or a personal computer.
For example, as shown in fig. 14, the first message display apparatus may include a first receiving unit 401, a first acquiring unit 402, a display unit 403, and a display unit 404, as follows:
(1) A first receiving unit 401;
The first receiving unit 401 is configured to receive first message display data sent by the message server, where the first message display data includes a message to be displayed and display style information corresponding to the message to be displayed, and the display style information is used to indicate a display style of the message to be displayed.
For example, the first receiving unit 401 may specifically be configured to send a data channel construction request to a message server, where the data channel construction request carries an identity of a local user, receive data channel construction data returned by the message server for the data channel construction request, construct a data channel between the data channel construction data and the message server based on the data channel construction data, receive, through the data channel, first message display data sent by the message server, decompress the first message display data according to a preset parsing policy, thereby separating a message to be displayed and display style information in the first message display data, and thus obtain a message to be displayed and display style information corresponding to the message to be displayed.
(2) A first acquisition unit 402;
The first obtaining unit 402 is configured to obtain, according to the display style information, a display resource of the message to be displayed.
For example, the first obtaining unit 402 may specifically be configured to screen path information from the presentation style information, identify a storage path of each presentation resource in the path information, and determine a type of the storage path. When the type of the storage path is an external path, the display resource corresponding to the storage path can be downloaded according to the storage path, so that the display resource is obtained.
(3) A display unit 403;
the display unit 403 is configured to display a message display page when the user triggers the message display page, where the message display page includes a target message display area.
For example, the display unit 403 may be specifically configured to enable a user to operate a login page of the message display client, thereby generating a message display page, and displaying the message display page. The message display control can be triggered on a session page of the message display client, so that a message display page is generated, the message display page is displayed, and a target message display area for displaying the message to be displayed is determined on the message display page.
(4) A display unit 404;
And the display unit 404 is configured to display the message to be displayed in the target message display area based on the display resource.
For example, the display unit 404 may be specifically configured to screen at least one display material corresponding to a display style from display resources, and render a message to be displayed in a target message display area according to the display material, so as to obtain a message to be displayed after rendering, and display the message to be displayed after rendering on a message display page.
Optionally, the first message display apparatus may further include a setting unit 405, as shown in fig. 15, specifically as follows:
The setting unit 405 is configured to set a display style corresponding to a message to be displayed, which is sent by a sending user, obtain display style setting information, and send the display style setting information to the message server.
For example, the setting unit 405 may be specifically configured to display a presentation style presentation page, where the presentation style presentation page includes at least one presentation style and a preview control corresponding to the presentation style, display a presentation style preview page in response to a preview operation of the preview control, and the presentation style preview page includes a setting control, generate presentation style setting information in response to a setting operation of the setting control, and send the presentation style setting information to the message server.
Optionally, the first message display apparatus may further include an updating unit 406, as shown in fig. 16, specifically as follows:
and the updating unit 406 is configured to update the message to be displayed on the message display page when a new message to be displayed is received.
For example, the updating unit 406 may be specifically configured to compare, when receiving the second message display data sent by the message server, the receiving time of the first message display data with the receiving time of the second message display data, and adjust, when the receiving time of the first message display data is earlier than the receiving time of the second message display data, the display position of the message to be displayed after rendering out of the target message display area, and render, in the target message display area, the update message to be displayed corresponding to the second message display data, so as to display the update message to be displayed.
In the implementation, each unit may be implemented as an independent entity, or may be implemented as the same entity or several entities in any combination, and the implementation of each unit may be referred to the foregoing method embodiment, which is not described herein again.
As can be seen from the foregoing, in this embodiment, the first receiving unit 401 receives the first message display data sent by the message server, where the first message display data includes the message to be displayed and the display style information corresponding to the message to be displayed, the display style information is used to indicate the display style of the message to be displayed, then the first obtaining unit 402 obtains the display resource of the message to be displayed according to the display style information, and the display unit 403 displays the message display page when the user triggers the message display page, where the message display page includes a target message display area, and the display unit 404 displays the message to be displayed in the target message display area based on the display resource. Enhancing the user's tackiness of the product.
In order to better implement the above method, the embodiment of the present invention further provides a message display device (i.e., a second message display device), where the first message display device may be integrated in a server, and the server may be a single server or may be a server cluster formed by multiple servers.
For example, as shown in fig. 17, the second message display apparatus may include a second receiving unit 501, a second acquiring unit 502, a determining unit 503, and a transmitting unit 504, as follows:
(1) A second receiving unit 501;
The second receiving unit 501 is configured to receive the message to be displayed, and determine a sending user identifier and a receiving user identifier of the message to be displayed.
For example, the second receiving unit 501 may specifically be configured to directly receive a data packet sent by the sending terminal, where the data packet may include a message to be displayed and attribute information of the message to be displayed, and determine, according to the attribute information of the message to be displayed, a sending user representation and a receiving user identifier of the message to be displayed. When the memory of the message to be displayed is larger, the message to be displayed sent by the sending terminal can also be indirectly received.
(2) A second acquisition unit 502;
A second obtaining unit 502, configured to extract, from the set of presentation style setting information, target presentation style setting information corresponding to the received user identifier.
For example, the second obtaining unit 502 may specifically be configured to query, in a display style setting information set, whether target display style setting information corresponding to the receiving user identifier exists, extract the target display style setting information when the target display style setting information exists in the display style setting information set, obtain target display style setting information, and use display style setting information default by the system as target display style setting information corresponding to the receiving user when the target display style setting information does not exist in the display style setting information set.
(3) A determination unit 503;
a determining unit 503, configured to determine, according to the target display style setting information, display style information corresponding to the sending user identifier.
For example, the determining unit 502 may be specifically configured to determine a display style corresponding to the sending user identifier from the target display style setting information, obtain a storage path of display materials included in the display style, and fuse the storage path of the display materials, so as to obtain display style information corresponding to the sending user identifier.
(4) A transmitting unit 504;
And the sending unit 504 is configured to fuse the message to be displayed and the display style information to obtain first message display data, and send the first message display data to a receiving terminal corresponding to the receiving user identifier, so that the receiving terminal displays the message to be displayed according to the first message display data.
For example, the sending unit 504 may be specifically configured to assemble a message to be displayed and display style information of the message to be displayed, and use the assembled data packet as the first message display data. The first message display data is sent to a receiving terminal corresponding to the receiving user identifier through a data channel, so that the receiving terminal analyzes the first message display data to obtain a message to be displayed and display style information of the message to be displayed, and the message to be displayed is displayed according to the display style information
As can be seen from the foregoing, in this embodiment, after the second receiving unit 501 receives the message to be displayed, and determines the sending user identifier and the receiving user identifier of the message to be displayed, then the second obtaining unit 502 extracts the target display style setting information corresponding to the receiving user identifier from the display style setting information set, the determining unit 503 determines the display style information corresponding to the sending user identifier according to the target display style setting information, and then the sending unit 504 fuses the message to be displayed and the display style information to obtain the first message display data, and sends the first message display data to the receiving terminal corresponding to the receiving user identifier, so that the receiving terminal displays the message to be displayed according to the first message display data.
The embodiment of the invention also provides an electronic device, as shown in fig. 18, which shows a schematic structural diagram of the electronic device according to the embodiment of the invention, specifically:
the electronic device may include one or more processing cores 'processors 601, one or more computer-readable storage media's memory 602, power supply 603, and input unit 604, among other components. It will be appreciated by those skilled in the art that the electronic device structure shown in fig. 18 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. Wherein:
The processor 601 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 602, and calling data stored in the memory 602, thereby performing overall detection of the electronic device. Optionally, the processor 601 may include one or more processing cores; preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor primarily handles operating systems, user interfaces, applications, etc., and the modem processor primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 601.
The memory 602 may be used to store software programs and modules, and the processor 601 may execute various functional applications and data processing by executing the software programs and modules stored in the memory 602. The memory 602 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the electronic device, etc. In addition, the memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 602 may also include a memory controller to provide access to the memory 602 by the processor 601.
The electronic device further comprises a power supply 603 for supplying power to the various components, preferably the power supply 603 may be logically connected to the processor 601 by a power management system, so that functions of managing charging, discharging, power consumption management and the like are achieved by the power management system. The power supply 603 may also include one or more of any components, such as a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The electronic device may further comprise an input unit 604, which input unit 604 may be used for receiving input digital or character information and for generating keyboard, mouse, joystick, optical or trackball signal inputs in connection with user settings and function control.
Although not shown, the electronic device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 601 in the electronic device loads executable files corresponding to the processes of one or more application programs into the memory 602 according to the following instructions, and the processor 601 executes the application programs stored in the memory 602, so as to implement various functions as follows:
receiving first message display data sent by a message server, wherein the first message display data comprises a message to be displayed and display style information corresponding to the message to be displayed, the display style information is used for indicating a display style of the message to be displayed, display resources of the message to be displayed are obtained according to the display style information, and when a message display page is triggered by a user, the message display page is displayed, wherein the message display page comprises a target message display area based on the display resources, and the message to be displayed is displayed in the target message display area.
Or (b)
Receiving a message to be displayed, determining a transmitting user identifier and a receiving user identifier of the message to be displayed, acquiring target display style setting information corresponding to the receiving user identifier from a display style setting information set, determining display style information corresponding to the transmitting user identifier according to the target display style setting information, fusing the message to be displayed and the display style information to obtain first message display data, and transmitting the first message display data to a receiving terminal corresponding to the receiving user identifier so that the receiving terminal displays the message to be displayed according to the first message display data.
The specific implementation of each operation may be referred to the previous embodiments, and will not be described herein.
As can be seen from the foregoing, in the embodiment of the present invention, when receiving first message display data sent by a message server, the first message display data includes a message to be displayed and display style information corresponding to the message to be displayed, where the display style information is used to indicate a display style of the message to be displayed, and then, according to the display style information, display resources of the message to be displayed are obtained, and when a user triggers a message display page, the message display page is displayed, where the message display page includes a target message display area, and based on the display resources, the message to be displayed is displayed in the target message display area.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present invention provide a computer readable storage medium having stored therein a plurality of instructions capable of being loaded by a processor to perform the steps of any of the message presentation methods provided by the embodiments of the present invention. For example, the instructions may perform the steps of:
Receiving first message display data sent by a message server, wherein the first message display data comprises a message to be displayed and display style information corresponding to the message to be displayed, the display style information is used for indicating a display style of the message to be displayed, display resources of the message to be displayed are obtained according to the display style information, and when a message display page is triggered by a user, the message display page is displayed, the message display page comprises a target message display area, and the message to be displayed is displayed in the target message display area based on the display resources.
Or (b)
Receiving a message to be displayed, determining a transmitting user identifier and a receiving user identifier of the message to be displayed, acquiring target display style setting information corresponding to the receiving user identifier from a display style setting information set, determining display style information corresponding to the transmitting user identifier according to the target display style setting information, fusing the message to be displayed and the display style information to obtain first message display data, and transmitting the first message display data to a receiving terminal corresponding to the receiving user identifier so that the receiving terminal displays the message to be displayed according to the first message display data.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the computer-readable storage medium may comprise: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
Because the instructions stored in the computer readable storage medium can execute the steps in any message display method provided by the embodiments of the present invention, the beneficial effects that any message display method provided by the embodiments of the present invention can be achieved, and detailed descriptions of the foregoing embodiments are omitted herein.
Wherein according to an aspect of the application, a computer program product or a computer program is provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions are read from the computer-readable storage medium by a processor of a computer device, and executed by the processor, cause the computer device to perform the methods provided in the various alternative implementations of the message presentation aspects described above.
The foregoing has described in detail the methods, apparatuses and computer readable storage medium for message presentation according to embodiments of the present invention, and specific examples have been provided herein to illustrate the principles and implementations of the present invention, the above examples being provided only to assist in understanding the methods and core ideas of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present invention, the present description should not be construed as limiting the present invention.

Claims (18)

1. The message display method is characterized by being applied to a receiving terminal corresponding to a receiving user identifier, and comprising the following steps:
Receiving first message display data sent by a message server, wherein the first message display data comprises a message to be displayed and display style information corresponding to the message to be displayed, and the display style information is used for indicating a display style of the message to be displayed, wherein the display style information is display style information corresponding to the sending user identification and the receiving user identification, which is determined in a display style setting information set, after the message server receives the message to be displayed;
According to the display style information, obtaining display resources of the message to be displayed;
when a user triggers a message display page, displaying the message display page, wherein the message display page comprises a target message display area;
and displaying the message to be displayed in the target message display area based on the display resource.
2. The message display method according to claim 1, wherein the displaying the message to be displayed in the target message display area based on the display resource includes:
screening at least one display material corresponding to the display style from the display resource;
According to the display material, rendering the message to be displayed in the target message display area to obtain a rendered message to be displayed;
and displaying the rendered message to be displayed on the message display page.
3. The method for displaying the message according to claim 2, wherein the rendering the message to be displayed in the target message display area according to the display material to obtain the rendered message to be displayed comprises:
acquiring content information of the message to be displayed, and determining the type of the content information;
determining rendering information of the message to be displayed according to the format of the display material and the type of the content information;
And rendering the display material and the content information in the target message display area based on the rendering information to obtain the message to be displayed after rendering.
4. The message display method according to claim 3, wherein the rendering information includes a drawing manner and a rendering manner, and the rendering the display material and the content information in the target message display area based on the rendering information, to obtain the rendered message to be displayed includes:
Drawing the display material in the target message display area based on the drawing mode to obtain a message display carrier;
adding the content information to the message display carrier to obtain a message to be rendered;
and rendering the message to be rendered based on the rendering mode to obtain the message to be displayed after rendering.
5. The method for displaying messages according to claim 1, wherein before obtaining the display resource of the message to be displayed according to the display style information, the method further comprises:
Acquiring local global variable information, and inquiring resource variable information corresponding to a static display resource package in the local global variable information;
When the resource variable information does not exist in the local global variable information, sending a resource acquisition request to the message server, wherein the resource acquisition request carries a local user identifier;
Receiving a static display resource packet corresponding to the local user identifier returned by the message server, and adding resource variable information corresponding to the static display resource packet into the local global variable information;
the obtaining the display resource of the message to be displayed according to the display style information comprises the following steps: and acquiring the display resources of the message to be displayed according to the display style information and the static display resource package.
6. The message presentation method of claim 2, wherein the message presentation page further comprises a view control, the message presentation page further comprising, after presenting the rendered message to be presented:
Responding to the view operation of the view control, and determining the display state of the message to be displayed after rendering as viewed;
and adjusting the display style of the message to be displayed after rendering to obtain a displayed message, and displaying the displayed message on the message display page.
7. The message display method according to claim 2, further comprising:
When receiving second message display data sent by a message server, comparing the receiving time of the first message display data and the second message display data;
When the receiving time of the first message display data is earlier than the receiving time of the second message display data, adjusting the display position of the rendered message to be displayed to a target message display area;
Rendering the updated message to be displayed corresponding to the second message display data in the target message display area so as to display the updated message to be displayed.
8. The message presentation method as claimed in claim 1, wherein before receiving the first message presentation data sent by the message server, the method further comprises:
Displaying a display style display page, wherein the display style display page comprises at least one display style and a preview control corresponding to the display style;
Responding to the preview operation of the preview control, displaying a display style preview page, wherein the display style preview page comprises a setting control;
And generating display style setting information in response to the setting operation of the setting control, and sending the display style setting information to the message server.
9. The message presentation method of claim 8, wherein the displaying a presentation style preview page in response to a preview operation of the preview control comprises:
Responding to the preview operation of the preview control, and sending a display style preview request to the message server, wherein the display style preview request carries a style identifier of a display style;
receiving target display style information corresponding to the style identification returned by the message server;
and generating the display style preview page according to the target display style information, and displaying the display style preview page.
10. The message presentation method as claimed in claim 8, wherein the generating presentation style setting information in response to the setting operation of the setting control includes:
Responding to the setting operation of the setting control, displaying a display style setting page, wherein the display style setting page comprises an application range selection control;
Responding to the selection operation of the application range selection control, displaying a display style application page, wherein the display style application page comprises a contact list with association relation with a local user;
Determining at least one contact of the display style application to obtain contact information in response to a selection operation for the contact list;
And generating display style setting information according to the contact information.
11. The message presentation method as claimed in claim 1, wherein before receiving the first message presentation data sent by the message server, the method further comprises:
sending a data channel construction request to the message server, wherein the data channel construction request carries the identity of a local user;
Receiving data channel construction data returned by the message server for the data channel construction request, and constructing a data channel between the message server and the message server based on the data channel construction data;
The receiving the first message display data sent by the message server includes: and receiving first message display data sent by the message server through the data channel, and analyzing the message display data to obtain a message to be displayed and display style information corresponding to the message to be displayed.
12. A message display method, applied to a message server, comprising:
receiving a message to be displayed, and determining a sending user identifier and a receiving user identifier of the message to be displayed;
Acquiring target display style setting information corresponding to the received user identifier from a display style setting information set;
According to the target display style setting information, determining display style information corresponding to the sending user identifier;
And fusing the information to be displayed and the display style information to obtain first message display data, and sending the first message display data to a receiving terminal corresponding to the receiving user identifier, so that the receiving terminal displays the information to be displayed according to the first message display data.
13. The message display method according to claim 12, wherein before the target display style setting information corresponding to the receiving user identifier is obtained in the display style setting information set, the method further includes:
receiving display style setting information sent by the receiving terminal, and storing the display style to the display style setting information set;
Determining at least one display style selected by the receiving terminal according to the display style setting information;
and generating a static display resource package based on the memory information of the display style, and sending the static display resource package to the receiving terminal.
14. A message display apparatus, comprising:
The first receiving unit is used for receiving first message display data sent by the message server, wherein the first message display data comprises a message to be displayed and display style information corresponding to the message to be displayed, and the display style information is used for indicating the display style of the message to be displayed, wherein the display style information is display style information corresponding to the sending user identifier and the receiving user identifier, which are determined in a display style setting information set, after the message server receives the message to be displayed;
the first acquisition unit is used for acquiring the display resources of the message to be displayed according to the display style information;
the display unit is used for displaying the message display page when a user triggers the message display page, wherein the message display page comprises a target message display area;
and the display unit is used for displaying the message to be displayed in the target message display area based on the display resource.
15. A message display apparatus, comprising:
the second receiving unit is used for receiving the message to be displayed and determining the sending user identification and the receiving user identification of the message to be displayed;
The second acquisition unit is used for acquiring target display style setting information corresponding to the received user identifier from the display style setting information set;
The determining unit is used for determining display style information corresponding to the sending user identifier according to the target display style setting information;
And the sending unit is used for fusing the message to be displayed and the display style information to obtain first message display data, and sending the first message display data to a receiving terminal corresponding to the receiving user identifier so that the receiving terminal displays the message to be displayed according to the first message display data.
16. A computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the message presentation method of any one of claims 1 to 13.
17. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the message presentation method of any one of claims 1 to 13 when the computer program is executed.
18. A computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the message presentation method of any of claims 1 to 13.
CN202011307348.7A 2020-11-20 2020-11-20 Message display method and device Active CN114594881B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011307348.7A CN114594881B (en) 2020-11-20 2020-11-20 Message display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011307348.7A CN114594881B (en) 2020-11-20 2020-11-20 Message display method and device

Publications (2)

Publication Number Publication Date
CN114594881A CN114594881A (en) 2022-06-07
CN114594881B true CN114594881B (en) 2024-05-03

Family

ID=81802849

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011307348.7A Active CN114594881B (en) 2020-11-20 2020-11-20 Message display method and device

Country Status (1)

Country Link
CN (1) CN114594881B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106210857A (en) * 2016-08-03 2016-12-07 北京金山安全软件有限公司 Message display method and device and electronic equipment
CN106656743A (en) * 2016-10-08 2017-05-10 腾讯科技(深圳)有限公司 Message display method, device and system
CN110727497A (en) * 2019-10-22 2020-01-24 网易(杭州)网络有限公司 Message display method and device
CN111506917A (en) * 2020-03-31 2020-08-07 北京三快在线科技有限公司 Page display method, display device, readable storage medium and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106210857A (en) * 2016-08-03 2016-12-07 北京金山安全软件有限公司 Message display method and device and electronic equipment
CN106656743A (en) * 2016-10-08 2017-05-10 腾讯科技(深圳)有限公司 Message display method, device and system
CN110727497A (en) * 2019-10-22 2020-01-24 网易(杭州)网络有限公司 Message display method and device
CN111506917A (en) * 2020-03-31 2020-08-07 北京三快在线科技有限公司 Page display method, display device, readable storage medium and electronic equipment

Also Published As

Publication number Publication date
CN114594881A (en) 2022-06-07

Similar Documents

Publication Publication Date Title
US10873769B2 (en) Live broadcasting method, method for presenting live broadcasting data stream, and terminal
CN106487781B (en) Resource data processing method, device and system based on live broadcast
US9686329B2 (en) Method and apparatus for displaying webcast rooms
US9866615B2 (en) Remote browsing session management
EP2793432B1 (en) Method for displaying user state, display terminal and server
WO2018113140A1 (en) Method and system for displaying virtual gift during live video broadcast
US9225763B2 (en) Distributed overlay browser for transparent streaming media support in virtualized desktop environment
US10331769B1 (en) Interaction based prioritized retrieval of embedded resources
US9166882B1 (en) Remote browsing session management
US11019393B2 (en) Video motion augmentation
WO2014183427A1 (en) Method and apparatus for displaying webcast rooms
US9749202B1 (en) Remote session preview management
CN109495427B (en) Multimedia data display method and device, storage medium and computer equipment
US9509787B2 (en) User status displaying method, and server
WO2022184041A1 (en) Picture display method and apparatus, mobile terminal, and storage medium
CN112044078A (en) Access method, device, equipment and storage medium for virtual scene application
CN112925462B (en) Account head portrait updating method and related equipment
CN111209065A (en) Dynamic wallpaper setting method and device, storage medium and electronic equipment
CN114594881B (en) Message display method and device
CN112055164A (en) Information interaction method, device, terminal and storage medium
CN114449301B (en) Item sending method, item sending device, electronic equipment and computer-readable storage medium
CN110336740B (en) Equipment management method, server and system
US20190268386A1 (en) Enhancement to autonomously executed applications
CN113891136A (en) Video playing method and device, electronic equipment and storage medium
CN114064165A (en) Application page processing method and device

Legal Events

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