CN112087546B - Message display method and device, electronic equipment and readable storage medium - Google Patents

Message display method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN112087546B
CN112087546B CN202010956589.8A CN202010956589A CN112087546B CN 112087546 B CN112087546 B CN 112087546B CN 202010956589 A CN202010956589 A CN 202010956589A CN 112087546 B CN112087546 B CN 112087546B
Authority
CN
China
Prior art keywords
message
character
characters
target
candidate 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
CN202010956589.8A
Other languages
Chinese (zh)
Other versions
CN112087546A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202010956589.8A priority Critical patent/CN112087546B/en
Publication of CN112087546A publication Critical patent/CN112087546A/en
Application granted granted Critical
Publication of CN112087546B publication Critical patent/CN112087546B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • 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/04Real-time or near real-time messaging, e.g. instant messaging [IM]

Abstract

The application discloses a message display method and electronic equipment, and belongs to the technical field of communication. The method comprises the following steps: when the electronic equipment receives a message, acquiring at least one candidate display area in a target page displayed by the electronic equipment, wherein the candidate display area is an area outside a display area of a main object in the target page; displaying the message in a target area, wherein the target area comprises at least one of the candidate display areas. Therefore, the scheme of the application can reduce the occlusion of the message on the important picture on the target page to a certain extent.

Description

Message display method and device, electronic equipment and readable storage medium
Technical Field
The application belongs to the technical field of communication, and particularly relates to a message display method and electronic equipment.
Background
With the continuous progress of science and technology, more and more application operations can be realized by terminals such as mobile phones and tablet computers. For example, the application operation that the user can perform with the mobile phone may be playing a game, listening to music, watching a video, and the like. At present, when a user performs application operation on a terminal, the terminal often enters a full-screen state, so that a game interface or video content occupies the whole screen. But other applications are running in the background and will continue to keep the function of pushing messages, for example, when a contact of the instant messaging application sends a message, the message sent by the contact is displayed on the screen in the landscape state.
In the process of implementing the application, the inventor finds that when a game and a video enter a full-screen state, a rectangular dialog box (as shown in fig. 1) pops up above a transverse screen of a mobile phone to display a message sent by a contact person, and the message sent by the contact person is contained in the rectangular dialog box. However, at this time, the user is playing games in full concentration, or concentrating on watching the mobile phone screen to watch videos, a sudden message occupies a certain space of the screen, which may possibly block important pictures in the games or videos, so that the user cannot read all information on the pictures in the games, which results in failure to exert the real strength of the user, or omit some important pictures or details when watching the videos, thereby reducing the experience of the user when using the mobile phone in full screen.
Therefore, the display mode of the message in the prior art may block important pictures in the screen.
Disclosure of Invention
An object of the embodiments of the present application is to provide a message display method and an electronic device, which can solve a problem that an important picture in a screen may be blocked by a message display manner in the prior art to a certain extent.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides a message display method, where the method includes:
when the electronic equipment receives a message, acquiring at least one candidate display area in a target page displayed by the electronic equipment, wherein the candidate display area is an area outside a display area of a main object in the target page;
displaying the message in a target area, wherein the target area comprises at least one of the candidate display areas.
In a second aspect, an embodiment of the present application provides a message display apparatus, including:
the device comprises an area acquisition module, a display module and a display module, wherein the area acquisition module is used for acquiring at least one candidate display area in a target page displayed by the electronic equipment when the electronic equipment receives a message, and the candidate display area is an area outside a display area of a main object in the target page;
a message display module for displaying the message in a target area, wherein the target area includes at least one of the candidate display areas.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or an instruction stored on the memory and executable on the processor, and when the program or the instruction is executed by the processor, the steps of the message display method according to the first aspect are implemented.
In a fourth aspect, the present embodiments provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the message display method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the message display method according to the first aspect.
In a sixth aspect, the present application provides a computer program product stored in a non-volatile storage medium, the program product being configured to be executed by at least one processor to implement the steps of the message display method according to the first aspect.
In a seventh aspect, an embodiment of the present invention further provides a message display apparatus, where the apparatus is configured to execute the steps of the message display method according to the first aspect.
In the embodiment of the application, when the electronic device receives a message, at least one candidate display area in a target page displayed by the electronic device can be acquired, so that the message is displayed in at least one candidate display area in the candidate display areas existing in the target page, wherein the candidate display area is an area outside a display area of a main object in the target page, and the main object in one page often belongs to an important picture in the page. Therefore, the embodiment of the application can display the message in the region outside the display region of the important picture in the target page, and the message can be displayed by being divided into a plurality of regions, so that the blocking of the message on the important picture on the target page can be reduced to a certain extent.
Drawings
FIG. 1 is a schematic illustration of a prior art display of a message;
FIG. 2 is a flow chart of a message display method in an embodiment of the present application;
FIG. 3 is a schematic diagram of a message display in an embodiment of the present application;
FIG. 4 is a second illustration of the display of messages in an embodiment of the present application;
FIG. 5 is a third schematic diagram illustrating the display of messages in the embodiment of the present application;
fig. 6 is a block diagram showing the structure of a message display device in the embodiment of the present application;
FIG. 7 shows one of the block diagrams of an electronic device provided by an embodiment of the application;
fig. 8 shows a second block diagram of an electronic device according to an 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 some, but not all, embodiments of the present application. 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.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The message display method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
Referring to fig. 2, an embodiment of the present application provides a message display method, which may include the following steps:
step 201: when the electronic equipment receives the message, at least one candidate display area in a target page displayed by the electronic equipment is obtained.
Wherein the candidate display area is an area outside a display area of a subject object in the target page. The candidate display area is an area for displaying a message. The subject object in the target page includes at least one object, that is, one or more subject objects in one page may be provided.
In addition, the message may be a push message of an application program, or may be an instant messaging message. The target page is a page displayed when the electronic equipment receives the message.
In addition, the process of acquiring at least one candidate display area in the target page displayed by the electronic device may include:
determining at least one display area in the predetermined target page as a candidate display area;
or
Acquiring a region except a display region of a main body object in a target page to serve as a region to be processed;
and dividing at least one candidate display area from the area to be processed.
It can be seen that the candidate display areas may be predetermined, or may be divided according to the page content of the page displayed at that time when the message is received.
Step 202: displaying the message in a target area.
Wherein the target area comprises at least one of the candidate display areas.
As seen in step 202, the message may be displayed in at least one of the candidate display areas present in the target page. E.g., 4 candidate display areas exist in the destination page, the message may be displayed in 1, 2, 3, or 4 candidate display areas.
In addition, one candidate display area may be regarded as one message box, and then one message may be displayed in a plurality of message boxes in the embodiment of the application, and the plurality of message boxes are in an area outside the display area of the main object of the target page, so that the display of the main object is not obstructed.
As can be seen from the above, in the message display method in the embodiment of the present application, when the electronic device receives a message, at least one candidate display area in a target page displayed by the electronic device can be acquired, so that the message is displayed in at least one candidate display area in the candidate display areas existing in the target page, where the candidate display area is located in an area outside a display area of a main object in the target page. Therefore, the message pair display method in the embodiment of the application can display the message in the region outside the display region of the main object in the target page, and can display the message by dividing the message into a plurality of regions, so that the blocking of the message on the important picture on the target page can be reduced to a certain extent.
In particular, when a message is received during the full screen display of the electronic device, the message is often displayed in a rectangular frame above the horizontal screen in the prior art, as shown in fig. 1. This display may block important frames in the full screen interface.
In this embodiment of the present application, when the target page is a full-screen display page, the main object on the page occupies more display areas, but in this embodiment of the present application, at least one candidate display area may be set in an area outside the display area of the main object in the full-screen display page, and a message is displayed in the at least one candidate display area (as shown in fig. 3). Therefore, compared with the prior art, the embodiment of the application can disperse messages for display, so that the messages are not limited to be displayed in one message frame, the display area of a single message frame can be prevented from extending to the display area of an important picture in the page to a certain extent, and the problem that the message blocks the important picture in the current display page of the electronic equipment when the message is displayed in a full screen mode is solved to a certain extent.
Optionally, the step of displaying the message in the target area includes:
when the number of the candidate display areas is larger than or equal to 2, splitting the message into M sub-messages according to the area of each candidate display area in the target page, wherein M is smaller than or equal to N, N represents the number of the candidate display areas in the target page, and M and N are both positive integers;
and displaying the ith sub-message in the ith candidate display area in the target page, wherein M is more than or equal to i and more than or equal to 1, and i is an integer.
Therefore, in the embodiment of the application, the message can be split according to the area of the candidate display area existing in the target page, so that one sub-message obtained by splitting is displayed in one candidate display area. For example, if a message is split into 3 sub-messages, a first sub-message may be displayed in a first candidate display area, a second sub-message may be displayed in a second candidate display area, and a third sub-message may be displayed in a third candidate display area.
It should be noted that, if the number M of the sub-messages is smaller than the number N of the candidate display areas existing in the target page, when displaying the messages, only M of the N candidate display areas may be used, and the remaining candidate display areas are not displayed.
Of course, it is also possible to omit non-core content in the message by semantic recognition, extract the core content, split the core content of the message to obtain M sub-messages, and finally display through at least part of the N candidate display regions.
As can be seen from the above, in the embodiment of the present application, the message may also be split according to the areas of the candidate display regions, so that each candidate display region may accommodate the sub-message corresponding to the candidate display region.
Specifically, according to the area of each candidate display region in the target page, the message is split into M sub-messages, and one of the following first, second, and third modes may be adopted.
The first method is as follows: optionally, the step of splitting the message into M sub-messages according to the area of each candidate display region in the target page includes:
determining a first candidate display area with the smallest area in the candidate display areas in the target page;
determining a first character number of the first candidate display area in a preset display mode according to the area of the first candidate display area, wherein the first character number is the maximum character accommodating number of the first candidate display area displayed in the preset display mode;
and splitting the message into M sub-messages according to the first character number.
As can be seen from the above, in the embodiment of the present application, the message may be split based on the number of characters that can be accommodated in the candidate display area with the smallest area among the candidate display areas in the target page. The splitting method has a simpler splitting process.
Further, the step of splitting the message into M sub-messages according to the first number of characters includes:
under the condition that the sum of the N first character numbers is less than or equal to the number of characters contained in the message, determining each adjacent character with the first character number in the message as a sub-message until N sub-messages are obtained;
in this case, it is also possible to extract the core content by omitting the non-core content in the message through semantic recognition. At this time, the number of characters of the core content of the message is less than or equal to the sum of the N first numbers of characters. And finally, the core content of the message is split to obtain M sub-messages, and the core content is displayed through at least partial areas of the N candidate display areas.
And under the condition that the sum of the N first character numbers is greater than the number of characters contained in the message, determining each adjacent character with the first character number in first target characters as a sub-message to obtain K-1 sub-messages, and taking the characters except the first target character in the message as a Kth sub-message, wherein the first target character comprises K-1 characters of the sum of the first character numbers in the message, and K is the quotient of the number of the characters contained in the message and the first character number.
For example, 4 candidate display regions exist in the target page, where when the preset display mode is adopted, the number of characters that can be accommodated in each candidate display region is 10, 20, 10, and 30, and then the candidate display region with the smallest area may accommodate 10 characters.
In the case that the message includes 25 characters, every 10 adjacent characters in the message may be determined as one sub-message, and then 2 sub-messages including 10 characters may be obtained, at this time, 5 characters remain in the message, and then these 5 characters may be determined as one sub-message. That is, 3 sub-messages are finally obtained, so that the 3 sub-messages are respectively displayed in different candidate display areas 301, as shown in fig. 3. In which an "X" in fig. 3 represents a character.
In the case where 45 characters are included in the message, every adjacent 10 characters in the message may be determined as one sub-message until 4 sub-messages are obtained. At this time, 5 characters remain in the message, and these 5 characters are not displayed.
The second method comprises the following steps: optionally, the step of splitting the message into M sub-messages according to the area of each candidate display region in the target page includes:
determining a second character number of characters which can be contained in each candidate display area in the target page in a preset display mode according to the area of each candidate display area in the target page, and storing the second character number in a target data set;
acquiring the display priority of the candidate display area in the target page;
sorting the second character number in the target data set according to the display priority to obtain a first sequence;
traversing the second number of characters according to the first sequence;
under the condition that the jth second character number is met and the number of second target characters is larger than the jth second character number, taking the jth second character number characters in the second target characters as jth sub-messages, wherein the second target characters comprise characters except the characters with the third character number before in the messages, the third character number is the sum of the first (j-1) second character numbers in the first sequence, N is not less than j and not more than 1, and j is an integer;
taking the second target character as a j-th sub-message under the condition that the j-th number of the second characters is met and the number of the second target characters is less than or equal to the j-th number of the second characters;
until all characters in the message are split into a plurality of sub-messages, or until the N second characters in the first sequence are traversed.
It should be noted that, in the above, "regarding the jth character in the second target characters in the number of the second characters as the jth sub-message", that is, according to the left-to-right arrangement order of the second target characters, regarding the jth character in the number of the second target characters before the jth character as the jth sub-message.
For example, there are 4 candidate display areas in the target page, where the second number of characters that each candidate display area can accommodate is 10, 20, 10, and 30 when the preset display mode is adopted, that is, the total number of characters that these 4 candidate display areas can accommodate when the preset display mode is adopted is 70. If the number of the second characters is sorted according to the display priority of the 4 candidate display areas, and the obtained first sequence is 10, 20, 10, or 30, the number of the second characters in the first sequence is traversed, and the process of splitting the message is as follows:
in the case that 80 characters are included in the message, first, the first 10 characters in the message are determined as a sub-message, and the remaining 70 characters in the message at this time are greater than the second 2-th character number (i.e., 20), so that the first 20 characters in the remaining 70 characters in the message at this time are determined as a sub-message; after obtaining two sub-messages, remaining 50 characters in the message, which are larger than the number (namely 10) of the 3 rd second character, so that the first 10 characters in the remaining 50 characters in the message at the moment are determined as a sub-message; after obtaining 3 sub-messages, the remaining 40 characters in the message are larger than the 4 th second character (namely 30), so that the first 30 characters in the remaining 40 characters in the message at the moment are determined as a sub-message; after obtaining 4 sub-messages, the traversal of the second number of characters in the first ordering is completed, and at this time, 10 characters remain in the message, only the obtained 4 sub-messages are displayed in different candidate display areas 301, and the remaining 10 characters in the message are not displayed, as shown in fig. 4. In fig. 4, an "X" represents a character.
In the case that 25 characters are included in the message, the first 10 characters in the message are first determined as a sub-message, and the remaining 15 characters in the message at this time are smaller than the second 2-th character number (i.e., 20), so that the remaining 15 characters in the message at this time are determined as a sub-message, and then all the characters in the message are split into sub-messages. That is, two sub-messages are finally obtained, so that the two sub-messages are respectively displayed in different candidate display areas.
As can be seen from the above, in the embodiment of the present application, the message may be split according to the number of characters that can be actually accommodated in each candidate display area in the target page, so that the area occupied by each candidate display area may be fully utilized.
The third method comprises the following steps: optionally, the step of splitting the message into M sub-messages according to the area of each candidate display region in the target page includes:
determining a second character number of characters which can be contained in each candidate display area in the target page in a preset display mode according to the area of each candidate display area in the target page, and storing the second character number in a target data set;
acquiring the display priority of the candidate display area in the target page;
sorting the second character number in the target data set according to the display priority to obtain a first sequence;
traversing the second number of characters according to the first sequence;
when the jth second character number is encountered, and the number of second target characters is larger than the jth second character number, and the third target character comprises a preset type character, the indication character and the character which is positioned before the indication character in the third target character are used as the j-th sub-message, wherein j is an integer from 1 to N, the second target character comprises characters of the message excluding the first third character, said third number of characters being the sum of the first (j-1) of said second numbers of characters in said first sequence, the third target character includes the first jth character of the second target character by the second character number, the indication character is the character of the preset type which is closest to the last character in the third target characters;
taking the third target character as a j-th sub-message under the condition that the j-th number of the second characters is met, the number of the second target characters is larger than the j-th number of the second characters, and the third target character does not comprise the characters of the preset type;
taking the second target character as a j-th sub-message under the condition that the j-th number of the second characters is met and the number of the second target characters is less than or equal to the j-th number of the second characters;
until all characters in the message are split into sub-messages, or until the second number of characters in the first sequence is traversed.
It should be noted that, the above "the third target character includes the first jth character in the second target character, that is, the third target character includes the first jth character in the second target character from left to right in the arrangement order.
In addition, the preset type of character is an indication character of a sentence break, and may be a punctuation mark, for example.
For example, there are 4 candidate display areas in the target page, where the second number of characters that each candidate display area can accommodate is 10, 20, 10, and 30 when the preset display mode is adopted, that is, the total number of characters that these 4 candidate display areas can accommodate when the preset display mode is adopted is 70. If the number of the second characters is sorted according to the display priority of the 4 candidate display areas, and the obtained first sequence is 10, 20, 10, or 30, the number of the second characters in the first sequence is traversed, and the process of splitting the message is as follows:
under the condition that the message comprises 80 characters, firstly, obtaining the first 10 characters in the message, then judging whether the 10 characters comprise punctuation marks or not, and if so, taking the punctuation mark closest to the last character and the characters before the punctuation mark in the 10 characters as a first sub-message; for example, if the first sub-message includes 8 characters, the message still has the remaining 72 characters, which are greater than the second character (i.e. 20), so as to obtain the first 20 characters of the 72 characters again, then determine whether the 20 characters include punctuation marks, and if not, regard the 20 characters as the second sub-message; obtaining a second sub-message, wherein 52 characters are left in the message and are greater than the third second character (namely 10), so as to obtain the first 10 characters in the 52 characters again, then judging whether the 10 characters comprise punctuation marks or not, and if so, taking the punctuation marks closest to the last character and the characters before the punctuation marks in the 10 characters as a third sub-message; for example, if the third sub-message includes 8 characters, the message still has the remaining 44 characters, which are greater than the second character (i.e. 30), so as to obtain the first 30 characters of the 44 characters again, then determine whether the 30 characters include punctuation marks, and if not, regard the 30 characters as the fourth sub-message. After obtaining 4 sub-messages, the traversal of the second number of characters in the first ordering is completed, and at this time, 14 characters remain in the message, only the obtained 4 sub-messages are displayed in different candidate display areas 301, and the remaining 14 characters in the message are not displayed, as shown in fig. 5. In fig. 5, an "X" represents a character.
Under the condition that the message comprises 25 characters, firstly, obtaining the first 10 characters in the message, then judging whether the 10 characters comprise punctuation marks or not, and if so, taking the characters before the punctuation marks closest to the last character in the 10 characters as a first sub-message; wherein for example, if the first sub-message includes 8 characters, 17 characters remain in the message, which is smaller than the second character number (i.e. 20), so that if these 17 characters are used as the second sub-message, all the characters in the message are split into sub-messages. That is, two sub-messages are finally obtained, so that the two sub-messages are respectively displayed in different candidate display areas.
According to the sentence-breaking rule, when the message is split, ideally, one candidate display area displays a small sentence of the message, but not the whole sentence is split into two candidate display areas from the middle, otherwise, the readability of the content is affected. However, when there are many sentence-break positions in the message, many candidate display areas are required, and some candidate display areas are vacant to a large extent, which wastes space. Moreover, a small sentence of a message is displayed in one candidate display area, and a situation that all candidate display areas in a target page cannot accommodate a certain sub-message may occur, so that splitting the message is unreasonable only according to a sentence-breaking rule.
In the embodiment of the application, the number of characters which can be actually accommodated in each candidate display area in the target page is combined with the sentence-breaking rule to split the message. When the message comprises more characters, if the message cannot be sentence-break in the first candidate display area, filling the first candidate display area, and if the message can be sentence-break in the first candidate display area, sentence-break can be performed; then, the remaining characters are divided into the second and third display areas waiting for selection. If the remaining characters can be used for sentence breaking in the second candidate display area, sentence breaking is needed, and the remaining contents are divided into a third candidate display area; if the remaining characters cannot be punctuated in the second candidate display area, the second candidate display area is still filled up, and then the remaining characters are divided into a third candidate display area.
As can be seen from the above, in the embodiment of the present application, the message can be split according to the number of characters that can be actually accommodated in each candidate display area in the target page and the sentence break rule, so that the sentence break rule can be followed while the area occupied by each candidate display area is fully utilized, and a user can conveniently read the message.
According to the first mode, the second mode and the third mode, how many candidate display areas the message is finally displayed depends on the number of available spatial positions of the target page, the area occupied by the candidate display areas at each spatial position and the number of characters included in the message. When the message includes more characters, the N candidate display regions may be sequentially filled, and when the message includes less characters, only the first M candidate display regions are displayed.
Taking a game interface as an example, a first area and a second area exist on the game interface, wherein the first area displays the settings of sound and a microphone, and the second area displays a character list in the game, the display contents of the first area and the second area are not very important, so that the first area and the second area can be used as candidate display areas for displaying messages. Wherein, when the message includes more characters, the message can be displayed by using the first area and the second area; and when the message includes less characters, the message may be displayed using only one of the first area and the second area.
In addition, the number of characters that can be accommodated in each candidate display area is influenced by three factors:
first, the size of the candidate display area, which depends on the size of the space provided by the target page without affecting the user's visual experience;
a second point, a pre-display manner, specifically, for example, a font size;
third, message sentence break.
Taking a movie picture as an example, because a movie shot usually places characters near the center of the picture, the viewing angle at the corners is not very important. One candidate display area may be set in the upper left and upper right corners, respectively, when viewed full screen on the electronic device. When each sentence in the message is long and the sentence in the first candidate display area cannot be broken, the first candidate display area can be filled with the first candidate display area, and the remaining characters are filled in the second candidate display area.
In addition, it should be noted that the preset display manner may include a font format (e.g., a font size, a font type (e.g., song body, regular body, and black body)), a font color, a window display type when the candidate display area is displayed as a window, and a background image of the candidate display area.
Optionally, the step of obtaining the display priority of the candidate display area in the target page includes:
determining the display priority of the candidate display area in the target page according to the distance between the candidate display area and the main object;
or
And determining the display priority of the candidate display area in the target page according to the display position of the candidate display area in the target page.
Therefore, in the embodiment of the application, the display priority of the candidate display area in the target page may be determined according to the distance between the candidate display area and the main object, for example, the closer the candidate display area is to the main object, the higher the display priority of the candidate display area is. Wherein the candidate display area is generally in a regular shape (e.g., a rectangle), the distance from the candidate display area to the subject object may be the distance from the center of the candidate display area to the preset position of the subject object.
The display priority of the candidate display area in the target page may also be determined according to the display position of the candidate display area in the target page, for example, the display priority of the candidate display area is gradually decreased according to the left-to-right sequence of the display position of the candidate display area in the target page.
It should be noted here that the display priority of the candidate display area is higher or lower, which indicates the front-back order of the positions of the characters included in the sub-message displayed in the candidate display area in the message, i.e. the higher the priority of the candidate display area is, the more front the positions of the characters included in the sub-message to be displayed are in the message.
Optionally, the method further includes:
receiving a fourth input;
modifying a font format of characters in the candidate display area in response to the fourth input.
Therefore, in the embodiment of the application, the user can also set the display format of the message by himself. For example, older people may set the font slightly larger and younger people may set the font slightly smaller, thereby enabling the display of messages according to the needs of different users.
Optionally, the step of displaying the message in the target area includes:
selecting a target number of candidate display areas from the candidate display areas in the target page as the target area;
and scrolling and displaying the message in the target area.
The candidate display regions of the target number before selection may be selected in the order from the highest display priority of the candidate display regions to the lowest display priority of the candidate display regions, or the candidate display regions of the target number may be randomly selected.
E.g., 4 candidate display areas in the target page, two of the candidate display areas may be selected for scrolling the message.
Therefore, in the embodiment of the application, the message can also be displayed in a scrolling manner in at least one candidate display area, so that when the message comprises too many characters, the user can view the content of the whole message in the candidate display area.
In addition, as to the specific way of displaying the message in the target area, the method is not limited to the above-mentioned way, and a quotient of the number of characters included in the message and N may be directly calculated, and the quotient is taken as a reference number of characters that each candidate display area needs to display, and then every adjacent character with the reference number in the message is taken as a sub-message until N sub-messages are obtained, so that the ith sub-message is displayed in the ith candidate display area, and N is the number of candidate display areas in the target page.
When the ith candidate display area is displayed in a preset display mode, if the maximum number Q of the contained characters is smaller than the reference number, the candidate display area only displays the first Q characters in the ith sub-message.
Optionally, the method further includes:
receiving a first input;
displaying a setting interface of the candidate display area in response to the first input, wherein a boundary of the candidate display area in the target page is displayed in the setting interface;
receiving a second input in the setting interface;
in response to the second input, modifying a target parameter of the candidate display regions displayed in the setting interface, the target parameter including at least one of a number of the candidate display regions, an area of each of the candidate display regions, a location of each of the candidate display regions, and a display priority of each of the candidate display regions.
The first input may be an operation of a physical key or a combined physical key on the electronic device, an operation of a preset shape drawn on a touch screen of the electronic device, or a click operation of a preset icon displayed in a desktop of the electronic device.
From the above, the user can also modify the number of candidate display regions for displaying the message, the area, the position, and the display priority of each candidate display region, so that the display of the message can meet the requirements of different users. For example, the user may drag the boundary of the candidate display region to change the location and area of the candidate display region.
To sum up, according to the embodiment of the application, the candidate display areas can be placed at a certain position on the screen, the size and the number of the candidate display areas are set, and the font size and the display mode of the text content are set (the message is displayed after being split or is displayed in a rolling manner in at least one candidate display area), so that adverse effects on user experience caused by the display of the message when the user uses the electronic device in a full screen mode can be effectively reduced.
It should be noted that, in the message display method provided in the embodiment of the present application, the execution main body may be a message display apparatus, or a control module in the message display apparatus for executing the message display method. The message display device provided in the embodiment of the present application is described by taking a message display method executed by a message display device as an example.
Having described the message display method according to the embodiment of the present application, a message display apparatus according to the embodiment of the present application will be described with reference to the accompanying drawings.
Referring to fig. 6, an embodiment of the present application further provides a message display apparatus, where the message display apparatus 600 includes:
the area obtaining module 601 is configured to obtain at least one candidate display area in a target page displayed by an electronic device when the electronic device receives a message, where the candidate display area is an area outside a display area of a main object in the target page;
a message display module 602, configured to display the message in a target area, where the target area includes at least one candidate display area.
Optionally, the message display module 602 includes:
a splitting sub-module 6021, configured to split the message into M sub-messages according to an area of each candidate display region in the target page when the number of candidate display regions is greater than or equal to 2, where M is less than or equal to N, N represents the number of candidate display regions in the target page, and M and N are positive integers;
the first display sub-module 6022 is configured to display the ith sub-message in the ith candidate display area in the target page, where M ≧ i ≧ 1, and i is an integer.
Optionally, the split sub-module 6021 is specifically configured to:
determining a first candidate display area with the smallest area in the candidate display areas in the target page;
determining the first character number of the first candidate display area when a preset display mode is adopted according to the area of the first candidate display area; the first character quantity is the maximum character accommodating quantity displayed in the first candidate display area in the preset display mode;
and splitting the message into M sub-messages according to the first character number.
Optionally, when the splitting sub-module 6021 splits the message into M sub-messages according to the first number of characters, it is specifically configured to:
under the condition that the sum of the N first character numbers is less than or equal to the number of characters contained in the message, determining each adjacent character with the first character number in the message as a sub-message until N sub-messages are obtained;
and under the condition that the sum of the N first character numbers is greater than the number of characters contained in the message, determining each adjacent character with the first character number in first target characters as a sub-message to obtain K-1 sub-messages, and taking the characters except the first target character in the message as a Kth sub-message, wherein the first target character comprises K-1 characters of the sum of the first character numbers in the message, and K is the quotient of the number of the characters contained in the message and the first character number.
Optionally, the split sub-module 6021 is specifically configured to:
determining a second character number of characters which can be contained in each candidate display area in the target page in a preset display mode according to the area of each candidate display area in the target page, and storing the second character number in a target data set;
acquiring the display priority of the candidate display area in the target page;
sorting the second character number in the target data set according to the display priority to obtain a first sequence;
traversing the second number of characters according to the first sequence;
under the condition that the jth second character number is met and the number of second target characters is larger than the jth second character number, taking the jth second character number characters in the second target characters as jth sub-messages, wherein the second target characters comprise characters except the characters with the third character number before in the messages, the third character number is the sum of the first (j-1) second character numbers in the first sequence, N is not less than j and not more than 1, and j is an integer;
taking the second target character as a j-th sub-message under the condition that the j-th number of the second characters is met and the number of the second target characters is less than or equal to the j-th number of the second characters;
until all characters in the message are split into a plurality of sub-messages, or until the N second characters in the first sequence are traversed.
Optionally, the split sub-module 6021 is specifically configured to:
determining a second character number of characters which can be contained in each candidate display area in the target page in a preset display mode according to the area of each candidate display area in the target page, and storing the second character number in a target data set;
acquiring the display priority of the candidate display area in the target page;
sorting the second character number in the target data set according to the display priority to obtain a first sequence;
traversing the second number of characters according to the first sequence;
when the jth second character number is encountered, and the number of second target characters is larger than the jth second character number, and the third target character comprises a preset type character, the indication character and the character which is positioned before the indication character in the third target character are used as the j-th sub-message, wherein j is an integer from 1 to N, the second target character comprises characters of the message excluding the first third character, said third number of characters being the sum of the first (j-1) of said second numbers of characters in said first sequence, the third target character includes the first jth character of the second target character by the second character number, the indication character is the character of the preset type which is closest to the last character in the third target characters;
taking the third target character as a j-th sub-message under the condition that the j-th number of the second characters is met, the number of the second target characters is larger than the j-th number of the second characters, and the third target character does not comprise the characters of the preset type;
taking the second target character as a j-th sub-message under the condition that the j-th number of the second characters is met and the number of the second target characters is less than or equal to the j-th number of the second characters;
until all characters in the message are split into sub-messages, or until the second number of characters in the first sequence is traversed.
Optionally, when obtaining the display priority of the candidate display area in the target page, the splitting sub-module 6021 is specifically configured to:
determining the display priority of the candidate display area in the target page according to the distance between the candidate display area and the main object;
or
And determining the display priority of the candidate display area in the target page according to the display position of the candidate display area in the target page.
Optionally, the first display sub-module 6022 is specifically configured to:
displaying the ith sub-message in the candidate display area of the ith priority in the display priorities.
Optionally, the message display module 602 includes:
a selection sub-module 6023, configured to select a target number of candidate display regions from the candidate display regions in the target page as the target region;
a second display sub-module 6024 configured to scroll display the message in the target area.
Optionally, the apparatus includes:
a first receiving module 603, configured to receive a first input;
an interface display module 604, configured to display a setting interface of the candidate display area in response to the first input, where a boundary of the candidate display area in the target page is displayed in the setting interface;
a second receiving module 605, configured to receive a second input in the setting interface;
a modifying module 606, configured to modify a target parameter of the candidate display regions displayed in the setting interface in response to the second input, where the target parameter includes at least one of a number of the candidate display regions, an area of each candidate display region, a position of each candidate display region, and a display priority of each candidate display region.
As can be seen from the above, in the embodiment of the present application, when the electronic device receives a message, the region acquiring module may acquire at least one candidate display region in a target page displayed by the electronic device, so as to trigger the message displaying module to display the message in at least one candidate display region in the candidate display regions existing in the target page, where the candidate display region is located in a region outside a display region of a main object in the target page, and the main object in one page often belongs to an important picture in the page. Therefore, the embodiment of the application can display the message in the region outside the display region of the important picture in the target page, and the message can be displayed by being divided into a plurality of regions, so that the blocking of the message on the important picture on the target page can be reduced to a certain extent.
The message display device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The message display device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The message display device provided in the embodiment of the present application can implement each process implemented in the method embodiment of fig. 2, and is not described here again to avoid repetition.
Optionally, as shown in fig. 7, an electronic device 700 is further provided in this embodiment of the present application, and includes a processor 701, a memory 702, and a program or an instruction stored in the memory 702 and executable on the processor 701, where the program or the instruction is executed by the processor 701 to implement each process of the foregoing message display method embodiment, and can achieve the same technical effect, and no further description is provided here to avoid repetition.
It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 8 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 800 includes, but is not limited to: a radio frequency unit 801, a network module 802, an audio output unit 803, an input unit 804, a sensor 805, a display unit 806, a user input unit 807, an interface unit 808, a memory 809, and a processor 810.
Those skilled in the art will appreciate that the electronic device 800 may further comprise a power source (e.g., a battery) for supplying power to the various components, and the power source may be logically connected to the processor 810 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system. The electronic device structure shown in fig. 8 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
When the radio frequency unit 801 receives the message, the processor 810 is configured to obtain at least one candidate display area in a target page displayed by the electronic device, and control the display unit 806 to display the message in the target area, where the candidate display area is an area outside a display area of a main object in the target page, and the target area includes the at least one candidate display area.
Optionally, when the processor 810 controls the display unit 806 to display the message in the target area, the method is specifically configured to:
when the number of the candidate display areas is larger than or equal to 2, splitting the message into M sub-messages according to the area of each candidate display area in the target page, wherein M is smaller than or equal to N, N represents the number of the candidate display areas in the target page, and M and N are both positive integers;
the control display unit 806 displays the ith sub-message in the ith candidate display area in the target page, wherein M is greater than or equal to i and greater than or equal to 1, and i is an integer.
Optionally, when the processor 810 splits the message into M sub-messages according to the area of each candidate display region in the target page, specifically, the processor is configured to:
determining a first candidate display area with the smallest area in the candidate display areas in the target page;
determining a first character number of the first candidate display area in a preset display mode according to the area of the first candidate display area, wherein the first character number is the maximum character accommodating number of the first candidate display area displayed in the preset display mode;
and splitting the message into M sub-messages according to the first character number.
Optionally, when the processor 810 splits the message into M sub-messages according to the first number of characters, specifically, the processor is configured to:
under the condition that the sum of the N first character numbers is less than or equal to the number of characters contained in the message, determining each adjacent character with the first character number in the message as a sub-message until N sub-messages are obtained;
and under the condition that the sum of the N first character numbers is greater than the number of characters contained in the message, determining each adjacent character with the first character number in first target characters as a sub-message to obtain K-1 sub-messages, and taking the characters except the first target character in the message as a Kth sub-message, wherein the first target character comprises K-1 characters of the sum of the first character numbers in the message, and K is the quotient of the number of the characters contained in the message and the first character number.
Optionally, when the processor 810 splits the message into M sub-messages according to the area of each candidate display region in the target page, specifically, the processor is configured to:
determining a second character number of characters which can be contained in each candidate display area in the target page in a preset display mode according to the area of each candidate display area in the target page, and storing the second character number in a target data set;
acquiring the display priority of the candidate display area in the target page;
sorting the second character number in the target data set according to the display priority to obtain a first sequence;
traversing the second number of characters according to the first sequence;
under the condition that the jth second character number is met and the number of second target characters is larger than the jth second character number, taking the jth second character number characters in the second target characters as jth sub-messages, wherein the second target characters comprise characters except the characters with the third character number before in the messages, the third character number is the sum of the first (j-1) second character numbers in the first sequence, N is not less than j and not more than 1, and j is an integer;
taking the second target character as a j-th sub-message under the condition that the j-th number of the second characters is met and the number of the second target characters is less than or equal to the j-th number of the second characters;
until all characters in the message are split into a plurality of sub-messages, or until the N second characters in the first sequence are traversed.
Optionally, when the processor 810 splits the message into M sub-messages according to the area of each candidate display region in the target page, specifically, the processor is configured to:
determining a second character number of characters which can be contained in each candidate display area in the target page in a preset display mode according to the area of each candidate display area in the target page, and storing the second character number in a target data set;
acquiring the display priority of the candidate display area in the target page;
sorting the second character number in the target data set according to the display priority to obtain a first sequence;
traversing the second number of characters according to the first sequence;
when the jth second character number is encountered, and the number of second target characters is larger than the jth second character number, and the third target character comprises a preset type character, the indication character and the character which is positioned before the indication character in the third target character are used as the j-th sub-message, wherein j is an integer from 1 to N, the second target character comprises characters of the message excluding the first third character, said third number of characters being the sum of the first (j-1) of said second numbers of characters in said first sequence, the third target character includes the first jth character of the second target character by the second character number, the indication character is the character of the preset type which is closest to the last character in the third target characters;
taking the third target character as a j-th sub-message under the condition that the j-th number of the second characters is met, the number of the second target characters is larger than the j-th number of the second characters, and the third target character does not comprise the characters of the preset type;
taking the second target character as a j-th sub-message under the condition that the j-th number of the second characters is met and the number of the second target characters is less than or equal to the j-th number of the second characters;
until all characters in the message are split into sub-messages, or until the second number of characters in the first sequence is traversed.
Optionally, when obtaining the display priority of the candidate display area in the target page, the processor 810 is specifically configured to:
determining the display priority of the candidate display area in the target page according to the distance between the candidate display area and the main object;
or
And determining the display priority of the candidate display area in the target page according to the display position of the candidate display area in the target page.
Optionally, when the processor 810 controls the display unit 806 to display the ith sub-message in the ith candidate display area in the target page, the processor is specifically configured to:
controlling the display unit 806 to display the ith sub-message in the candidate display region of the ith priority among the display priorities.
Optionally, when the processor 810 controls the display unit 806 to display the message in the target area, the processor is specifically configured to:
selecting a target number of candidate display areas from the candidate display areas in the target page as the target area;
the control display unit 806 scrolls the message in the target area.
Optionally, a user input unit 807 for receiving a first input;
the processor 810 is further configured to control the display unit 806 to display a setting interface of the candidate display area in response to the first input, wherein a boundary of the candidate display area in the target page is displayed in the setting interface;
a user input unit 807 for receiving a second input in the setting interface;
the processor 810 is further configured to modify a target parameter of the candidate display regions displayed in the setting interface in response to the second input, where the target parameter includes at least one of the number of the candidate display regions, the area of each candidate display region, the position of each candidate display region, and the display priority of each candidate display region.
As can be seen from the above, in the embodiment of the present application, when the radio frequency unit 801 receives a message, the processor 810 can obtain at least one candidate display area in a target page displayed by the electronic device, and control the display unit 806 to display the message in at least one candidate display area in candidate display areas existing in the target page, where the candidate display area is located in an area outside a display area of a main object in the target page, and the main object in one page often belongs to an important picture in the page. Therefore, the embodiment of the application can display the message in the region outside the display region of the important picture in the target page, and the message can be displayed by being divided into a plurality of regions, so that the blocking of the message on the important picture on the target page can be reduced to a certain extent.
It should be understood that in the embodiment of the present application, the input Unit 804 may include a Graphics Processing Unit (GPU) 8041 and a microphone 8042, and the Graphics Processing Unit 8041 processes image data of a still picture or a video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 806 may include a display panel 8061, and the display panel 8061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 807 includes a touch panel 8071 and other input devices 8072. A touch panel 8071, also referred to as a touch screen. The touch panel 8071 may include two portions of a touch detection device and a touch controller. Other input devices 8072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein. The memory 809 may be used to store software programs as well as various data including, but not limited to, application programs and operating systems. The processor 810 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 810.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above-mentioned message display method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to execute a program or an instruction to implement each process of the above-mentioned message display method embodiment, and can achieve the same technical effect, and is not described here again to avoid repetition.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
Optionally, the present application provides a computer program product stored in a non-volatile storage medium, the program product being configured to be executed by at least one processor to implement the steps of the message display method in the above-described embodiments.
Optionally, an embodiment of the present invention further provides a message display apparatus, where the apparatus is configured to perform the steps of the message display method in each embodiment as described above.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (18)

1. A method for displaying messages, the method comprising:
when the electronic equipment receives a message, acquiring at least one candidate display area in a target page displayed by the electronic equipment, wherein the candidate display area is an area outside a display area of a main object in the target page;
displaying the message in a target area, wherein the target area comprises at least one of the candidate display areas;
the step of displaying the message in the target area includes:
when the number of the candidate display areas is larger than or equal to 2, splitting the message into M sub-messages according to the area of each candidate display area in the target page, wherein M is smaller than or equal to N, N represents the number of the candidate display areas in the target page, and M and N are both positive integers;
displaying the ith sub-message in the ith candidate display area in the target page, wherein M is more than or equal to i and more than or equal to 1, and i is an integer;
the step of splitting the message into M sub-messages according to the area of each candidate display region in the target page includes:
determining a first candidate display area with the smallest area in the candidate display areas in the target page;
determining a first character number of the first candidate display area in a preset display mode according to the area of the first candidate display area, wherein the first character number is the maximum character accommodating number of the first candidate display area displayed in the preset display mode;
and splitting the message into M sub-messages according to the first character number.
2. The message display method according to claim 1, wherein the step of splitting the message into M sub-messages according to the first number of characters comprises:
under the condition that the sum of the N first character numbers is less than or equal to the number of characters contained in the message, determining each adjacent character with the first character number in the message as a sub-message until N sub-messages are obtained;
and under the condition that the sum of the N first character numbers is greater than the number of characters contained in the message, determining each adjacent character with the first character number in first target characters as a sub-message to obtain K-1 sub-messages, and taking the characters except the first target character in the message as a Kth sub-message, wherein the first target character comprises K-1 characters of the sum of the first character numbers in the message, and K is the quotient of the number of the characters contained in the message and the first character number.
3. The message display method according to claim 1, wherein the step of splitting the message into M sub-messages according to the area of each of the candidate display regions in the target page comprises:
determining a second character number of characters which can be contained in each candidate display area in the target page in a preset display mode according to the area of each candidate display area in the target page, and storing the second character number in a target data set;
acquiring the display priority of the candidate display area in the target page;
sorting the second character number in the target data set according to the display priority to obtain a first sequence;
traversing the second number of characters according to the first sequence;
under the condition that the jth second character number is met and the number of second target characters is larger than the jth second character number, taking the jth second character number characters in the second target characters as jth sub-messages, wherein the second target characters comprise characters except the characters with the third character number before in the messages, the third character number is the sum of the first (j-1) second character numbers in the first sequence, N is not less than j and not more than 1, and j is an integer;
taking the second target character as a j-th sub-message under the condition that the j-th number of the second characters is met and the number of the second target characters is less than or equal to the j-th number of the second characters;
until all characters in the message are split into a plurality of sub-messages, or until the N second characters in the first sequence are traversed.
4. The message display method according to claim 1, wherein the step of splitting the message into M sub-messages according to the area of each of the candidate display regions in the target page comprises:
determining a second character number of characters which can be contained in each candidate display area in the target page in a preset display mode according to the area of each candidate display area in the target page, and storing the second character number in a target data set;
acquiring the display priority of the candidate display area in the target page;
sorting the second character number in the target data set according to the display priority to obtain a first sequence;
traversing the second number of characters according to the first sequence;
when the jth second character number is encountered, and the number of second target characters is larger than the jth second character number, and the third target character comprises a preset type character, the indication character and the character which is positioned before the indication character in the third target character are used as the j-th sub-message, wherein j is an integer from 1 to N, the second target character comprises characters of the message excluding the first third character, said third number of characters being the sum of the first (j-1) of said second numbers of characters in said first sequence, the third target character includes the first jth character of the second target character by the second character number, the indication character is the character of the preset type which is closest to the last character in the third target characters;
taking the third target character as a j-th sub-message under the condition that the j-th number of the second characters is met, the number of the second target characters is larger than the j-th number of the second characters, and the third target character does not comprise the characters of the preset type;
taking the second target character as a j-th sub-message under the condition that the j-th number of the second characters is met and the number of the second target characters is less than or equal to the j-th number of the second characters;
until all characters in the message are split into sub-messages, or until the second number of characters in the first sequence is traversed.
5. The message display method according to claim 3 or 4, wherein the step of obtaining the display priority of the candidate display area in the target page comprises:
determining the display priority of the candidate display area in the target page according to the distance between the candidate display area and the main object;
or
And determining the display priority of the candidate display area in the target page according to the display position of the candidate display area in the target page.
6. The message display method according to claim 3 or 4, wherein the step of displaying the ith sub-message in the ith candidate display area in the target page comprises:
displaying the ith sub-message in the candidate display area of the ith priority in the display priorities.
7. The message display method according to claim 1, wherein the step of displaying the message in the target area comprises:
selecting a target number of candidate display areas from the candidate display areas in the target page as the target area;
and scrolling and displaying the message in the target area.
8. The message display method according to claim 1, characterized in that the method further comprises:
receiving a first input;
displaying a setting interface of the candidate display area in response to the first input, wherein a boundary of the candidate display area in the target page is displayed in the setting interface;
receiving a second input in the setting interface;
in response to the second input, modifying a target parameter of the candidate display regions displayed in the setting interface, the target parameter including at least one of a number of the candidate display regions, an area of each of the candidate display regions, a location of each of the candidate display regions, and a display priority of each of the candidate display regions.
9. A message display apparatus, characterized in that the apparatus comprises:
the device comprises an area acquisition module, a display module and a display module, wherein the area acquisition module is used for acquiring at least one candidate display area in a target page displayed by the electronic equipment when the electronic equipment receives a message, and the candidate display area is an area outside a display area of a main object in the target page;
a message display module for displaying the message in a target area, wherein the target area comprises at least one of the candidate display areas;
the message display module includes:
the splitting sub-module is used for splitting the message into M sub-messages according to the area of each candidate display region in the target page when the number of the candidate display regions is greater than or equal to 2, wherein M is less than or equal to N, N represents the number of the candidate display regions in the target page, and M and N are positive integers;
the first display sub-module is used for displaying the ith sub-message in the ith candidate display area in the target page, wherein M is more than or equal to i is more than or equal to 1, and i is an integer;
the split sub-module is specifically configured to:
determining a first candidate display area with the smallest area in the candidate display areas in the target page;
determining the first character number of the first candidate display area when a preset display mode is adopted according to the area of the first candidate display area; the first character quantity is the maximum character accommodating quantity displayed in the first candidate display area in the preset display mode;
and splitting the message into M sub-messages according to the first character number.
10. The message display apparatus according to claim 9, wherein the splitting sub-module, when splitting the message into M sub-messages according to the first number of characters, is specifically configured to:
under the condition that the sum of the N first character numbers is less than or equal to the number of characters contained in the message, determining each adjacent character with the first character number in the message as a sub-message until N sub-messages are obtained;
and under the condition that the sum of the N first character numbers is greater than the number of characters contained in the message, determining each adjacent character with the first character number in first target characters as a sub-message to obtain K-1 sub-messages, and taking the characters except the first target character in the message as a Kth sub-message, wherein the first target character comprises K-1 characters of the sum of the first character numbers in the message, and K is the quotient of the number of the characters contained in the message and the first character number.
11. The message display apparatus according to claim 9, wherein the splitting sub-module is specifically configured to:
determining a second character number of characters which can be contained in each candidate display area in the target page in a preset display mode according to the area of each candidate display area in the target page, and storing the second character number in a target data set;
acquiring the display priority of the candidate display area in the target page;
sorting the second character number in the target data set according to the display priority to obtain a first sequence;
traversing the second number of characters according to the first sequence;
under the condition that the jth second character number is met and the number of second target characters is larger than the jth second character number, taking the jth second character number characters in the second target characters as jth sub-messages, wherein the second target characters comprise characters except the characters with the third character number before in the messages, the third character number is the sum of the first (j-1) second character numbers in the first sequence, N is not less than j and not more than 1, and j is an integer;
taking the second target character as a j-th sub-message under the condition that the j-th number of the second characters is met and the number of the second target characters is less than or equal to the j-th number of the second characters;
until all characters in the message are split into a plurality of sub-messages, or until the N second characters in the first sequence are traversed.
12. The message display apparatus according to claim 9, wherein the splitting sub-module is specifically configured to:
determining a second character number of characters which can be contained in each candidate display area in the target page in a preset display mode according to the area of each candidate display area in the target page, and storing the second character number in a target data set;
acquiring the display priority of the candidate display area in the target page;
sorting the second character number in the target data set according to the display priority to obtain a first sequence;
traversing the second number of characters according to the first sequence;
when the jth second character number is encountered, and the number of second target characters is larger than the jth second character number, and the third target character comprises a preset type character, the indication character and the character which is positioned before the indication character in the third target character are used as the j-th sub-message, wherein j is an integer from 1 to N, the second target character comprises characters of the message excluding the first third character, said third number of characters being the sum of the first (j-1) of said second numbers of characters in said first sequence, the third target character includes the first jth character of the second target character by the second character number, the indication character is the character of the preset type which is closest to the last character in the third target characters;
taking the third target character as a j-th sub-message under the condition that the j-th number of the second characters is met, the number of the second target characters is larger than the j-th number of the second characters, and the third target character does not comprise the characters of the preset type;
taking the second target character as a j-th sub-message under the condition that the j-th number of the second characters is met and the number of the second target characters is less than or equal to the j-th number of the second characters;
until all characters in the message are split into sub-messages, or until the second number of characters in the first sequence is traversed.
13. The message display device according to claim 11 or 12, wherein the splitting sub-module, when obtaining the display priority of the candidate display area in the target page, is specifically configured to:
determining the display priority of the candidate display area in the target page according to the distance between the candidate display area and the main object;
or
And determining the display priority of the candidate display area in the target page according to the display position of the candidate display area in the target page.
14. The message display apparatus according to claim 11 or 12, wherein the first display submodule is specifically configured to:
displaying the ith sub-message in the candidate display area of the ith priority in the display priorities.
15. The message display device according to claim 9, wherein the message display module comprises:
a selection submodule, configured to select a target number of candidate display regions from the candidate display regions in the target page as the target region;
and the second display submodule is used for scrolling and displaying the message in the target area.
16. The message display device according to claim 9, characterized in that the device comprises:
the first receiving module is used for receiving a first input;
the interface display module is used for responding to the first input and displaying a setting interface of the candidate display area, wherein the setting interface displays the boundary of the candidate display area in the target page;
the second receiving module is used for receiving a second input in the setting interface;
a modification module, configured to modify a target parameter of the candidate display regions displayed in the setting interface in response to the second input, where the target parameter includes at least one of a number of the candidate display regions, an area of each of the candidate display regions, a position of each of the candidate display regions, and a display priority of each of the candidate display regions.
17. An electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the message display method as claimed in any one of claims 1 to 8.
18. A readable storage medium, on which a program or instructions are stored, which when executed by a processor, carry out the steps of the message display method according to any one of claims 1 to 8.
CN202010956589.8A 2020-09-11 2020-09-11 Message display method and device, electronic equipment and readable storage medium Active CN112087546B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010956589.8A CN112087546B (en) 2020-09-11 2020-09-11 Message display method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010956589.8A CN112087546B (en) 2020-09-11 2020-09-11 Message display method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN112087546A CN112087546A (en) 2020-12-15
CN112087546B true CN112087546B (en) 2021-11-09

Family

ID=73737706

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010956589.8A Active CN112087546B (en) 2020-09-11 2020-09-11 Message display method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112087546B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101119560A (en) * 2007-09-21 2008-02-06 中兴通讯股份有限公司 Terminal condition express method and display method
CN104703019A (en) * 2015-03-25 2015-06-10 京东方科技集团股份有限公司 TV display method and device
CN106131305A (en) * 2016-06-17 2016-11-16 努比亚技术有限公司 A kind of control method and electronic equipment
CN106403985A (en) * 2016-09-06 2017-02-15 深圳格兰泰克汽车电子有限公司 Vehicle-mounted navigation split-screen display method and device
CN111427657A (en) * 2020-04-23 2020-07-17 湖南快乐阳光互动娱乐传媒有限公司 Application window display method and device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104462097B (en) * 2013-09-13 2018-02-27 联想(北京)有限公司 Display methods and electronic equipment
KR20150049045A (en) * 2013-10-29 2015-05-08 삼성전자주식회사 Method and apparautus for controlling the brightness of the screen in portable device
CN105739934B (en) * 2014-12-11 2018-09-21 华为终端(东莞)有限公司 Multi-screen splicing display processing method and equipment
CN110620947A (en) * 2018-06-20 2019-12-27 北京优酷科技有限公司 Subtitle display area determining method and device
CN110620946B (en) * 2018-06-20 2022-03-18 阿里巴巴(中国)有限公司 Subtitle display method and device
CN109271229B (en) * 2018-09-30 2021-11-09 武汉斗鱼网络科技有限公司 Method and device for displaying icon based on mutual exclusion manager
CN110673921A (en) * 2019-09-29 2020-01-10 联想(北京)有限公司 Information processing method and device and electronic equipment
CN111459300A (en) * 2020-03-31 2020-07-28 维沃移动通信有限公司 Character display method and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101119560A (en) * 2007-09-21 2008-02-06 中兴通讯股份有限公司 Terminal condition express method and display method
CN104703019A (en) * 2015-03-25 2015-06-10 京东方科技集团股份有限公司 TV display method and device
CN106131305A (en) * 2016-06-17 2016-11-16 努比亚技术有限公司 A kind of control method and electronic equipment
CN106403985A (en) * 2016-09-06 2017-02-15 深圳格兰泰克汽车电子有限公司 Vehicle-mounted navigation split-screen display method and device
CN111427657A (en) * 2020-04-23 2020-07-17 湖南快乐阳光互动娱乐传媒有限公司 Application window display method and device

