CN112583695B - Message display method - Google Patents

Message display method Download PDF

Info

Publication number
CN112583695B
CN112583695B CN201910936124.3A CN201910936124A CN112583695B CN 112583695 B CN112583695 B CN 112583695B CN 201910936124 A CN201910936124 A CN 201910936124A CN 112583695 B CN112583695 B CN 112583695B
Authority
CN
China
Prior art keywords
message
displayed
structured
color
display
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
CN201910936124.3A
Other languages
Chinese (zh)
Other versions
CN112583695A (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 CN201910936124.3A priority Critical patent/CN112583695B/en
Publication of CN112583695A publication Critical patent/CN112583695A/en
Application granted granted Critical
Publication of CN112583695B publication Critical patent/CN112583695B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/06Message adaptation to terminal or network requirements
    • H04L51/066Format adaptation, e.g. format conversion or compression
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/07User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
    • H04L51/10Multimedia information

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Information Transfer Between Computers (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application relates to the technical field of computers, in particular to a message display method, which determines the message type of the structured message to be displayed; determining a message display template of the structured message to be displayed according to the mapping relation between each preset message type and the message display template, wherein the message display template comprises at least one characteristic element reflecting the message type, and each preset field of the structured message has a set display position in the message display template; and carrying the description data of the message display template in the structured message to be displayed, and sending the message to an instant communication client so that the instant communication client displays the structured message to be displayed according to the description data of the message display template, thus setting different message display templates aiming at different message types and improving the personalized display of the structured message.

Description

Message display method
Technical Field
The application relates to the technical field of computers, in particular to a message display method.
Background
The structured message is a message body type in instant messaging, and can be displayed according to a certain field and a certain style, the existing structured message display schemes are displayed according to standardized templates, but the structured message display schemes are in a general mode, the structured message display schemes are very similar among different instant messaging Application programs (APPs), and the structured message display schemes lack unique characteristics of brands, and the structured messages of different types lack personalized characteristics, are not obvious in distinction and not intuitive, so that the improvement of the personalized display of the structured message is necessary.
Disclosure of Invention
The embodiment of the application provides a message display method, which is used for improving personalized display of a structured message.
The embodiment of the application provides the following specific technical scheme:
an embodiment of the present application provides a message display method, including:
acquiring a structured message to be displayed, and determining the message type of the structured message to be displayed;
determining a message display template of the structured message to be displayed according to the mapping relation between each preset message type and the message display template, wherein the message display template comprises at least one characteristic element reflecting the message type, and each preset field of the structured message has a set display position in the message display template;
and carrying the description data of the message display template in the structured message to be displayed, and sending the description data to an instant messaging client, so that the instant messaging client displays the structured message to be displayed according to the description data of the message display template.
Another embodiment of the present application provides a message display method, including:
receiving a structured message to be displayed sent by a server;
determining a message display template of the structured message to be displayed, wherein the message display template is determined according to the message type, the message display template comprises at least one characteristic element reflecting the message type, and each preset field of the structured message has a set display position in the message display template;
and displaying the message content of each preset field of the structured message to be displayed on the determined message display template.
Another embodiment of the present application provides a message display apparatus, including:
the system comprises a first determining module, a second determining module and a display module, wherein the first determining module is used for acquiring a structured message to be displayed and determining the message type of the structured message to be displayed;
the second determining module is used for determining the message display template of the structured message to be displayed according to the mapping relation between each preset message type and the message display template, wherein the message display template comprises at least one characteristic element reflecting the message type, and each preset field of the structured message has a set display position in the message display template;
and the sending module is used for carrying the description data of the message display template in the structured message to be displayed and sending the message to an instant messaging client so that the instant messaging client displays the structured message to be displayed according to the description data of the message display template.
Another embodiment of the present application provides a message display apparatus, including:
the receiving module is used for receiving the structured message to be displayed sent by the server;
the determining module is used for determining a message display template of the structured message to be displayed, wherein the message display template is determined according to the message type and comprises at least one characteristic element reflecting the message type, and each preset field of the structured message has a set display position in the message display template;
and the display module is used for displaying the message content of each preset field of the structured message to be displayed on the determined message display template.
Another embodiment of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the steps of any of the above message presentation methods.
Another embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of any of the above-mentioned message presentation methods.
In the embodiment of the application, the message type of the structured message to be displayed is determined, and the message display template of the structured message to be displayed is determined according to the mapping relation between each preset message type and the message display template, wherein the message display template comprises at least one characteristic element reflecting the message type and is sent to the instant messaging client for displaying, and then the instant messaging client can display the structured message to be displayed according to the message display template, so that different message display templates are set for different message types, a user can easily distinguish different message types according to the characteristic element reflecting the message type in the message display template, the personalized attributes of different message types are enhanced, and the personalized display of the structured message is improved.
Drawings
FIG. 1 is a diagram illustrating a structured message display in the related art;
FIG. 2 is a diagram illustrating another structured message display in the related art;
FIG. 3 is a schematic diagram of an application architecture of a message display method according to an embodiment of the present application;
FIG. 4 is a flow chart of a message display method in an embodiment of the present application;
FIG. 5 is an exemplary diagram of outline profiles of different message types in an embodiment of the present application;
FIG. 6 is a diagram illustrating message display templates of different message types displayed in a chat interface according to an embodiment of the present application;
FIG. 7 is a diagram illustrating color system table definitions in an embodiment of the present application;
fig. 8 is a schematic diagram showing principle of determining dominant color of background color in the embodiment of the present application;
FIG. 9 is a schematic diagram illustrating a background color rendering effect in an embodiment of the present application;
FIG. 10 is a flow chart of another message display method in an embodiment of the present application;
FIG. 11 is a schematic view of an interface of an interactive function of a video-based structured message according to an embodiment of the present application;
FIG. 12 is a schematic diagram of an interface of an interoperation function of a music-based structured message according to an embodiment of the present application;
FIG. 13 is a diagram illustrating an effect of an interface for implementing a recommended structured message in an embodiment of the present application;
FIG. 14 is a schematic diagram illustrating a message display method according to an embodiment of the present application;
FIG. 15 is a flowchart illustrating another message displaying method according to an embodiment of the present application;
FIG. 16 is a diagram illustrating a message display apparatus according to an embodiment of the present application;
FIG. 17 is a diagram illustrating another message display apparatus according to an embodiment of the present application;
fig. 18 is a schematic structural diagram of a terminal in the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
For the purpose of facilitating an understanding of the embodiments of the present application, a brief introduction of several concepts is provided below:
instant Messaging (IM): the system is a real-time communication system, and allows two or more people to use a network to transmit text information, files, voice and video in real time.
Structuring the message: the structured message is a message body type in instant messaging, and is provided with a plurality of fields, which generally comprise four parts, namely title text information, abstract text information, picture thumbnail information (or video thumbnail information) and a message source, although other field formats are possible, the styles and positions of the fields are distinguished in the same structured message, but are relatively fixed in different structured messages.
HSB mode: h, S, B in the HSB mode respectively represent hue, saturation, brightness (or lightness), which is a color mode defined from a visual point of view, where hue H: on a standard color wheel of 0-360 degrees, the hue is measured according to the position, and in the common use, the hue is identified by the color name; saturation S: refers to the intensity or purity of the color, the saturation, which represents the proportion of the color components in the color phase, measured as a percentage from 0 (grey) to 100% (fully saturated), increases progressively from the center towards the edges on a standard color wheel; brightness B: is the relative shade of the color, typically measured from a percentage of 0 (black) to 100% (white).
Structured messages are widely applied as a message body type in instant messaging, and in the prior art, a structured message display manner is displayed according to a standardized template, for example, as shown in fig. 1, a schematic diagram of a structured message in the related art is displayed, as shown in fig. 1, structured messages can be displayed through specified pictures, for example, a specified picture can be used for representing when a PDF file and a WORD file are sent, such a structured message type generally consists of three parts, namely, title text information, auxiliary text information, icon pictures and the like, the message type is identified through technology, then the type of the message is represented by a series of specific icon pictures specified by a system, and in the layout of the message structure, the type of the message is generally a left-image right text or a right-image left-image text. For another example, referring to fig. 2, another schematic diagram of displaying a structured message in the related art is shown, where the structured message may be displayed by pulling a picture in the message, for example, when the web message is shared, a picture in the web message may be pulled to be displayed, and this type of structured message generally consists of four parts, i.e., title text information, abstract text information, picture thumbnail information (or video thumbnail information), and a message source, and when the structured message is generated, a certain picture in the text content of the message is picked in real time and displayed in the message body, so as to assist the description and help the user to know the text content in advance.
However, the structured message technical solution in the related art has the following disadvantages: 1) the instant messaging Application program (APP) is a general mode, and the unique features of brands are lacked among different instant messaging Application programs (APPs), for example, the structured message display mode of sending PDF and WORD files shown in fig. 1 is a standardized template, and has become an industry passing mode of the instant messaging APP, and even on different instant messaging APPs, the structured message scheme is very similar. 2) Personalized features are also lacking between different message types in the same instant messaging APP. For example, as shown in fig. 1, when a file is transmitted, the PDF file and the WORD file are only distinguished on a picture, and the distinction is not obvious and intuitive. 3) In the related technology, the display content of the structured message is limited, the interaction capacity is single, at present, only click operation can be supported, and other operations can be carried out only after a page is opened again after clicking and skipping.
Therefore, in order to solve the problems of the lack of brand features, the lack of personalized attributes of message types, the single interactive operation capability and the like among different instant messaging APPs of the structured messages, the embodiment of the application provides a message display method, a personalized message display template is determined by judging the message type of the structured message to be displayed, and the message display template comprises at least one feature element for reflecting the message type, so that personalized message display can be realized according to the message display template, the message types are visualized, the personalized message display template is endowed with the brand features of the structured message, and the personalized attributes of different message types are enhanced.
In addition, in the embodiment of the application, the picture corresponding to the structured message to be displayed can be obtained, the display background color is determined according to the picture, so that the message display template can be rendered according to the display background color, the structured message is more personalized, more direct and more diverse interactive operation functions can be matched according to the message type, the structured message display is realized to support more interactive operation functions, the interactive operation is simpler and diversified, a user can directly perform more diverse and more direct interactive operation in the structured message, the steps are simplified, the user experience is improved, and the conversion rate of the product can be effectively improved.
Fig. 3 is a schematic diagram of an application architecture of the message display method in the embodiment of the present application, including an instant messaging client 100 and a server 200.
The instant messaging client 100 may be installed in any smart device terminal such as a smart phone, a tablet computer, a portable personal computer, etc., and users may send and receive messages to and from each other through the instant messaging client 100 on the terminal, and the sent and received messages may be displayed in their respective instant messaging clients 100. Moreover, after receiving and displaying the personalized structured message sent by the server 200, the instant messaging client 100 in the embodiment of the present application may also respond to the operation of the user on the structured message, so as to implement more interactive operation functions on the structured message.
The server 200 can provide various network services for the instant messaging client 100, and specifically, the server 200 may include a processor 210 (CPU), a memory 220, an input device 230, an output device 240, and the like, the input device 230 may include a keyboard, a mouse, a touch screen, and the like, and the output device 240 may include a Display device, such as a Liquid Crystal Display (LCD), a Cathode Ray Tube (CRT), and the like.
Memory 220 may include Read Only Memory (ROM) and Random Access Memory (RAM), and provides processor 210 with program instructions and data stored in memory 220. In the embodiment of the present application, the memory 220 may be used to store a program of any one of the server-side message presentation methods in the embodiment of the present application.
The processor 210 is configured to execute the steps of any of the server-side message presentation methods according to the embodiments of the present application by calling the program instructions stored in the memory 220, according to the obtained program instructions.
For example, in the embodiment of the present application, two terminals are a terminal a and a terminal B, where the terminal a and the terminal B are both installed with an instant messaging client and correspond to the user a and the user B, respectively, and when the user a sends a structured message to the user B through the instant messaging client on the terminal a, the instant messaging client on the terminal a receives the structured message input by the user a and sends the structured message to the server 200. In an implementation manner provided by the present application, the server 200, based on the message display method in the embodiment of the present application, determines the message type of the structured message, determines the structured message and determines the message type, determines a message display template according to the message type, carries description data of the message display template in the structured message, and sends the description data to the instant messaging client on the terminal B, and the instant messaging client on the terminal B can display the structured message based on the message display template. In another implementation manner provided by the present application, the instant messaging client on the terminal B determines the message type of the structured message based on the message display method in the embodiment of the present application, determines the structured message and determines the message type, determines a message display template according to the message type, and further displays the structured message according to the determined message display template.
In addition, when the messages of other clients are shared to the instant messaging client 100 in the embodiment of the present application, when the instant messaging client 100 displays the message, the message can be displayed based on the message display method in the embodiment of the present application, for example, a news client and an instant messaging client 100 are installed in the terminal, and the user a browses news messages on the news client, can share the news messages to the user, that is, the news message is sent to the server 200 by the news client, and the server 200, after processing based on the message display method in the embodiment of the present application, sends the message to the chat box of the user a in the instant messaging client 100 in the terminal, so that, the messages displayed in the chat frame of the user a in the instant messaging client 100 are also related to the message types and color matching thereof, and have personalized message display templates, display background colors and the like. Or the server 200 directly forwards the news message to the news client, and the news client completes personalized display of the structured message based on the message display method in the embodiment of the application.
The server 200 may be a server, a server cluster formed by a plurality of servers, or a cloud computing center.
The instant messaging client 100 and the server 200 are connected through the internet to realize mutual communication. Optionally, the internet described above uses standard communication techniques and/or protocols. The internet is typically the internet, but can be any Network including, but not limited to, a Local Area Network (LAN), a Metropolitan Area Network (MAN), a Wide Area Network (WAN), any combination of mobile, wireline or wireless networks, private or virtual private networks. In some embodiments, data exchanged over a network is represented using techniques and/or formats including Hypertext Mark-up Language (HTML), Extensible Markup Language (XML), and the like. All or some of the links may also be encrypted using conventional encryption techniques such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec). In other embodiments, custom and/or dedicated data communication techniques may also be used in place of, or in addition to, the data communication techniques described above.
It should be noted that the application architecture diagram in the embodiment of the present application is used to more clearly illustrate the technical solution in the embodiment of the present application, and does not limit the technical solution provided in the embodiment of the present application, and is not limited to structured messages, and the technical solution provided in the embodiment of the present application is also applicable to similar problems for other application architectures and business applications. In the following embodiments of the present application, a message presentation method is schematically illustrated as applied to the application architecture shown in fig. 3.
Based on the foregoing embodiment, the following describes a message display method in the embodiment of the present application, and refer to fig. 4, which is a flowchart of a message display method in the embodiment of the present application, and takes a server side as an example to describe in detail, where the method includes:
step 400: and acquiring the structured message to be displayed, and determining the message type of the structured message to be displayed.
For example, when a user a and a user B perform message interaction through an instant messaging client, the user a sends a message to a server through a chat interface in the instant messaging client, the server processes the message after receiving the message, and sends the message to the instant messaging client of the user B, and the message can be respectively displayed in the chat interfaces of the user a and the user B.
The embodiment of the application is directed to personalized display of a structured message, so further, after the server acquires the message, whether the message is the structured message needs to be judged, if the message is the structured message, the message type of the structured message to be displayed is judged, and if the message is not the structured message, the message can be processed according to a general message template so as to be displayed on the instant messaging client.
Wherein the message type is not limited to any of the following: games, videos, music. In the embodiment of the application, the corresponding message display template, the interactive operation function and the like can be preset for the structured messages of different message types, certainly not limited to the game type, the video type and the music type, but also can be preset for other more message types so as to realize the personalized display of the structured messages of more message types.
Step 410: and determining the message display template of the structured message to be displayed according to the mapping relation between each preset message type and the message display template.
The message display template comprises at least one characteristic element reflecting the type of the message, and each preset field of the structured message has a set display position in the message display template.
The feature elements in the message display template may be contour outlines, and the contour outlines include at least one layer of constituent elements, such as record shapes, plant shapes, various game APP shapes, and the like, without limitation. Of course, the feature elements in the message display template may also be other elements, so that the purpose may be to distinguish different message types.
In the embodiment of the application, classification and induction can be performed in advance according to the message types of the structured messages, a type library is defined in a system background, corresponding outline and message display templates are designed according to the type library, and the mapping relation between each message type and each message display template is preset.
According to different message types, the following cases can be classified when step 410 is executed:
and if the message type of the structural message to be displayed is the game type, determining that the message display template of the structural message to be displayed is in the shape of a preset game handle.
And if the message type of the structural message to be displayed is a video type, determining that the message display template of the structural message to be displayed is in a preset video player shape.
And if the message type of the structural message to be displayed is music, determining that the message display template of the structural message to be displayed is a preset record shape, wherein the preset record shape at least comprises two layers of constituent elements and is a square record box shape and a circular record shape from top to bottom in sequence.
For example, referring to fig. 5, which is an outline exemplary diagram of different message types in the embodiment of the present application, as shown in fig. 5, a message display template of a game-class structured message may be a gamepad shape, and further, when displaying, other field information of the structured message to be displayed may be added to the gamepad shape, for example, information such as a game name "guardian radish", a message source "shared from an instant messaging applet", and a picture thumbnail may be displayed on the gamepad shape.
As for the video-type structured message in fig. 5, the message display template may be in a video player shape, and similarly, when displaying, other field information of the structured message to be displayed may also be added to the video player shape, for example, the video title text "this is a street dance" is displayed on the video player shape, the message source "is shared by the instant messaging applet", and the video thumbnail (the video thumbnail in fig. 5 is only an example, and the blurring is performed only so as not to use a sensitive picture, and in practice, the picture does not need to be blurred when implementing the message display method of the present application, and the blurring in the diagram related to the picture display hereinafter is also the same.
As shown in fig. 5, the message display template of the music structured message is a record shape or a CD disc, and may include two layers of constituent elements, where the upper layer is a square record box shape, the lower layer is a circular record shape, and the two layers are combined together to form an outline of the music structured message, and further, when displaying, other field information of the structured message to be displayed may be added to different positions of the record shape, so that the two layers of design may make it possible to respectively render different colors, design different interactive operation functions, and the like for different layers of constituent elements during subsequent color rendering or interactive operation function design.
Of course, the message display templates of the game class, the video class and the music class may also be preset with other different outline outlines, which are only an example and are not limited in the embodiment of the present application.
For another example, referring to fig. 6, a schematic diagram of a message presentation template of different message types presented in a chat interface in an embodiment of the present application is shown, as shown in fig. 6, a user sends and receives a message in a chat interface of an instant messaging service, for example, is a job done by sending a message "brother dei? Quick to play a game, super good play! "and share the game" guard radish "to the other party, the message of the game" guard radish "is a structured message, as can be seen from fig. 6, the message display template of the game" guard radish "displayed on the chat interface is the shape of the gamepad. The received message replied by the other party is that street dance is too good, the received message shared by the other party is that street dance video, the video is that street dance video is structured message, the video displayed on the chat interface is that street dance message display template is video player shape, the user can easily distinguish message types of different structured messages, namely, 'defending radish' is game message, 'and street dance' is video message.
Step 420: and carrying the description data of the message display template in the structured message to be displayed, and sending the message to the instant messaging client, so that the instant messaging client displays the structured message to be displayed according to the description data of the message display template.
In another embodiment, the server can send the detailed information of the message display template to the client, the client does not need to store each message display template, and after receiving the detailed description information sent by the server, the client can directly draw and obtain the message display template according to the detailed information of the message display template sent by the server and display the message display template, the examples of the present application are not intended to be limiting with respect to these two possible embodiments.
Therefore, different message display templates are determined according to different message types, and the content of each field of the structured message can be displayed at the display position set in the message display template.
Further, in the embodiment of the present application, in order to further improve personalized display of a structured message, different color schemes are considered to give a stronger personalized attribute to the structured message, so that even if the same message type is used, the same outline is used, and different structured messages can still be distinguished through different color representations, a possible implementation manner is further provided in the embodiment of the present application, and specifically includes:
acquiring a picture corresponding to the structured message to be displayed, and determining the display background color of the structured message to be displayed according to the color of the picture; the description data further includes indication information for displaying the background color, so that the instant messaging client renders a message display template according to the indication information for displaying the background color, and displays the to-be-displayed structured message according to the rendered message display template.
The method includes the steps of obtaining a picture corresponding to the structural message to be displayed, and determining a display background color of the structural message to be displayed according to the color of the picture, and specifically includes the following steps:
and S1, acquiring the picture corresponding to the structured message to be displayed.
The following two embodiments can be specifically classified:
one embodiment is as follows: and extracting pictures from the structural message to be displayed, and taking the extracted pictures as the pictures corresponding to the structural message to be displayed.
In the embodiment of the present application, in order to ensure that the display background colors of different structured messages are different, first, a picture is extracted from a structured message to be displayed, in practice, usually the structured message carries a picture, for example, a game type, a video type, or a music type, and a game cover, a video thumbnail, a music album cover (or an acquired singer's pictorial picture) and the like can be extracted.
In another embodiment: and if the picture cannot be extracted from the structural message to be displayed, taking the preset picture as the picture corresponding to the structural message to be displayed.
For example, some news messages that do not include pictures cannot be extracted from the pictures, and the pictures may be pre-designated and used as the pictures corresponding to the structured messages to be displayed.
The preset pictures may be set for different message types, or the same preset picture may be set for all message types, which is not limited in the embodiment of the present application.
And S2, determining the display background color of the structured message to be displayed according to the color of the picture.
The method specifically comprises the following steps: s2.1, compressing the picture to obtain the compressed mosaic color plate.
In the embodiment of the application, the purpose is to obtain the display background color based on the color of the picture of the structured message to be displayed, so that the picture can be subjected to pixelized compression, and a plurality of color blocks representing the color of the picture are obtained after the compression.
And S2.2, matching the color of each pixel block in the mosaic color plate with a preset color system table in sequence to determine the color system which is matched most successfully.
The preset color system table comprises a plurality of predefined color systems, and the plurality of color systems all adopt an HSB mode, wherein the HSB mode comprises hue H, saturation S and brightness B. Specifically, S is defined as 100, B is defined as 100, and H is divided from 0 to 360 at set intervals, and the dominant color of each color system is set as the color corresponding to the middle position of the corresponding H-value interval.
In HSB mode, the H value range is 0-360; the S value range is 0-100, and the larger the S is, the purer the color is; the range of B is 0-100, and the larger B indicates the brighter color, and since the value of H affects the factor of the color change most sensed by human eyes, in the embodiment of the present application, both S and B are defined as fixed values, for example, S is defined as 100, B is defined as 100, and a plurality of color systems are defined according to the change of the value of H.
Referring to fig. 7, a schematic diagram of the definition of the color system table in the embodiment of the present application is shown, in the color system table, the value of H is divided from 0 ° to 360 ° by every 30 ° color system, and 12 color systems such as 345 ° -15 °, 15 ° -45 °, 75 ° -105 ° are divided in total. And, defining H corresponding to the middle line of each acute angle of 30 ° as the dominant color of the color system, for example, (345 °, -15 °), and the color corresponding to (H360, S100, B100) in the color system is the dominant color of the color system.
In this way, the color of each pixel block in the mosaic color plate is traversed and analyzed, the color value of each pixel block is determined, and the color value is matched with the color system table.
For example, referring to fig. 8, a schematic diagram of a principle of determining a dominant color of a background color in the embodiment of the present application is shown, as shown in fig. 8, where (a) in fig. 8 is a picture, (B) is a mosaic color board obtained after pixelization compression, and (C) is a value of a color corresponding to each block, for example, in the diagram (C), 12 color blocks exist, and the colors are sequentially (H17, S45, B52), (H22, S42, B60), (H26, S41, B66), …, (H354, S55, B69), and according to the value of H, the color falling in a color system interval (345 °, -15 °) is the largest, the color system in the interval is determined to be the color system that is the most successfully matched, and the dominant color of the color system, that is, the color corresponding to the intermediate position, is determined (H360, S100, B100) shown in (D).
And S2.3, determining the dominant color of the color system which is matched most successfully, generating a gradient color gamut based on the dominant color, and determining the gradient color gamut as the display background color of the structural message to be displayed.
Wherein, based on the dominant color, a gradient color gamut is generated, which specifically includes:
1) and based on the dominant color, reducing the values of H, S and B of the dominant color by correspondingly set first interval values respectively to obtain a first color.
The first interval values H, S and B are set accordingly, and may be set according to requirements, which is not limited in the embodiment of the present application.
For example, first, the first color with HSB value of (H-5, 90, 95) is obtained by subtracting 5 from the H value of the dominant color, 90 from the S value, and 95 from the B value.
2) And increasing the H of the main color by a correspondingly set second interval value, and reducing the S and B values of the main color by a correspondingly set third interval value to obtain a second color.
The second interval value and the third interval value that H, S and B set correspondingly may be set according to a requirement, which is not limited in this embodiment of the present application.
For example, increasing the H value of the dominant color by 5, decreasing the S value by 30 is defined as 70, and decreasing the B value by 2 is defined as 98, resulting in a second color with HSB value (H +5, 70, 98).
3) And performing gradient processing from the first color to the second color to generate a gradient color gamut.
For example, referring to fig. 9, a schematic diagram illustrating a background color rendering effect in the embodiment of the present application is shown, where a gradient process is performed from a first color (365, 90, 95) to a second color (5, 70, 98) to generate a gradient color gamut, and then, during rendering, the gradient color gamut can be used as a background color of a message display template, and the background color gradually changes from an upper left corner (365, 90, 95) to a lower right corner (5, 70, 98) as shown in fig. 9.
The mode of performing the gradient processing from the first color to the second color is, for example, setting a step length or an execution number, calculating a color value that needs to be increased or decreased in each step, and finally changing the color value into a target color, that is, a value of the second color.
In the embodiment of the application, different color backgrounds can be obtained by compressing and traversing the pictures in the structured message, so that the personalized expression of the structured message can be promoted, the attention of a user is attracted, and the click rate and the conversion rate are increased, for example, in the structured message of different message types illustrated in fig. 5, the display background color of the display background color is related to the color of the displayed picture thumbnail or the color of the displayed video thumbnail.
Further, because the display background color is set, the display background colors of different structured messages may be different, and usually the structured messages also need to display the text field information, in order to make the display of the text field information clearer, after the display background color is determined, the display color of the text field information can be correspondingly determined, so that the display color of the text field information is different from the display background color, and the text field information can be well distinguished when being superimposed.
Based on the foregoing embodiment, further, in the embodiment of the present application, a personalized, more direct and richer interactive operation function may also be matched according to a message type of the structured message, which specifically includes:
and S1, determining the interactive operation function of the structured message to be displayed according to the preset mapping relation between the message type and the interactive operation function.
In the embodiment of the present application, in consideration that the interactive operation functions required by different message types may be different, different interactive operation functions are set based on different message types, which specifically includes the following cases:
one of the situations is: and if the message type of the structured message to be displayed is a video type, determining that the interactive operation function of the structured message to be displayed at least comprises a preview playing operation function and a full-screen playing operation function.
For example, a preview playing operation function may be integrated at a picture thumbnail display position of the video-type structured message, so that the user can preview and play in the structured message by clicking the picture thumbnail.
For another example, a full-screen playing operation function may be integrated at a title text display position of the video structured message, so that a user may click the title text, and then page jump may be performed to enter full-screen playing.
In another case: and if the message type of the structured message to be displayed is music, determining that the interactive operation function of the structured message to be displayed at least comprises a play or play pause operation function, a play progress adjusting operation function and a lyric display operation function.
For example, a play or play pause function key may be superimposed on the position of the picture thumbnail in the music-like structured message, the user may click the function key to start playing or play pause of music, and when the playing is started, the position may be set to display lyrics and a progress bar.
For another example, a disc shape element of the music-like structured message may be integrated with a play progress adjustment operation function, and the user may drag the disc to adjust the play progress.
S2, integrating the interactive operation function of the structured message to be displayed in the corresponding component elements of the outline; or, the function key corresponding to the interactive operation function of the structured message to be displayed is superposed on the corresponding position in the message display template.
That is, when the interactive function is implemented, the corresponding function key may be superimposed on the message presentation template, for example, a play pause or start key is set. Some elements in the outline can also be designed to have an interactive operation function, for example, music structured messages, and the shape of the circular record can be designed to have functions of rotating, adjusting the playing progress and the like.
Therefore, in the embodiment of the application, operations such as playing, pausing and downloading can be directly performed in the structured message, and different structured messages also have different and personalized interactive operation capabilities according to the difference of the message types of the structured message, so that the diversity and the simplicity of the interactive operation function are improved.
Based on the foregoing embodiment, further, in the embodiment of the present application, a function of recommending structured messages of the same message type and attribute may also be supported, which specifically provides a possible implementation manner:
1) and determining the structured message which has the same message type as the structured message to be displayed and has the message content similarity larger than a threshold value.
2) Recommending the determined structured message to the instant messaging client so that the instant messaging client displays the recommended structured message when receiving a preset recommended viewing operation on the displayed structured message to be displayed.
The preset recommended viewing operation is, for example, a structural message to be displayed after left-sliding display, and a specific operation mode is not limited in the embodiment of the present application.
For example, a structured message is a game, a left slide may find more games of the same type and with higher similarity, and for example, a structured message is a song by Zhougelong, a left slide may find recommended music related to a Zhougelon or Taiwan singer.
Therefore, according to the method and the device for providing the content recommendation, relevant recommendation can be provided for the user according to the message type of the structured message, higher-quality content display can be provided for the user, and the use experience of the user is improved.
Based on the foregoing embodiment, referring to fig. 10, a flowchart of another message displaying method in the embodiment of the present application is applied to an instant messaging client side, and the method includes:
step 1000: and receiving the structural message to be displayed sent by the server.
Step 1010: and determining a message display template of the structured message to be displayed.
The message display template is determined according to the message type, the message display template comprises at least one characteristic element reflecting the message type, and each preset field of the structured message has a set display position in the message display template.
In the embodiment of the application, the server processes the structured message and sends the processed structured message to the instant messaging client so that the instant messaging client can perform personalized display.
When the instant messaging client determines the message display template, the embodiment of the application provides several possible implementation modes:
one embodiment is as follows: if the structural message to be displayed at least carries description data of the message display template, determining the message display template of the structural message to be displayed, which specifically comprises:
and S1, obtaining the description data of the message display template from the structural message to be displayed, wherein the message display template is determined by the server from the mapping relation between each preset message type and the message display template according to the type of the structural message to be displayed.
And S2, determining the message display template according to the description data of the message display template.
In this embodiment of the present application, after the server determines the message type, the server sends identification indication information or specific detailed information carrying the message display template to the instant messaging client, where the identification indication information indicates to tell the instant messaging client which message display template is, and at this time, the instant messaging client needs to store each message display template and identification, and the specific detailed information is used to tell the instant messaging client to directly draw according to the specific detailed information, and the message display template does not need to be stored in advance, so that the instant messaging client determines the message display template according to description data sent by the server.
In another embodiment: and the instant messaging client can also determine a message display template according to the message type of the structured message to be displayed.
The specific implementation manner is not limited in the embodiment of the present application.
Step 1020: and displaying the message content of each preset field of the structured message to be displayed on the determined message display template.
Wherein, the characteristic elements in the message display template are outline outlines; the outline comprises at least one layer of constituent elements; the description data also comprises indication information for displaying background color, and the display background color is determined by the server according to the color of the acquired picture of the structured message to be displayed;
the specific determination method for displaying the background color is the same as the determination method in the server side, and is not described here again.
Furthermore, in this embodiment of the application, when the instant messaging client displays the to-be-displayed structured message, the message display template may be rendered according to the indication information of the display background color included in the description data, specifically including the following two ways:
one way is as follows: and rendering the message display template according to the display background color.
The whole message display template can be rendered, and can be in the same color system.
In another mode: and if the outline of the message display template comprises a plurality of layers of constituent elements, rendering the designated layer of constituent elements in the outline according to the display background color.
That is, when rendering according to the display background color, only one layer of the outline profile may be rendered, the different layer component elements may be colors of different color systems, for example, music structured messages, the outline profile includes two layers, namely, a square record box shape and a circular record shape, the color of the circular record shape may be set to be fixed black, and the square record box shape one layer is rendered according to the display background color.
Based on the above embodiment, in the embodiment of the present application, different interactive operation functions may also be set for the structured messages of different message types, and the structured message to be displayed received by the instant messaging client side at least carries the corresponding interactive operation function; the interactive operation function is determined by the server according to the mapping relation between each preset message type and the interactive operation function, and the interactive operation function is integrated in the corresponding component element of the outline or is superposed on the corresponding position in the message display template as a function key.
Specifically, the implementation of the interactive operation function on the instant messaging client side is explained based on different message types.
If the message type of the structural message to be displayed is a video type, responding to the click operation of a first preset position in the displayed structural message to be displayed, and previewing and playing the displayed structural message to be displayed; and responding to the click operation of a second preset position in the displayed structured message to be displayed, skipping the page, and performing full-screen playing in the skipped page.
The first preset position and the second preset position are, for example, the first preset position is a picture thumbnail position, and the second position is a title text position.
For example, referring to fig. 11, a schematic view of an interactive operation functional interface of a video structured message in the embodiment of the present application is shown, as shown in (1) of fig. 11, the video structured message is displayed on a chat interface of an instant messaging client, and is in a state when the video structured message is not clicked, and then a user may click on a position of a title text, as shown in (2) of fig. 11, that is, a page may be jumped, and may be played in a full screen in the jumped page, and the user clicks on a position of a picture thumbnail, as shown in (3) of fig. 11, and may enter a preview play in the structured message after clicking on the picture thumbnail.
If the message type of the structural message to be displayed is music, playing in response to the click operation of a preset playing button in the displayed structural message to be displayed, presetting a picture field area display progress bar in the displayed structural message to be displayed, and presetting a character field area display lyric; and responding to the sliding operation of the component elements integrated with the interactive operation function for adjusting the playing progress in the displayed structured message to be displayed, and adjusting the playing progress.
For example, referring to fig. 12, a schematic diagram of an interface of an interactive operation function of a music-based structured message in an embodiment of the present application is shown, for example, (1) in fig. 12 shows an effect of a music-based structured message that is not clicked to play, it can be known that a play or pause button can be superimposed on a position of a picture thumbnail, and a user can click the button to play music, for example, (2) in fig. 12, after clicking to play, a right-side circular record scrolls, lyrics appear at a position of a left-side record box, a progress bar (i.e., a circular outer boundary of the picture thumbnail) appears at a position of the picture thumbnail, and the user can also adjust a play progress, for example, (3) in fig. 12, a user finger can drag the circular record, thereby adjusting the play progress.
Therefore, various and more direct interactive operations can be performed in the structured message based on different message types, and the personalized interactive capability of the structured message is improved.
Further, based on the above embodiment, the user may further operate the to-be-displayed structured message displayed on the instant messaging client to find the recommended structured message with the same message type and attribute, and a possible implementation manner is provided in the embodiment of the present application: and when responding to the preset recommended viewing operation of the displayed structured message to be displayed, displaying the recommended structured message, wherein the recommended structured message is the structured message which is determined by the server and has the same message type with the structured message to be displayed and the similarity of the content of the structured message is greater than a threshold value.
For example, referring to fig. 13, for a diagram of an effect of an implementation interface of a recommended structured message in the embodiment of the present application, a preset recommended viewing operation is a left slide, and as shown in fig. 13, the left slide may find more other video recommendations related to the video-class structured message to meet the needs of the user.
It should be noted that the interface implementation diagram in the embodiment of the present application is only one possible example, and different interactive operation functions may be set according to requirements and actual situations for structured messages of different message types, and implementation manners of the interactive operation functions may also be set in different positions or on different constituent elements, which are not limited in the embodiment of the present application.
Therefore, in the embodiment of the application, the structured messages displayed on the instant messaging client are related to the message types, the picture colors and the like, the structured messages of different message types can display different appearance profiles, colors, interactive operation functions, related recommendations and the like, personalized display of the structured messages is realized, different message types can be better distinguished for users, the aesthetic fatigue of users with repeated patterns is greatly reduced, the operation desire of the users is enhanced, the users can more directly judge the message types, the user operation is simplified, the effective product conversion rate of the users is improved, the structured messages are better touched to the users, the user experience is improved, and the message recommendation capability can be considered.
Based on the foregoing embodiment, the following briefly describes a principle of a personalized display implementation scheme of a structured message in the embodiment of the present application, and specifically refers to fig. 14, which is a schematic diagram of a principle of a message display method in the embodiment of the present application.
In the embodiment of the application, in order to realize personalized display of structured messages of different message types, the structured messages can be subjected to hierarchical relationship processing according to different attributes of the structured messages, different message types and the characteristics of each structured message, and personalized visual processing is performed according to message attributes, character attributes, picture attributes and the like.
As shown in fig. 14, the structured message personalized presentation may be divided into an information presentation layer, a visual rendering presentation layer, and an interworking function presentation layer. The first layer is an information display layer, and the display content may include picture information, text information, and the like. The second layer is a visual rendering layer, different message types correspond to different message display templates, personalized outline contours are included, and more personalized structured messages are displayed according to the related color extraction of the pictures of the structured messages. The third layer is an interactive operation function presentation layer, different message types correspond to different interactive operation functions, and a user can directly perform various operations on the structured message, for example, the video structured message can be played in a preview mode and a full screen mode; the music structured message can be played, paused and played in a speed-adjusting way; the game type structured message can be directly clicked into the operation page.
Based on the foregoing embodiments, the following describes a message display method using a specific application scenario, taking the message types as a game class, a video class, and a music class as an example, and referring to fig. 15, it is a schematic flow chart of another message display method in the embodiment of the present application.
Step 1500: a new message is obtained.
Step 1501: it is determined whether the new message is a structured message, if so, go to step 1503, otherwise, go to step 1502.
Step 1502: the new message is exposed using the generic class message.
That is, when it is determined that the message is not a structured message, the message can be directly displayed in the display mode of the general-purpose unstructured message.
Step 1503: and judging whether the message is a preset special display message or not, if so, executing the steps 1505, 1512 or 1518 according to different message types, and otherwise, executing the step 1504.
The preset special display message indicates whether the message type is the preset message type needing personalized display processing, and because the message type needs to be preset in shape outline, interactive operation function and the like in the personalized display, if no preset structural message exists, the message can be displayed directly in a universal structural message display mode.
Step 1504: the new message is exposed using the generic class structured message.
Step 1505: determining the new message to be a game-like structured message.
Step 1506: and judging whether the picture is extracted from the game type structured message, if so, executing the step 1508, otherwise, executing the step 1507.
Step 1507: and displaying the new message according to the color of the preset picture and the message display template of the game class.
That is, if the new message is determined to be a game structured message, the message display template of the game is determined, and if no picture is extracted from the game structured message, the color of the default preset picture can be used as the display background color of the display.
Step 1508: and judging whether the display background color is extracted from the game structured message, if so, executing the step 1509, otherwise, returning to the step 1507.
That is, if the display background color is not obtained from the picture extracted from the game-type structured message, the color of the default preset picture may still be used as the display background color, otherwise, the message display template may be rendered based on the display background color obtained from the extracted picture.
Step 1509: and judging whether the game type structured message has related games, if so, executing a step 1511, otherwise, executing a step 1510.
Step 1510: and displaying the new message according to the extracted message display template for displaying the background color and the game class.
Step 1511: and displaying the new message and displaying more related game recommendations according to the extracted message display template for displaying the background color and the game class.
That is, the game-class structured message is presented based on the extracted presentation background color and message presentation template, and more relevant game recommendations can be provided.
Step 1512: and determining the new message as a video structured message.
Step 1513: and judging whether the display background color is extracted from the video structured message, if so, executing a step 1515, otherwise, executing a step 1514.
Step 1514: and displaying the new message according to the preset picture color and the video message display template.
Step 1515: and judging whether the video type structured message has related videos, if so, executing a step 1517, otherwise, executing a step 1516.
Step 1516: and displaying the new message according to the extracted message display template for displaying the background color and the video class.
Step 1517: and displaying the new message and displaying more related video recommendations according to the extracted message display template for displaying the background color and the video class.
Step 1518: determining the new message as a music-like structured message.
Step 1519: and judging whether a picture is extracted from the music structured message, if so, executing step 1521, otherwise, executing step 1520.
Step 1520: and displaying the new message according to the preset color of the picture and the message display template of the music class.
Step 1521: and judging whether the display background color is extracted from the music structured message, if so, executing step 1522, otherwise, returning to the executing step 1520.
Step 1522: and judging whether the music structured message has related music, if so, executing a step 1524, otherwise, executing a step 1523.
Step 1523: and displaying the new message according to the extracted message display template for displaying the background color and the music class.
Step 1524: and displaying the new message and displaying more related music recommendations according to the extracted message display template for displaying the background color and the music class.
Therefore, in the embodiment of the application, for the structured message, the message display template is determined according to the message type of the structured message, the message display template comprises an appearance outline, an interactive operation function and the like, the personalized color scheme is represented by extracting the color of the picture, and a related content recommendation function can be provided, so that the personalized display of the structured message is improved, and the personalized attributes of different message types are enhanced.
Based on the same inventive concept, the embodiment of the present application further provides a message presentation apparatus, which may be, for example, the server in the foregoing embodiment, and the message presentation apparatus may be a hardware structure, a software module, or a hardware structure plus a software module. Based on the foregoing embodiments, referring to fig. 16, a message display apparatus in the embodiment of the present application specifically includes:
a first determining module 1600, configured to obtain a structured message to be displayed, and determine a message type of the structured message to be displayed;
a second determining module 1610, configured to determine a message display template of the structured message to be displayed according to a mapping relationship between each preset message type and the message display template, where the message display template includes at least one feature element that reflects a message type, and each preset field of the structured message has a set display position in the message display template;
a sending module 1620, configured to carry the description data of the message display template in the to-be-displayed structured message, and send the to-be-displayed structured message to an instant messaging client, so that the instant messaging client displays the to-be-displayed structured message according to the description data of the message display template.
Optionally, the feature element is a contour; the outline comprises at least one layer of constituent elements;
when determining the message display template of the structured message to be displayed according to the mapping relationship between each preset message type and the message display template, the second determining module 1610 is specifically configured to:
if the message type of the structural message to be displayed is a game type, determining that a message display template of the structural message to be displayed is in a preset game handle shape;
if the message type of the structural message to be displayed is a video type, determining that a message display template of the structural message to be displayed is in a preset video player shape;
if the message type of the structural message to be displayed is music, determining that the message display template of the structural message to be displayed is a preset record shape, wherein the preset record shape at least comprises two layers of constituent elements and is sequentially a square record box shape and a circular record shape from top to bottom.
Optionally, further comprising:
a third determining module 1630, configured to obtain a picture corresponding to the structured message to be displayed, and determine a display background color of the structured message to be displayed according to the color of the picture;
the description data includes the indication information of the display background color, so that the instant messaging client renders the message display template according to the indication information of the display background color, and displays the structured message to be displayed according to the rendered message display template.
Optionally, when obtaining the picture corresponding to the structured message to be displayed, the third determining module 1630 is specifically configured to:
extracting a picture from the structural message to be displayed, and taking the extracted picture as the picture corresponding to the structural message to be displayed;
and if it is determined that the picture cannot be extracted from the structural message to be displayed, taking a preset picture as the picture corresponding to the structural message to be displayed.
Optionally, when determining the display background color of the to-be-displayed structured message according to the color of the picture, the third determining module 1630 is specifically configured to:
compressing the picture to obtain a compressed mosaic color plate;
sequentially matching the color of each pixel block in the mosaic color plate with a preset color system table to determine a color system which is matched most successfully, wherein the preset color system table comprises a plurality of predefined color systems, the color systems adopt an HSB mode and comprise hue H, saturation S and brightness B, and the main color of each color system is set as the color corresponding to the middle position of the corresponding H value-taking interval;
and determining the dominant color of the color system with the most successful matching, generating a gradient color gamut based on the dominant color, and determining the gradient color gamut as the display background color of the structural message to be displayed.
Optionally, when the gradient color gamut is generated based on the dominant color, the third determining module 1630 is specifically configured to:
respectively reducing the values of H, S and B of the dominant color by correspondingly set first interval values based on the dominant color to obtain a first color;
increasing a second interval value correspondingly set to the H of the main color, and reducing S and B values of the main color by a third interval value correspondingly set to obtain a second color;
and performing gradient processing from the first color to the second color to generate a gradient color gamut.
Optionally, further comprising: a fourth determination module 1640 to:
determining the interactive operation function of the structured message to be displayed according to the mapping relation between the preset message type and the interactive operation function;
integrating the interactive operation function of the structured message to be displayed in the corresponding component element of the outline; or, the function key corresponding to the interactive operation function of the structured message to be displayed is superposed on the corresponding position in the message display template.
Optionally, when the interactive operation function of the structured message to be displayed is determined according to the mapping relationship between each preset message type and the interactive operation function, the fourth determining module 1640 is specifically configured to:
if the message type of the structured message to be displayed is a video type, determining that the interactive operation function of the structured message to be displayed at least comprises a preview playing operation function and a full-screen playing operation function;
and if the message type of the structured message to be displayed is music, determining that the interactive operation function of the structured message to be displayed at least comprises a play or play pause operation function, a play progress adjusting operation function and a lyric display operation function.
Optionally, further comprising: a recommending module 1650 for:
determining the structured message which has the same message type as the structured message to be displayed and has message content similarity larger than a threshold value;
recommending the determined structured message to the instant communication client so that the instant communication client displays the recommended structured message when receiving a preset recommended viewing operation on the displayed structured message to be displayed.
Based on the same inventive concept, the embodiment of the present application further provides a message presentation apparatus, which may be, for example, an instant messaging client in the foregoing embodiment, and the message presentation apparatus may be a hardware structure, a software module, or a hardware structure plus a software module. Based on the foregoing embodiments, referring to fig. 17, a message display apparatus in an embodiment of the present application specifically includes:
a receiving module 1700, configured to receive a structured message to be displayed, sent by a server;
a determining module 1710, configured to determine a message display template of the structured message to be displayed, where the message display template is determined according to a message type, the message display template includes at least one feature element that reflects a message type, and each preset field of the structured message has a set display position in the message display template;
the displaying module 1720 is configured to display the message content of each preset field of the to-be-displayed structured message on the determined message display template.
Optionally, the to-be-displayed structured message at least carries description data of a message display template, and when the message display template of the to-be-displayed structured message is determined, the determining module 1710 is specifically configured to:
acquiring description data of a message display template from the to-be-displayed structured message, wherein the message display template is determined by the server according to the type of the to-be-displayed structured message and the mapping relation between each preset message type and the message display template;
and determining the message display template according to the description data of the message display template.
Optionally, the feature element is a contour; the outline comprises at least one layer of constituent elements; the description data further comprises indication information of displaying background color, and the displaying background color is determined by the server according to the color of the acquired picture of the structured message to be displayed;
then presentation module 1720 is further configured to:
rendering the message display template according to the display background color; or if the outline of the message display template comprises a plurality of layers of constituent elements, rendering the designated layer of constituent elements in the outline according to the display background color.
Optionally, the to-be-displayed structured message at least carries a corresponding interactive operation function; the interactive operation function is determined by the server according to the mapping relation between each preset message type and the interactive operation function, and the interactive operation function is integrated in the corresponding component element of the outline or is superposed on the corresponding position in the message display template as a function key.
Optionally, the operation processing module 1730 is further configured to:
if the message type of the structural message to be displayed is a video type, responding to a click operation of a first preset position in the displayed structural message to be displayed, and previewing and playing the displayed structural message to be displayed; responding to the click operation of a second preset position in the displayed structured message to be displayed, skipping a page, and performing full-screen playing in the skipped page;
if the message type of the structural message to be displayed is music, playing in response to the click operation of a preset playing button in the displayed structural message to be displayed, and presetting a picture field area display progress bar and a preset character field area display lyrics in the displayed structural message to be displayed; and responding to the sliding operation of the component elements integrated with the interactive operation function for adjusting the playing progress in the displayed structured message to be displayed, and adjusting the playing progress.
Optionally, the recommendation display module 1740 is further configured to:
and when responding to preset recommended viewing operation of the displayed structured message to be displayed, displaying the recommended structured message, wherein the recommended structured message is the structured message which is determined by the server and has the same message type as the structured message to be displayed and has the structured message content similarity larger than a threshold value.
The division of the modules in the embodiment of the present application is schematic, and only one logic function division is provided, and in actual implementation, there may be another division manner, and in addition, each function module in the embodiment of the present application may be integrated in one processor, or may exist alone physically, or two or more modules are integrated in one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
For convenience of illustration, the portable multifunction device 1800 including a touch screen is used as an example of the embodiments of the present application, and those skilled in the art will appreciate that the embodiments of the present application are equally applicable to other devices, such as handheld devices, vehicle-mounted devices, wearable devices, computing devices, and various forms of User Equipment (UE), Mobile Stations (MS), terminals (Terminal), Terminal Equipment (Terminal Equipment), and so on.
Fig. 18 illustrates a block diagram of a portable multifunction device 1800 that includes a touch screen according to some embodiments, the device 1800 may include an input unit 1830, a display unit 1840, a gravitational acceleration sensor 1851, a proximity light sensor 1852, an ambient light sensor 1853, a memory 1820, a processor 1890, a radio frequency unit 1810, audio circuitry 1860, a speaker 1861, a microphone 1862, a WiFi (wireless fidelity) module 1870, a bluetooth module 1880, a power supply 1893, an external interface 1897, and so forth.
It will be understood by those skilled in the art that fig. 18 is only an example of a portable multifunctional device, and does not constitute a limitation of the portable multifunctional device, and may include more or less components than those shown, or combine some components, or different components, and an instant messaging client may be installed in the device 1800 to implement the message presentation method in the embodiment of the present application.
The input unit 1830 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the portable multifunction device. In particular, the input unit 1830 may include a touch screen 1831 and other input devices 1832. The touch screen 1831 may collect touch operations by a user (e.g., operations by the user on or near the touch screen using any suitable object such as a finger, a joint, a stylus, etc.) and drive the corresponding connection device according to a preset program. The touch screen can detect the touch action of a user on the touch screen, convert the touch action into a touch signal and send the touch signal to the processor 1890, and can receive and execute a command sent by the processor 1890; the touch signal includes at least contact point coordinate information. The touch screen 1831 may provide an input interface and an output interface between the apparatus 1800 and a user. In addition, the touch screen may be implemented using various types, such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 1830 may include other input devices in addition to the touch screen 1831. In particular, other input devices 1832 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 1840 may be used to display information input by a user or information provided to a user and various menus of the apparatus 1800. In this embodiment, the touch screen 1831 and the display unit 1840 may be integrated into one component to realize input, output, and display functions of the apparatus 1800; in some embodiments, the touch screen 1831 and the display unit 1840 may also be provided as two separate components.
The gravitational acceleration sensor 1851 can detect the magnitude of acceleration in each direction (generally, three axes), and meanwhile, the gravitational acceleration sensor 1851 can also be used to detect the magnitude and direction of gravity when the terminal is stationary, and can be used to identify applications of handset gestures (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration identification related functions (such as pedometer, tapping), and the like.
Device 1800 may also include one or more proximity light sensors 1852 for turning off and disabling the touch screen when the device 1800 is closer to the user (e.g., near the ear when the user is on a phone call) to avoid user malfunction of the touch screen; the device 1800 may also include one or more ambient light sensors 1853 for keeping the touch screen off when the device 1800 is in a user's pocket or other dark area to prevent unnecessary battery power consumption or inadvertent operation of the device 1800 when in a locked state, in some embodiments the proximity light sensor and the ambient light sensor may be integrated into one component or may be provided as two separate components. As for the apparatus 1800, other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor may be further configured, which will not be described herein. Although fig. 18 shows a proximity light sensor and an ambient light sensor, it is understood that they do not belong to the essential constitution of the apparatus 1800 and may be omitted entirely as needed within the scope not changing the essence of the invention.
The memory 1820 may be configured to store instructions and data, and the memory 1820 may include an instruction storage area and a data storage area, where the data storage area may store an association relationship between the joint touch gesture and the application function; the storage instruction area can store an operating system, instructions required by at least one function and the like; the instructions may cause processor 1890 to perform a message presentation method on the instant messaging client side in the embodiments of the present application.
The processor 1890 is the control center for the device 1800, interfaces and circuitry to communicate various portions of the overall handset, and performs various functions and processes data for the device 1800 by executing or performing instructions stored in the memory 1820 and by invoking data stored in the memory 1820 to thereby facilitate overall monitoring of the handset. Alternatively, processor 1890 may include one or more processing units; preferably, the processor 1890 may integrate an application processor, which primarily handles operating systems, user interfaces, application programs, etc., and a modem processor, which primarily handles wireless communications. It is to be appreciated that the modem processor described above may not be integrated within processor 1890. In some embodiments, the processor, memory, and/or the like may be implemented on a single chip, or in some embodiments, they may be implemented separately on separate chips. In this embodiment, the processor 1890 is further configured to call an instruction in the memory to implement a message presentation method on the instant messaging client side in this embodiment.
The radio frequency unit 1810 may be configured to receive and transmit information or receive and transmit signals during a call, and in particular, receive downlink information of a base station and then process the received downlink information to the processor 1890; in addition, the data for designing uplink is transmitted to the base station. Typically, the RF circuitry includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the radio frequency unit 1810 can also communicate with network devices and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
Audio circuitry 1860, speakers 1861, microphone 1862 may provide an audio interface between a user and device 1800. The audio circuit 1860 may transmit the electrical signal converted from the received audio data to the speaker 1861, and convert the electrical signal into an audio signal by the speaker 1861 for output; on the other hand, the microphone 1862 converts the collected sound signals into electrical signals, which are received by the audio circuit 1860 and converted into audio data, which are processed by the audio data output processor 1890 and then passed through the radio frequency unit 1810 for transmission to, for example, another terminal, or output to the memory 1820 for further processing, and the audio circuit may also include a headphone jack 1863 for providing a connection interface between the audio circuit and a headphone.
WiFi belongs to short-distance wireless transmission technology, and the device 1800 can help a user to send and receive e-mails, browse webpages, access streaming media and the like through a WiFi module 1870, and provides wireless broadband Internet access for the user. Although fig. 18 shows a WiFi module 1870, it is understood that it does not belong to the essential constitution of the device 1800 and can be omitted entirely as needed within the scope not changing the essence of the invention.
Bluetooth is a short-range wireless communication technology. By using the bluetooth technology, the communication between mobile communication terminal devices such as a palm computer, a notebook computer, and a mobile phone can be effectively simplified, and the communication between the above devices and the Internet (Internet) can also be successfully simplified, so that the device 1800 enables the data transmission between the device 1800 and the Internet to be more rapid and efficient through the bluetooth module 1880, thereby widening the way for wireless communication. Bluetooth technology is an open solution that enables wireless transmission of voice and data. Fig. 18, however, shows a WiFi module 1870, but it will be understood that it does not constitute a necessary component of the apparatus 1800 and may be omitted entirely as needed within the scope not altering the essence of the invention.
The apparatus 1800 also includes a power supply 1893 (e.g., a battery) that provides power to the various components, and preferably is logically coupled to the processor 1890 through a power management system 1894, thereby providing management of charging, discharging, and power consumption through the power management system 1894.
The device 1800 also includes an external interface 1897, which may be a standard Micro USB interface, or a multi-pin connector, which may be used to connect the device 1800 for communication with other devices, or to connect a charger for charging the device 1800.
Although not shown, the device 1800 may also include a camera, a flash, etc., which will not be described in detail herein.
Based on the foregoing embodiments, in the embodiments of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program, when executed by a processor, implements the message presentation method in any of the above method embodiments.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to encompass such modifications and variations.

Claims (15)

1. A method for message presentation, comprising:
acquiring a structured message to be displayed, and determining the message type of the structured message to be displayed;
determining a message display template of the structured message to be displayed according to the mapping relation between each preset message type and the message display template, wherein the message display template comprises at least one outline reflecting the message type, the outline at least comprises a component element with an interactive operation function or a function key superposed with the interactive operation function, and each preset field of the structured message has a set display position in the message display template;
and carrying the description data of the message display template in the structured message to be displayed, and sending the description data to an instant messaging client, so that the instant messaging client displays the structured message to be displayed according to the description data of the message display template.
2. The method according to claim 1, wherein the determining the message display template of the structured message to be displayed according to the mapping relationship between each preset message type and the message display template specifically comprises:
if the message type of the structural message to be displayed is a game type, determining that a message display template of the structural message to be displayed is in a preset game handle shape;
if the message type of the structural message to be displayed is a video type, determining that a message display template of the structural message to be displayed is in a preset video player shape;
if the message type of the structural message to be displayed is music, determining that the message display template of the structural message to be displayed is a preset record shape, wherein the preset record shape at least comprises two layers of constituent elements and is sequentially a square record box shape and a circular record shape from top to bottom.
3. The method of claim 1 or 2, further comprising:
acquiring a picture corresponding to the structured message to be displayed, and determining the display background color of the structured message to be displayed according to the color of the picture;
the description data includes the indication information of the display background color, so that the instant messaging client renders the message display template according to the indication information of the display background color, and displays the structured message to be displayed according to the rendered message display template.
4. The method according to claim 3, wherein obtaining the picture corresponding to the structured message to be displayed specifically comprises:
extracting pictures from the structural message to be displayed, and taking the extracted pictures as the pictures corresponding to the structural message to be displayed;
and if it is determined that the picture cannot be extracted from the structural message to be displayed, taking a preset picture as the picture corresponding to the structural message to be displayed.
5. The method according to claim 3, wherein determining the display background color of the structured message to be displayed according to the color of the picture specifically comprises:
compressing the picture to obtain a compressed mosaic color plate;
sequentially matching the color of each pixel block in the mosaic color plate with a preset color system table to determine a color system which is matched most successfully, wherein the preset color system table comprises a plurality of predefined color systems, the color systems adopt an HSB mode and comprise hue H, saturation S and brightness B, and the main color of each color system is set as the color corresponding to the middle position of the corresponding H value-taking interval;
and determining the dominant color of the color system with the most successful matching, generating a gradient color gamut based on the dominant color, and determining the gradient color gamut as the display background color of the structural message to be displayed.
6. The method according to claim 5, wherein generating a gradient color gamut based on the dominant color comprises:
respectively reducing the values of H, S and B of the dominant color by correspondingly set first interval values based on the dominant color to obtain a first color;
increasing a second interval value correspondingly set to the H of the main color, and reducing S and B values of the main color by a third interval value correspondingly set to obtain a second color;
and performing gradient processing from the first color to the second color to generate a gradient color gamut.
7. The method of claim 2, further comprising:
determining the interactive operation function of the structured message to be displayed according to the mapping relation between the preset message type and the interactive operation function;
integrating the interactive operation function of the structured message to be displayed in the corresponding component element of the outline; or
And superposing the function key corresponding to the interactive operation function of the structured message to be displayed on the corresponding position in the message display template.
8. The method according to claim 7, wherein determining the interoperation function of the to-be-presented structured message according to each preset mapping relationship between the message type and the interoperation function specifically comprises:
if the message type of the structured message to be displayed is a video type, determining that the interactive operation function of the structured message to be displayed at least comprises a preview playing operation function and a full-screen playing operation function;
and if the message type of the structured message to be displayed is music, determining that the interactive operation function of the structured message to be displayed at least comprises a play or play pause operation function, a play progress adjusting operation function and a lyric display operation function.
9. The method of claim 1, further comprising:
determining the structured message which has the same message type as the structured message to be displayed and has message content similarity larger than a threshold value;
recommending the determined structured message to the instant communication client so that the instant communication client displays the recommended structured message when receiving a preset recommended viewing operation on the displayed structured message to be displayed.
10. A method for message presentation, comprising:
receiving a structured message to be displayed sent by a server;
determining a message display template of the structured message to be displayed, wherein the message display template is determined according to the message type, the message display template comprises at least one outline reflecting the message type, the outline at least comprises a component element with an interactive operation function or a function key superposed with the interactive operation function, and each preset field of the structured message has a set display position in the message display template;
and displaying the message content of each preset field of the structured message to be displayed on the determined message display template.
11. The method according to claim 10, wherein the structural message to be displayed at least carries description data of a message display template, and the determining the message display template of the structural message to be displayed specifically includes:
acquiring description data of a message display template from the to-be-displayed structured message, wherein the message display template is determined by the server according to the type of the to-be-displayed structured message and the mapping relation between each preset message type and the message display template;
and determining the message display template according to the description data of the message display template.
12. The method according to claim 11, wherein the description data further includes indication information of a display background color, and the display background color is determined by the server according to the color of the acquired picture of the structured message to be displayed;
further comprising:
rendering the message display template according to the display background color; or the like, or, alternatively,
if the outline of the message display template comprises a plurality of layers of constituent elements, rendering the designated layer of constituent elements in the outline according to the display background color.
13. The method according to any of claims 10-12, wherein at least the corresponding interoperation function is carried in the structured message to be presented; the interactive operation function is determined by the server according to the mapping relation between each preset message type and the interactive operation function, and the interactive operation function is integrated in the corresponding component element of the outline or is superposed on the corresponding position in the message display template as a function key.
14. The method of claim 13, further comprising:
if the message type of the structural message to be displayed is a video type, responding to a click operation of a first preset position in the displayed structural message to be displayed, and previewing and playing the displayed structural message to be displayed; responding to the click operation of a second preset position in the displayed structured message to be displayed, skipping a page, and performing full-screen playing in the skipped page;
if the message type of the structural message to be displayed is music, playing in response to the click operation of a preset playing button in the displayed structural message to be displayed, and presetting a picture field area display progress bar and a preset character field area display lyrics in the displayed structural message to be displayed; and responding to the sliding operation of the component elements integrated with the interactive operation function for adjusting the playing progress in the displayed structured message to be displayed, and adjusting the playing progress.
15. The method of claim 13, further comprising:
and when responding to preset recommended viewing operation of the displayed structured message to be displayed, displaying the recommended structured message, wherein the recommended structured message is the structured message which is determined by the server and has the same message type as the structured message to be displayed and has the structured message content similarity larger than a threshold value.
CN201910936124.3A 2019-09-29 2019-09-29 Message display method Active CN112583695B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910936124.3A CN112583695B (en) 2019-09-29 2019-09-29 Message display method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910936124.3A CN112583695B (en) 2019-09-29 2019-09-29 Message display method

Publications (2)

Publication Number Publication Date
CN112583695A CN112583695A (en) 2021-03-30
CN112583695B true CN112583695B (en) 2022-05-10

Family

ID=75111259

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910936124.3A Active CN112583695B (en) 2019-09-29 2019-09-29 Message display method

Country Status (1)

Country Link
CN (1) CN112583695B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115443448A (en) * 2022-08-03 2022-12-06 广州酷狗计算机科技有限公司 Information display method, device, equipment, storage medium and program product
CN115442325B (en) * 2022-08-23 2024-09-20 北京达佳互联信息技术有限公司 Message processing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105094549A (en) * 2015-07-20 2015-11-25 小米科技有限责任公司 Method and device for displaying messages
CN107357481A (en) * 2016-05-10 2017-11-17 腾讯科技(深圳)有限公司 Message display method and message display device
CN109359179A (en) * 2018-09-18 2019-02-19 广州神马移动信息科技有限公司 Message treatment method, device, terminal device and computer storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150033141A1 (en) * 2013-07-24 2015-01-29 Yahoo! Inc. System and method for providing an interactive message inbox

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105094549A (en) * 2015-07-20 2015-11-25 小米科技有限责任公司 Method and device for displaying messages
CN107357481A (en) * 2016-05-10 2017-11-17 腾讯科技(深圳)有限公司 Message display method and message display device
CN109359179A (en) * 2018-09-18 2019-02-19 广州神马移动信息科技有限公司 Message treatment method, device, terminal device and computer storage medium

Also Published As

Publication number Publication date
CN112583695A (en) 2021-03-30

Similar Documents

Publication Publication Date Title
WO2018103525A1 (en) Method and device for tracking facial key point, and storage medium
CN104967801B (en) A kind of video data handling procedure and device
CN107657045B (en) Information collection method, mobile terminal and computer readable storage medium
CN107402709A (en) A kind of multi-screen display method, terminal and computer-readable recording medium
WO2019120192A1 (en) Method for editing text, and mobile device
WO2017084452A1 (en) Method and apparatus for processing tag page in graphical interface
CN112312144B (en) Live broadcast method, device, equipment and storage medium
CN109857297B (en) Information processing method and terminal equipment
CN110795007A (en) Method and device for acquiring screenshot information
CN110602565A (en) Image processing method and electronic equipment
CN108646960B (en) File processing method and flexible screen terminal
CN112148404B (en) Head portrait generation method, device, equipment and storage medium
CN112004156A (en) Video playing method, related device and storage medium
CN112954046A (en) Information sending method, information sending device and electronic equipment
US20220182558A1 (en) Subtitle presentation based on volume control
WO2019076377A1 (en) Image viewing method and mobile terminal
CN112583695B (en) Message display method
CN108228033A (en) A kind of message display method and mobile terminal
CN110555171A (en) Information processing method, device, storage medium and system
CN109976629A (en) Image display method, terminal and mobile terminal
CN110795002A (en) Screenshot method and terminal equipment
CN108121486A (en) A kind of image display method and mobile terminal
CN111966436A (en) Screen display control method and device, terminal equipment and storage medium
CN110580486A (en) Data processing method and device, electronic equipment and readable medium
CN113609358B (en) Content sharing method, device, electronic equipment and storage medium

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40040469

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant