CN109271229B - Method and device for displaying icon based on mutual exclusion manager - Google Patents

Method and device for displaying icon based on mutual exclusion manager Download PDF

Info

Publication number
CN109271229B
CN109271229B CN201811158910.7A CN201811158910A CN109271229B CN 109271229 B CN109271229 B CN 109271229B CN 201811158910 A CN201811158910 A CN 201811158910A CN 109271229 B CN109271229 B CN 109271229B
Authority
CN
China
Prior art keywords
information
icon
packaging
priority
display area
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
CN201811158910.7A
Other languages
Chinese (zh)
Other versions
CN109271229A (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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201811158910.7A priority Critical patent/CN109271229B/en
Publication of CN109271229A publication Critical patent/CN109271229A/en
Application granted granted Critical
Publication of CN109271229B publication Critical patent/CN109271229B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention provides a method and a device for displaying icons based on a mutual exclusion manager, wherein the method comprises the following steps: dividing a screen into display areas with different levels; creating a mutual exclusion manager; performing, by the mutex manager: when the display area receives the icon information, the icon information and the priority information of the icon information are packaged into icon packaging information and then added into the icon packaging information set of the display area; screening icon packaging information with the highest priority from the icon packaging information set, wherein the screening step comprises the following steps: determining target priority information with the highest priority in the priority information included in all the icon packaging information in the icon packaging information set, and positioning the target icon packaging information corresponding to the target priority information; and displaying the icon information included in the target icon packaging information. When the display area receives a plurality of icon information to be displayed, one icon information with the highest priority can be screened out by the mutual exclusion manager and then displayed.

Description

Method and device for displaying icon based on mutual exclusion manager
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for displaying icons based on a mutual exclusion manager.
Background
Generally, after a screen is divided into a plurality of different display areas, only one icon can be displayed in the same display area, so that a user can quickly identify the position of the icon and perform operations of related services.
However, as the applications become richer and more, the number of icons corresponding to the applications also becomes more and more, and when the same display area receives information of a plurality of pre-displayed icons, only the plurality of icons can be displayed in the same display area, so that the problem of icon overlapping is caused, the difficulty of icon identification is large, the operation is inconvenient, even some icons may be completely blocked, and the user cannot identify the icons at all.
Disclosure of Invention
The invention provides a method and a device for displaying icons based on a mutual exclusion manager, which solve the problems of high icon identification difficulty and inconvenient operation caused by the fact that a plurality of icons are displayed in the same display area in the prior art.
In a first aspect, an embodiment of the present invention provides a method for displaying an icon based on a mutual exclusion manager, where the method includes:
dividing a screen into display areas with different levels;
creating a mutual exclusion manager, wherein the mutual exclusion manager comprises information of each display area, and the information of the display areas comprises grade information of the display areas, position information of the display areas and icon packaging information sets of the display areas;
performing, by the mutex manager: when the display area receives icon information, packaging the icon information and the priority information of the icon information into icon packaging information; adding the icon packaging information to the respective icon packaging information sets of the display areas; sequentially screening icon packaging information with the highest priority from the icon packaging information set of each display area based on the grade information of the display areas, wherein the screening step comprises the following steps: determining target priority information with the highest priority in priority information included in all icon packaging information in the icon packaging information set, and positioning the target icon packaging information corresponding to the target priority information;
and displaying icon information included in the target icon packaging information based on the position information of the display area.
In some possible implementations, prior to the creating the mutex manager, the method further comprises:
creating a List < Wrapper > type icon packaging information set, wherein the icon packaging information in the icon packaging information set is the Wrapper type, and the Wrapper type comprises two attributes, one is integer type priority information, and the other is object type icon information.
In some possible implementations, the determining target priority information with the highest priority among the priority information included in all the pieces of icon packaging information in the set of icon packaging information includes:
and determining the target priority information with the highest priority in the priority information included in all the icon packaging information in the icon packaging information set by a binary sorting method.
In some possible implementations, before the encapsulating the icon information and the priority information of the icon information into icon encapsulation information, the method further includes:
and acquiring the priority information of the icon information from a preset priority table, wherein the preset priority table is a corresponding relation between the icon information and the priority created based on the priority of the service type corresponding to the icon information.
In some possible implementations, the mutual exclusion manager represents the level information of the display area and the position information of the display area by a position field, the position field being a constant of an integer type.
In some possible implementations, the dividing the screen into display areas of different levels includes:
the screen is divided into display areas of different levels by size.
In a second aspect, an embodiment of the present invention provides an apparatus for displaying an icon based on a mutual exclusion manager, where the apparatus includes:
a dividing unit for dividing the screen into display areas of different levels;
a creating unit, configured to create a mutex manager, where the mutex manager includes information of each display area, and the information of the display area includes level information of the display area, position information of the display area, and an icon encapsulation information set of the display area;
an execution unit, configured to perform, by the mutex manager: when the display area receives icon information, packaging the icon information and the priority information of the icon information into icon packaging information; adding the icon packaging information to the respective icon packaging information sets of the display areas; sequentially screening icon packaging information with the highest priority from the icon packaging information set of each display area based on the grade information of the display areas, wherein the screening step comprises the following steps: determining target priority information with the highest priority in priority information included in all icon packaging information in the icon packaging information set, and positioning the target icon packaging information corresponding to the target priority information;
and the display unit is used for displaying the icon information included in the target icon packaging information based on the position information of the display area.
In some possible implementations, the creating unit is further configured to create a set of icon packaging information of a List < Wrapper > type, where the icon packaging information in the set of icon packaging information is a Wrapper type, and the Wrapper type includes two attributes, one is priority information of an integer type, and the other is icon information of an object type.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored, and the computer program, when executed by a processor, implements any implementation manner of the above method for displaying an icon based on a mutual exclusion manager.
In a fourth aspect, an embodiment of the present invention provides a computer device, which includes a processor, a memory, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement any implementation manner of the above method for displaying an icon based on a mutual exclusion manager.
The method for displaying the icon based on the mutual exclusion manager provided by the embodiment of the invention divides the screen into display areas with different grades; creating a mutual exclusion manager, wherein the mutual exclusion manager comprises information of each display area, and the information of the display areas comprises grade information of the display areas, position information of the display areas and icon packaging information sets of the display areas; performing, by the mutex manager: when the display area receives icon information, packaging the icon information and the priority information of the icon information into icon packaging information; adding the icon packaging information to the respective icon packaging information sets of the display areas; sequentially screening icon packaging information with the highest priority from the icon packaging information set of each display area based on the grade information of the display areas, wherein the screening step comprises the following steps: determining target priority information with the highest priority in priority information included in all icon packaging information in the icon packaging information set, and positioning the target icon packaging information corresponding to the target priority information; and displaying icon information included in the target icon packaging information based on the position information of the display area. When the display area receives a plurality of icon information to be displayed, one icon information with the highest priority can be screened out through the mutual exclusion manager and displayed, and the problems that in the prior art, a plurality of icons are displayed in the same display area, so that the icon identification difficulty is high, and the operation is inconvenient are solved. Furthermore, by packaging the priority information of the icon information to the target packaged icon information, the priority information of the icon information can be quickly obtained and compared.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
FIG. 1 is a flowchart of a method for displaying an icon based on a mutex manager according to an embodiment of the present application;
FIG. 2 is a block diagram illustrating an apparatus for displaying icons based on a mutual exclusion manager according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a computer device in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a computer-readable storage medium in an embodiment of the present application.
Detailed Description
The embodiment of the invention provides a method and a device for displaying icons based on a mutual exclusion manager, which can screen out icon information with the highest priority for displaying through the mutual exclusion manager, and solve the problems of high icon identification difficulty and inconvenient operation caused by the fact that a plurality of icons are displayed in the same display area in the prior art.
The technical scheme in the embodiment of the invention has the following general idea:
dividing a screen into display areas with different levels; creating a mutual exclusion manager, wherein the mutual exclusion manager comprises information of each display area, and the information of the display areas comprises grade information of the display areas, position information of the display areas and icon packaging information sets of the display areas; performing, by the mutex manager: when the display area receives icon information, packaging the icon information and the priority information of the icon information into icon packaging information; adding the icon packaging information to the respective icon packaging information sets of the display areas; sequentially screening icon packaging information with the highest priority from the icon packaging information set of each display area based on the grade information of the display areas, wherein the screening step comprises the following steps: determining target priority information with the highest priority in priority information included in all icon packaging information in the icon packaging information set, and positioning the target icon packaging information corresponding to the target priority information; and displaying icon information included in the target icon packaging information based on the position information of the display area. When the display area receives a plurality of icon information to be displayed, one icon information with the highest priority can be screened out through the mutual exclusion manager and displayed, and the problems that in the prior art, a plurality of icons are displayed in the same display area, so that the icon identification difficulty is high, and the operation is inconvenient are solved. Furthermore, by packaging the priority information of the icon information to the target packaged icon information, the priority information of the icon information can be quickly obtained and compared.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. 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 invention.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship. Furthermore, the names of the variables or functions used herein may also be used in other implementations to represent the same meaning, and are not limited herein.
Example one
An embodiment of the present invention provides a method for displaying an icon based on a mutual exclusion manager, referring to fig. 1, where the method includes:
and S101, dividing the screen into display areas of different levels.
Specifically, the screen may be divided into display regions with different sizes, and then the screen is divided into display regions with different levels according to the sizes, for example, the larger the area of the display region is, the higher the level is, and the smaller the area of the display region is, the lower the level is, or the screen may be divided into display regions with equal sizes, and then the screen is divided into display regions with different levels according to visual preference, for example, the display region in the middle of the screen is, the display region at the corner of the screen is, the lower the level is, or the screen may be divided into display regions with different levels by combining various manners, which is not limited herein.
It should be noted that the screen in this embodiment may be a screen of an electronic device such as a smart phone, a smart watch, a desktop computer, a notebook, or a tablet computer, and may be distinguished according to a material of the screen, and may also be a TFT-LCD (thin film transistor-liquid crystal Display), an OLED (Organic Light Emitting Display), or the like, which is not limited herein.
S102, creating a mutual exclusion manager, wherein the mutual exclusion manager comprises information of each display area, and the information of the display areas comprises grade information of the display areas, position information of the display areas and icon packaging information sets of the display areas.
Specifically, the position field indicates both the level information of the display area and the position information of the display area. In code implementation, the position field is a constant of an integer type, wherein an integer can be used to distinguish position information between different display areas and to calibrate the grade of the display area, and defining an integer as a constant can enhance the readability and maintainability of the code. For example, the position field is implemented as follows:
Public static final int FIRST_POSITION=1;
Public static final int SECOND_POSITION=2;
wherein static final represents a constant, Public represents that other classes have the right to access the variable, FIRST _ POSITION represents that the constant is an integer 1, SECOND _ POSITION represents that the constant is an integer 2, and the values of the subsequent FIRST _ POSITION and SECOND _ POSITION cannot be modified any more. In some other implementations, the position information and the level information of the display area may be represented by different variable names, respectively, and are not limited herein.
In addition to the design position field, an icon packaging information set of a List < Wrapper > type is created first, the icon packaging information in the icon packaging information set is a Wrapper type, the Wrapper type includes two attributes, one is a priority information level of an integer type, and the other is an icon information item of an Object type, since the types of the icon information may be different, and the Object type is a type of a top layer and can accommodate any type of data, the type of the icon information of this embodiment is defined as an Object, and specifically, the Wrapper definition method is as follows:
Class Wrapper{Private int level;Private Object item}
after the position field representing the level information and the position information of the display area and the data structure of the List < Wrapper > representing the icon packaging information set are designed, a method needs to be designed to construct the association between the position and the List < Wrapper >, and specifically, a MAP object is designed to associate the level information of the display area, the position information of the display area and the icon packaging information set of the display area, that is, a MAP < int, List < Wrapper > type data is defined to construct the association between the position and the List < Wrapper >, wherein int is used for storing the information of the position. As can be seen, the MAP is a set, and List < Wrapper > is also a set, and the goal of creating the mutex manager data structure is finally accomplished by designing the multi-level set nesting. After creating the data structure MAP < int, List < Wrapper > type of the mutual exclusion manager, a process of instantiating an object needs to be performed on the data of the type, and a method for specifically instantiating the data of the MAP < int, List < Wrapper > type is implemented by calling a constructor thereof, taking instantiating mMap as an example, and the specific implementation is as follows:
MAP<int,List<Wrapper>>mMap=new HashMap<int,List<Wrapper>>()
it is to be understood that this embodiment is only described by taking an mMap example as an example, and the present embodiment is not limited thereto, and will not be described again below.
S103, executing the following operations through the mutual exclusion manager: when the display area receives icon information, packaging the icon information and the priority information of the icon information into icon packaging information; adding the icon packaging information to the respective icon packaging information sets of the display areas; sequentially screening icon packaging information with the highest priority from the icon packaging information set of each display area based on the grade information of the display areas, wherein the screening step comprises the following steps: and determining the target priority information with the highest priority in the priority information included in all the icon packaging information sets, and positioning the target icon packaging information corresponding to the target priority information.
After the mutual exclusion manager is created, the icon information of each display area can be managed uniformly through the mutual exclusion manager, when the display areas receive the icon information sent by a server, a background or other interconnected devices, the icon information and the priority information of the icon information are packaged into Wrapper-type icon packaging information, for example, the specific implementation includes: and constructing a Wrapper object by calling a constructor of the Wrapper class, and encapsulating the priority information of the icon information and the icon information into the Wrapper object. And then adding the icon packaging information to the respective icon packaging information sets of the display areas, for example, the specific implementation includes: an object ListWrapper of a set of icon packaging information of the type listwrrapper > is first constructed, and the icon packaging information is added to the set of icon packaging information ListWrapper by calling the ListWrapper.
Because the display areas have different grades, the display areas can be sorted first based on the grade information of the display areas, and then the icon packaging information with the highest priority is sequentially screened from the respective icon information sets of each display area according to the order of the grades from high to low.
For each icon package information set, the specific screening steps include: determining the target priority information with the highest priority in the priority information included in all the icon packaging information sets, specifically, taking the above List wrapper as an example, the priority information included in all the icon packaging information in the List wrapper set is fetched first, i.e., level field information, and then constructs all the obtained priority information into a new set listLevel, as can be understood, the set listLevel is an integer set, then the largest number can be screened out by methods such as a binary sorting method, a bubbling method, a selective sorting or bucket sorting method and the like, the number corresponds to the target priority information with the highest priority, and the target icon encapsulation information corresponding to the target priority information is relocated, specifically, and relocating the image packaging information in the List wrapper set through the number corresponding to the target priority information, wherein the image packaging information is the target icon packaging information with the highest priority.
Before the icon information and the priority information of the icon information are encapsulated into the icon encapsulation information, the priority information of the icon information may be acquired from a preset priority table, or the priority information of the icon information may be requested from another device, for example, a server. In the method of searching the priority information of the icon information from the preset priority table, the preset priority table may be created based on the priority of the service type corresponding to the icon information, wherein the higher the priority of the service type is, the higher the priority of the corresponding icon information is, so that the icon information corresponding to the service type with the higher priority may be preferentially displayed. Further, the priority table may store the icon information according to the order of priority from low to high through an array element tableArray [ ], taking the priority information of the icon information item as an example, first traverse the tableArray, and in each traversal, compare whether the item is equal to the array tableArray [ i ], if so, the index value i is the priority information of the item, otherwise, perform the next round of comparison, where i is the index value used in the round. Furthermore, the priority table in this embodiment may also be adjusted according to actual situations, and when the priority of the service type changes, the priority of the corresponding icon information also changes.
And S104, displaying the icon information included in the target icon packaging information based on the position information of the display area.
It can be understood that since the priority information included in the icon package information is the priority information of the icon information, the icon information included in the target icon package information screened out based on the priority information with the highest priority is the icon information with the highest priority. Then, icon information included in the target icon packaging information is displayed based on the position information of the display area, that is, icon information having the highest priority is displayed based on the position information of the display area.
Further, the highest priority target icon packaging information may also be displayed in combination with different display manners, including but not limited to static images, dynamic animations, icons becoming smaller or larger, and the like, without limitation.
For ease of understanding, the present embodiment is described below with reference to an application scenario. In a display interface of a certain application, a screen is divided into three display areas with different levels, wherein one display area 1 with the level 1 is positioned in the middle part of the screen, the other display area 2 with the level 2 is positioned in the upper half part of the screen, the last display area 3 with the level 3 is positioned in the lower half part of the screen, and the lower number of the level is, the higher the level is. When the display area 1 and the display area 3 receive a plurality of icon information, the mutual exclusion manager sequentially packages each icon information of the display area 1 and the priority information of the icon information into icon packaging information and then stores the icon packaging information into an icon packaging information set of the display area 1, and sequentially packages each icon information of the display area 3 and the priority information of the icon information into icon packaging information and then stores the icon packaging information set of the display area 3. By comparison, if the display area 1 is ranked higher than the display area 3, the mutex manager processes the icon encapsulation information of the display area 1 first. Since the display area 1 only receives the guess event icon information with the priority of 4 sent by the server and the lottery event icon information with the priority of 5 sent by the background, the icon package information set of the display area 1 has two pieces of icon package information in total. The mutual exclusion manager acquires priority information 4 and 5 included in all icon packaging information in the icon packaging information set, wherein the priority is higher when the number of the priority is larger, and 5 is larger than 4, so that the priority of 5 is higher, and then the target icon packaging information, namely the icon packaging information corresponding to the lottery activity, is positioned according to the number 5. Finally, icon information included in the target icon package information, i.e., icon information of the lottery activity, is displayed in the display area 1, i.e., the middle portion of the screen. Similarly, the icon packaging information with the highest priority in the display area 3 is screened out again and the icon information included in the icon packaging information is displayed in the lower half of the screen. Therefore, the problems that a plurality of icon information are displayed in the same display area, so that the icon information is difficult to identify and inconvenient to operate are solved.
In the embodiment, the screen is divided into display areas with different levels; creating a mutual exclusion manager, wherein the mutual exclusion manager comprises information of each display area, and the information of the display areas comprises grade information of the display areas, position information of the display areas and icon packaging information sets of the display areas; performing, by the mutex manager: when the display area receives icon information, packaging the icon information and the priority information of the icon information into icon packaging information; adding the icon packaging information to the respective icon packaging information sets of the display areas; sequentially screening icon packaging information with the highest priority from the icon packaging information set of each display area based on the grade information of the display areas, wherein the screening step comprises the following steps: determining target priority information with the highest priority in priority information included in all icon packaging information in the icon packaging information set, and positioning the target icon packaging information corresponding to the target priority information; and displaying icon information included in the target icon packaging information based on the position information of the display area. When the display area receives a plurality of icon information to be displayed, one icon information with the highest priority can be screened out through the mutual exclusion manager and displayed, and the problems that in the prior art, a plurality of icons are displayed in the same display area, so that the icon identification difficulty is high, and the operation is inconvenient are solved. Furthermore, by packaging the priority information of the icon information to the target packaged icon information, the priority information of the icon information can be quickly obtained and compared.
Based on the same inventive concept, the embodiment of the invention also provides a device corresponding to the method in the first embodiment, which is shown in the second embodiment.
Example two
An embodiment of the present invention provides a device for displaying an icon based on a mutual exclusion manager, referring to fig. 2, where the device includes:
a dividing unit 201 for dividing a screen into display areas of different levels;
a creating unit 202, configured to create a mutex manager, where the mutex manager includes information of each display area, and the information of the display area includes level information of the display area, position information of the display area, and an icon encapsulation information set of the display area;
an execution unit 203, configured to execute, by the mutex manager: when the display area receives icon information, packaging the icon information and the priority information of the icon information into icon packaging information; adding the icon packaging information to the respective icon packaging information sets of the display areas; sequentially screening icon packaging information with the highest priority from the icon packaging information set of each display area based on the grade information of the display areas, wherein the screening step comprises the following steps: determining target priority information with the highest priority in priority information included in all icon packaging information in the icon packaging information set, and positioning the target icon packaging information corresponding to the target priority information;
a display unit 204, configured to display icon information included in the target icon packaging information based on the position information of the display area.
In this embodiment, the dividing unit 201 divides the screen into display areas of different levels; the creating unit 202 creates a mutex manager, where the mutex manager includes information of each display area, and the information of the display area includes level information of the display area, position information of the display area, and an icon encapsulation information set of the display area; the execution unit 203 performs the following operations by the mutex manager: when the display area receives icon information, packaging the icon information and the priority information of the icon information into icon packaging information; adding the icon packaging information to the respective icon packaging information sets of the display areas; sequentially screening icon packaging information with the highest priority from the icon packaging information set of each display area based on the grade information of the display areas, wherein the screening step comprises the following steps: determining target priority information with the highest priority in priority information included in all icon packaging information in the icon packaging information set, and positioning the target icon packaging information corresponding to the target priority information; the display unit 204 displays icon information included in the target icon packaging information based on the position information of the display area. When the display area receives a plurality of icon information to be displayed, one icon information with the highest priority can be screened out through the mutual exclusion manager and displayed, and the problems that in the prior art, a plurality of icons are displayed in the same display area, so that the icon identification difficulty is high, and the operation is inconvenient are solved. Furthermore, by packaging the priority information of the icon information to the target packaged icon information, the priority information of the icon information can be quickly obtained and compared.
Since the apparatus described in the second embodiment of the present invention is an apparatus used for implementing the first embodiment of the present invention, based on the method described in the first embodiment of the present invention, those skilled in the art can understand the specific structure and the variation of the apparatus, and thus the details are not described herein. All the devices adopted in the method of the first embodiment of the present invention belong to the protection scope of the present invention.
EXAMPLE III
Based on the same inventive concept, the present embodiment provides a computer apparatus 300, as shown in fig. 3, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and capable of running on the processor 320, where when the processor 320 executes the computer program 311, all steps of the first embodiment can be implemented, and thus are not described herein again.
Example four
Based on the same inventive concept, the present embodiment provides a computer-readable storage medium 400, as shown in fig. 4, on which a computer program 411 is stored, and when the computer program 411 is executed by a processor, all steps of the first embodiment can be implemented, so that the detailed description is omitted here.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made in the embodiments of the present invention without departing from the spirit or scope of the embodiments of the invention. Thus, if such modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to encompass such modifications and variations.

Claims (7)

1. A method for displaying an icon based on a mutual exclusion manager, the method comprising:
dividing a screen into display areas with different levels;
creating a mutual exclusion manager, wherein the mutual exclusion manager comprises information of each display area, and the information of the display areas comprises grade information of the display areas, position information of the display areas and icon packaging information sets of the display areas;
performing, by the mutex manager: when the display area receives icon information, packaging the icon information and the priority information of the icon information into icon packaging information; adding the icon packaging information to the respective icon packaging information sets of the display areas; sequentially screening icon packaging information with the highest priority from the icon packaging information set of each display area based on the grade information of the display areas, wherein the screening step comprises the following steps: determining target priority information with the highest priority in priority information included in all icon packaging information in the icon packaging information set, and positioning the target icon packaging information corresponding to the target priority information;
displaying icon information included in the target icon packaging information based on the position information of the display area;
wherein, prior to the creating a mutex manager, the method further comprises:
creating a List < Wrapper > type icon packaging information set, wherein the icon packaging information in the icon packaging information set is a Wrapper type, and the Wrapper type comprises two attributes, one is integer type priority information, and the other is object type icon information;
the mutual exclusion manager represents the grade information of the display area and the position information of the display area through a position field, wherein the position field is a constant of an integer type;
wherein, the creating mutual exclusion manager specifically comprises:
MAP<int,List<Wrapper>>;
wherein, int is used to store the position information of the display area corresponding to List < Wrapper >.
2. The method of claim 1, wherein the determining of the highest priority target priority information among the priority information included in all the icon packaging information in the icon packaging information set comprises:
and determining the target priority information with the highest priority in the priority information included in all the icon packaging information in the icon packaging information set by a binary sorting method.
3. The method of claim 1, wherein prior to said encapsulating said icon information and said priority information of said icon information into icon encapsulation information, said method further comprises:
and acquiring the priority information of the icon information from a preset priority table, wherein the preset priority table is a corresponding relation between the icon information and the priority created based on the priority of the service type corresponding to the icon information.
4. The method according to any one of claims 1 to 3, wherein the dividing of the screen into display areas of different levels comprises:
the screen is divided into display areas of different levels by size.
5. An apparatus for displaying an icon based on a mutual exclusion manager, the apparatus comprising:
a dividing unit for dividing the screen into display areas of different levels;
a creating unit, configured to create a mutex manager, where the mutex manager includes information of each display area, and the information of the display area includes level information of the display area, position information of the display area, and an icon encapsulation information set of the display area;
an execution unit, configured to perform, by the mutex manager: when the display area receives icon information, packaging the icon information and the priority information of the icon information into icon packaging information; adding the icon packaging information to the respective icon packaging information sets of the display areas; sequentially screening icon packaging information with the highest priority from the icon packaging information set of each display area based on the grade information of the display areas, wherein the screening step comprises the following steps: determining target priority information with the highest priority in priority information included in all icon packaging information in the icon packaging information set, and positioning the target icon packaging information corresponding to the target priority information;
a display unit configured to display icon information included in the target icon encapsulation information based on position information of the display area;
the creating unit is further configured to create a List < Wrapper > type icon packaging information set, where the icon packaging information in the icon packaging information set is a Wrapper type, and the Wrapper type includes two attributes, one is priority information of an integer type, and the other is icon information of an object type;
the mutual exclusion manager represents the grade information of the display area and the position information of the display area through a position field, wherein the position field is a constant of an integer type;
wherein, the creating mutual exclusion manager specifically comprises:
MAP<int,List<Wrapper>>;
wherein, int is used to store the position information of the display area corresponding to List < Wrapper >.
6. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-4.
7. A computer device comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any one of claims 1-4 when executing the computer program.
CN201811158910.7A 2018-09-30 2018-09-30 Method and device for displaying icon based on mutual exclusion manager Active CN109271229B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811158910.7A CN109271229B (en) 2018-09-30 2018-09-30 Method and device for displaying icon based on mutual exclusion manager

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811158910.7A CN109271229B (en) 2018-09-30 2018-09-30 Method and device for displaying icon based on mutual exclusion manager

Publications (2)

Publication Number Publication Date
CN109271229A CN109271229A (en) 2019-01-25
CN109271229B true CN109271229B (en) 2021-11-09

Family

ID=65194983

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811158910.7A Active CN109271229B (en) 2018-09-30 2018-09-30 Method and device for displaying icon based on mutual exclusion manager

Country Status (1)

Country Link
CN (1) CN109271229B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112162664A (en) * 2020-09-04 2021-01-01 杭州运河集团文化旅游有限公司 Data billboard for intelligent fire-fighting emergency management system
CN112087546B (en) * 2020-09-11 2021-11-09 维沃移动通信有限公司 Message display method and device, electronic equipment and readable storage medium
CN114942811A (en) * 2022-05-31 2022-08-26 上海嘉车信息科技有限公司 Display interface layout method, device and system and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019508A (en) * 2012-11-20 2013-04-03 东莞宇龙通信科技有限公司 Mobile terminal and icon arrangement and display method
CN103118192A (en) * 2013-01-30 2013-05-22 东莞宇龙通信科技有限公司 Terminal equipment and display method thereof
CN106020697A (en) * 2016-05-25 2016-10-12 乐视控股(北京)有限公司 Control method and device for display elements
CN108021302A (en) * 2017-11-30 2018-05-11 维沃移动通信有限公司 A kind of display methods of application icon, terminal and computer-readable recording medium
CN108540818A (en) * 2018-04-03 2018-09-14 武汉斗鱼网络科技有限公司 Direct broadcasting room footmark setting method, device, terminal and computer-readable medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7895564B1 (en) * 2005-11-08 2011-02-22 Xilinx, Inc. Using XTables to communicate in a high level modeling system
CN106484392A (en) * 2016-09-08 2017-03-08 北京小米移动软件有限公司 icon display method and device
CN107704155A (en) * 2017-10-20 2018-02-16 珠海市魅族科技有限公司 Application program image target methods of exhibiting, device, terminal and storage medium
CN108494964B (en) * 2018-03-28 2021-01-26 努比亚技术有限公司 Mobile terminal status bar display method, terminal and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019508A (en) * 2012-11-20 2013-04-03 东莞宇龙通信科技有限公司 Mobile terminal and icon arrangement and display method
CN103118192A (en) * 2013-01-30 2013-05-22 东莞宇龙通信科技有限公司 Terminal equipment and display method thereof
CN106020697A (en) * 2016-05-25 2016-10-12 乐视控股(北京)有限公司 Control method and device for display elements
CN108021302A (en) * 2017-11-30 2018-05-11 维沃移动通信有限公司 A kind of display methods of application icon, terminal and computer-readable recording medium
CN108540818A (en) * 2018-04-03 2018-09-14 武汉斗鱼网络科技有限公司 Direct broadcasting room footmark setting method, device, terminal and computer-readable medium

Also Published As

Publication number Publication date
CN109271229A (en) 2019-01-25

Similar Documents

Publication Publication Date Title
US10936293B2 (en) Container image layer reordering
CN109271229B (en) Method and device for displaying icon based on mutual exclusion manager
EP2761443B1 (en) Methods and apparatus for general solution of the two-dimensional layout problem by reduction to a single-source path-length problem on a weighted graph
US20090094544A1 (en) Method and apparatus for selecting a layout for a user interface to display on an electronic device
US9026931B2 (en) Cross-browser “drag-and-drop” library
KR101609079B1 (en) Instruction culling in graphics processing unit
US20170337560A1 (en) System for providing and employing recommended resolution paths
US10585658B2 (en) Architectures and techniques for record protection and field management
CN106293914A (en) A kind of method of task scheduling and terminal
US11321080B2 (en) Patch package generation method and device
CN107506483A (en) Page loading method, device, electronic equipment and storage medium
EP3238019B1 (en) Least disruptive icon displacement
CN106406938A (en) Application download method and terminal
CN109343758B (en) Method and apparatus for displaying icons through a mutex manager
US9575772B2 (en) Model-based user interface
CN113641936B (en) Method, device, electronic equipment and storage medium for page skip
CN109284164B (en) Icon display method and device
CN110448895A (en) Information processing method and device in game
CN107025260A (en) Realize method, device and the electronic equipment of Web offline storages
CN116185545A (en) Page rendering method and device
US20100192074A1 (en) Pluggable margin extension
CN107402749A (en) Realize the method and device in picture loading storehouse
US10789219B1 (en) Insurance policy processing using questions sets
CN110633181B (en) Visual display method and device
CN109782978A (en) List content choosing 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