Also Published As

Publication number Publication date
CN112087546A (en) 2020-12-15

Similar Documents

Publication Publication Date Title
CN111831182B (en) Application icon control method and device and electronic equipment
WO2022048632A1 (en) Notification message display method and apparatus, electronic device, and readable storage medium
CN112702261B (en) Information display method and device and electronic equipment
CN112540740A (en) Split screen display method and device, electronic equipment and readable storage medium
CN112286416A (en) Information display method and device and electronic equipment
CN111813308A (en) Interface processing method and device, electronic equipment and storage medium
CN114385049A (en) Message processing method, device, equipment and storage medium
CN111651106A (en) Unread message prompting method, unread message prompting device, unread message prompting equipment and readable storage medium
CN113709306B (en) Session processing method and device and electronic equipment
CN112099714B (en) Screenshot method and device, electronic equipment and readable storage medium
CN113434226A (en) Communication method, communication device, electronic equipment and readable storage medium
CN113359999A (en) Candidate word updating method and device and electronic equipment
CN112306320A (en) Page display method, device, equipment and medium
CN112148167A (en) Control setting method and device and electronic equipment
CN112087546B (en) Message display method and device, electronic equipment and readable storage medium
CN114416264A (en) Message display method and device
CN111857474B (en) Application program control method and device and electronic equipment
CN114895815A (en) Data processing method and electronic equipment
CN113885748A (en) Object switching method and device, electronic equipment and readable storage medium
CN113362426A (en) Image editing method and image editing device
CN112684912A (en) Candidate information display method and device and electronic equipment
CN112953813A (en) Message sending method and device, electronic equipment and readable storage medium
CN111949322A (en) Information display method and device
CN112732100A (en) Information processing method and device and electronic equipment
CN112035032B (en) Expression adding method and device

Legal Events

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