CN109343758B - Method and apparatus for displaying icons through a mutex manager - Google Patents

Method and apparatus for displaying icons through a mutex manager Download PDF

Info

Publication number
CN109343758B
CN109343758B CN201811160726.6A CN201811160726A CN109343758B CN 109343758 B CN109343758 B CN 109343758B CN 201811160726 A CN201811160726 A CN 201811160726A CN 109343758 B CN109343758 B CN 109343758B
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
CN201811160726.6A
Other languages
Chinese (zh)
Other versions
CN109343758A (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 CN201811160726.6A priority Critical patent/CN109343758B/en
Publication of CN109343758A publication Critical patent/CN109343758A/en
Application granted granted Critical
Publication of CN109343758B publication Critical patent/CN109343758B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Landscapes

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

Abstract

The invention provides a method and a device for displaying icons through 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: packaging the priority information of the icon information and the priority information of the icon information into icon packaging information, and screening the icon packaging information with the highest priority from the icon packaging information of each display area in sequence, wherein the screening step comprises the following steps: sequentially adding the icon packaging information into the icon packaging information set, and comparing the priority of the newly added icon packaging information with the priority of the existing icon packaging information in the icon packaging information set, so that only the icon packaging information with the highest priority is stored in the icon packaging information set; and displaying the icon information included in the icon packaging information with the highest priority. The icon information with the highest priority can be screened out by the mutual exclusion manager and then displayed.

Description

Method and apparatus for displaying icons through a mutex manager
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for displaying icons through 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 through 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 through 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 priority information of the icon information into icon packaging information, and sequentially screening the icon packaging information with the highest priority from the icon packaging information of each display area based on the grade information of the display area, wherein the screening step comprises the following steps: sequentially adding the icon packaging information into the icon packaging information set, and comparing the priority of the newly added icon packaging information with the priority of the existing icon packaging information in the icon packaging information set based on the priority information included in the icon packaging information, so that only the icon packaging information with the highest priority is stored in the icon packaging information set;
and displaying the icon information included in the icon packaging information with the highest priority 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 set of icon packaging information of List < Wrapper > type, wherein the icon packaging information in the set of icon packaging information is Wrapper type, and the Wrapper type comprises two attributes, one is priority information of integer type, and the other is image information of object type.
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 associates, by a MAP object, the level information of the display area, the position information of the display area, and the icon encapsulation information set of the display area.
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 with different priorities 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 through 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 priority information of the icon information into icon packaging information, and sequentially screening the icon packaging information with the highest priority from the icon packaging information of each display area based on the grade information of the display area, wherein the screening step comprises the following steps: sequentially adding the icon packaging information into the icon packaging information set, and comparing the priority of the newly added icon packaging information with the priority of the existing icon packaging information in the icon packaging information set based on the priority information included in the icon packaging information, so that only the icon packaging information with the highest priority is stored in the icon packaging information set;
and the display unit is used for displaying the icon information included in the icon packaging information with the highest priority 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 image 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 of the above-mentioned method for displaying an icon by 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 method for displaying an icon through a mutual exclusion manager.
In the method for displaying icons through the mutual exclusion manager provided by the embodiment of the invention, a screen is divided 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 priority information of the icon information into icon packaging information, and sequentially screening the icon packaging information with the highest priority from the icon packaging information of each display area based on the grade information of the display area, wherein the screening step comprises the following steps: sequentially adding the icon packaging information into the icon packaging information set, and comparing the priority of the newly added icon packaging information with the priority of the existing icon packaging information in the icon packaging information set based on the priority information included in the icon packaging information, so that only the icon packaging information with the highest priority is stored in the icon packaging information set; and displaying the icon information included in the icon packaging information with the highest priority 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, when the icon packaging information is added, the priority information included in the icon packaging information is compared, so that only the icon packaging information with the highest priority is stored in the icon packaging information set in the set, and the icon packaging information with the highest priority can be quickly obtained.
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 flow diagram illustrating a method for displaying icons via a mutual exclusion manager in accordance with an embodiment of the present application;
FIG. 2 is a block diagram illustrating an apparatus for displaying icons via a mutex 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 through 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 priority information of the icon information into icon packaging information, and sequentially screening the icon packaging information with the highest priority from the icon packaging information of each display area based on the grade information of the display area, wherein the screening step comprises the following steps: sequentially adding the icon packaging information into the icon packaging information set, and comparing the priority of the newly added icon packaging information with the priority of the existing icon packaging information in the icon packaging information set based on the priority information included in the icon packaging information, so that only the icon packaging information with the highest priority is stored in the icon packaging information set; and displaying the icon information included in the icon packaging information with the highest priority 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, when the icon packaging information is added, the priority information included in the icon packaging information is compared, so that only the icon packaging information with the highest priority is stored in the icon packaging information set in the set, and the icon packaging information with the highest priority can be quickly obtained.
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 through 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 priority information of the icon information into icon packaging information, and sequentially screening the icon packaging information with the highest priority from the icon packaging information of each display area based on the grade information of the display area, wherein the screening step comprises the following steps: and sequentially adding the icon packaging information into the icon packaging information set, and comparing the priority of the newly added icon packaging information with the priority of the existing icon packaging information in the icon packaging information set based on the priority information included in the icon packaging information, so that only the icon packaging information with the highest priority is stored in the icon packaging information set.
After the mutual exclusion manager is created through the above steps, the icon information of each display area can be managed uniformly through the mutual exclusion manager, when the display area receives 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.
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.
The specific screening steps include: and sequentially adding the icon packaging information to the icon packaging information set, wherein the specific implementation includes, for example: 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. And comparing the priority of the newly added icon packaging information with the priority of the existing icon packaging information in the icon packaging information set based on the priority information included in the icon packaging information, replacing the existing icon packaging information with the newly added icon packaging information if the priority of the newly added icon packaging information is higher than the priority of the existing icon packaging information, and reserving the existing icon packaging information without adding the new icon packaging information if the priority of the newly added icon packaging information is lower than the priority of the existing icon packaging information, so that only the icon packaging information with the highest priority is stored in the icon packaging information set. Before comparing the priority of the newly added icon packaging information with the priority of the existing icon packaging information in the icon packaging information set, the priority information, namely level field information, included in the two pieces of icon packaging information needs to be acquired, and then the priority of the two pieces of icon packaging information is determined by comparing the level field information. It can be understood that when the first icon package information is added, since there is no element in the icon package information set, the comparison is not needed at this time, and the first icon package information is directly added.
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 icon packaging information with the highest priority 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 icon package information of the highest priority screened out based on the priority information is the icon information of the highest priority. Then, the icon information included in the highest priority icon packaging information is displayed based on the position information of the display area, that is, the highest priority icon information 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 two display areas with different levels, wherein one display area 1 with the level 1 is positioned at the upper half part of the screen, and the other display area 2 with the level 2 is positioned at the lower half part of the screen, and the lower the number of the level is, the higher the level is. When the display area 1 and the display area 2 receive a plurality of icon information, since the display area 1 is ranked higher than the display area 2, the mutex manager processes the icon information of the display area 1 with the highest ranking first. The display area 1 receives guess activity icon information with the priority of 4 sent by the server and lottery activity icon information with the priority of 5 sent by the background, and mutual exclusion management packages the two icon information and the priority information of the two icon information into icon packaging information and then adds the icon packaging information into an icon packaging information set of the display area 1 one by one. The display area 1 randomly adds the icon packaging information corresponding to the guess activity to the icon packaging information set, then when the icon packaging information corresponding to the lottery activity is added to the icon packaging information set, obtains priority information 5 included in the newly added icon packaging information and priority information 4 of the existing icon packaging information, wherein the priority is higher when the number of the priority is larger, and 5 is larger than 4, so that the priority of the newly added icon packaging information is higher than that of the existing icon packaging information, and the existing icon packaging information is replaced by the newly added icon packaging information which is the icon packaging information with the highest priority. Finally, icon information included in the icon package information having the highest priority, i.e., icon information of the lottery event, is displayed in the display area 1, i.e., the upper half of the screen. Similarly, the icon packaging information with the highest priority in the display area 2 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 priority information of the icon information into icon packaging information, and sequentially screening the icon packaging information with the highest priority from the icon packaging information of each display area based on the grade information of the display area, wherein the screening step comprises the following steps: sequentially adding the icon packaging information into the icon packaging information set, and comparing the priority of the newly added icon packaging information with the priority of the existing icon packaging information in the icon packaging information set based on the priority information included in the icon packaging information, so that only the icon packaging information with the highest priority is stored in the icon packaging information set; and displaying the icon information included in the icon packaging information with the highest priority 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, when the icon packaging information is added, the priority information included in the icon packaging information is compared, so that only the icon packaging information with the highest priority is stored in the icon packaging information set in the set, and the icon packaging information with the highest priority can be quickly obtained.
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 an apparatus for displaying an icon through a mutex manager, referring to fig. 2, the apparatus including:
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 priority information of the icon information into icon packaging information, and sequentially screening the icon packaging information with the highest priority from the icon packaging information of each display area based on the grade information of the display area, wherein the screening step comprises the following steps: sequentially adding the icon packaging information into the icon packaging information set, and comparing the priority of the newly added icon packaging information with the priority of the existing icon packaging information in the icon packaging information set based on the priority information included in the icon packaging information, so that only the icon packaging information with the highest priority is stored in the icon packaging information set;
a display unit 204, configured to display icon information included in the icon packaging information with the highest priority 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 priority information of the icon information into icon packaging information, and sequentially screening the icon packaging information with the highest priority from the icon packaging information of each display area based on the grade information of the display area, wherein the screening step comprises the following steps: sequentially adding the icon packaging information into the icon packaging information set, and comparing the priority of the newly added icon packaging information with the priority of the existing icon packaging information in the icon packaging information set based on the priority information included in the icon packaging information, so that only the icon packaging information with the highest priority is stored in the icon packaging information set; the display unit 204 displays icon information included in the icon packaging information having the highest priority 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, when the icon packaging information is added, the priority information included in the icon packaging information is compared, so that only the icon packaging information with the highest priority is stored in the icon packaging information set in the set, and the icon packaging information with the highest priority can be quickly obtained.
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 (9)

1. A method for displaying an icon via a mutex 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 priority information of the icon information into icon packaging information, and sequentially screening the icon packaging information with the highest priority from the icon packaging information of each display area based on the grade information of the display area, wherein the screening step comprises the following steps: sequentially adding the icon packaging information into the icon packaging information set, and comparing the priority of the newly added icon packaging information with the priority of the existing icon packaging information in the icon packaging information set based on the priority information included in the icon packaging information, so that only the icon packaging information with the highest priority is stored in the icon packaging information set;
displaying icon information included in the icon packaging information with the highest priority based on the position information of the display area;
and the mutual exclusion manager combines the grade information of the display area, the position information of the display area and the icon packaging information set of the display area through a MAP object.
2. The method of claim 1, wherein prior to said creating a mutex manager, the method further comprises:
creating a set of icon packaging information of List < Wrapper > type, wherein the icon packaging information in the set of icon packaging information is Wrapper type, and the Wrapper type comprises two attributes, one is priority information of integer type, and the other is image information of object type.
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 of claim 1, wherein the mutex manager represents the level information of the display area and the position information of the display area through a position field, and wherein the position field is a constant of an integer type.
5. The method according to any one of claims 1 to 4, wherein the dividing of the screen into display regions with different priorities comprises:
the screen is divided into display areas of different levels by size.
6. An apparatus for displaying icons through a mutex 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 priority information of the icon information into icon packaging information, and sequentially screening the icon packaging information with the highest priority from the icon packaging information of each display area based on the grade information of the display area, wherein the screening step comprises the following steps: sequentially adding the icon packaging information into the icon packaging information set, and comparing the priority of the newly added icon packaging information with the priority of the existing icon packaging information in the icon packaging information set based on the priority information included in the icon packaging information, so that only the icon packaging information with the highest priority is stored in the icon packaging information set;
and the display unit is used for displaying the icon information included in the icon packaging information with the highest priority based on the position information of the display area.
7. The apparatus according to claim 6, wherein said creating unit is further configured to create a set of icon packaging information of List < Wrapper > type, the icon packaging information in the set of icon packaging information being of Wrapper type, the Wrapper type including two attributes, one being priority information of integer type, and the other being image information of object type.
8. 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-5.
9. 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-5 when executing the computer program.
CN201811160726.6A 2018-09-30 2018-09-30 Method and apparatus for displaying icons through a mutex manager Active CN109343758B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811160726.6A CN109343758B (en) 2018-09-30 2018-09-30 Method and apparatus for displaying icons through a mutex manager

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811160726.6A CN109343758B (en) 2018-09-30 2018-09-30 Method and apparatus for displaying icons through a mutex manager

Publications (2)

Publication Number Publication Date
CN109343758A CN109343758A (en) 2019-02-15
CN109343758B true CN109343758B (en) 2021-01-01

Family

ID=65308147

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811160726.6A Active CN109343758B (en) 2018-09-30 2018-09-30 Method and apparatus for displaying icons through a mutex manager

Country Status (1)

Country Link
CN (1) CN109343758B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115328483B (en) * 2022-08-22 2024-03-19 北京达佳互联信息技术有限公司 Management method and device for business function entry, electronic equipment and storage medium

Citations (2)

* 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
CN103460171A (en) * 2011-04-11 2013-12-18 微软公司 Three-dimensional icons for organizing, invoking, and using applications

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103118192B (en) * 2013-01-30 2016-05-04 东莞宇龙通信科技有限公司 The display methods of terminal device and terminal device
CN106020697A (en) * 2016-05-25 2016-10-12 乐视控股(北京)有限公司 Control method and device for display elements
CN108021302B (en) * 2017-11-30 2019-10-18 维沃移动通信有限公司 A kind of display methods of application icon, terminal and computer readable storage medium
CN108540818B (en) * 2018-04-03 2020-09-08 武汉斗鱼网络科技有限公司 Live broadcast room corner mark setting method and device, terminal and computer readable medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103460171A (en) * 2011-04-11 2013-12-18 微软公司 Three-dimensional icons for organizing, invoking, and using applications
CN103019508A (en) * 2012-11-20 2013-04-03 东莞宇龙通信科技有限公司 Mobile terminal and icon arrangement and display method

Also Published As

Publication number Publication date
CN109343758A (en) 2019-02-15

Similar Documents

Publication Publication Date Title
US10528337B1 (en) Container image layer reordering
CN109271229B (en) Method and device for displaying icon based on mutual exclusion manager
CN109582403B (en) Linkage display method and device for components in diagram
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
US11119749B2 (en) Architectures and techniques for record protection and field management
WO2017200775A1 (en) System for providing and employing recommended resolution paths
CN107506483A (en) Page loading method, device, electronic equipment and storage medium
CN105786301A (en) Method and apparatus for switching display object under multi-window system
CN111324471A (en) Service adjusting method, device, equipment and storage medium
EP3238019B1 (en) Least disruptive icon displacement
CN109343758B (en) Method and apparatus for displaying icons through a mutex manager
US9575772B2 (en) Model-based user interface
CN113741757B (en) Method and device for displaying reminding information, electronic equipment and storage medium
CN113641936B (en) Method, device, electronic equipment and storage medium for page skip
CN109284164B (en) Icon display method and device
US20210049134A1 (en) Insurance policy processing using questions sets
CN116719591A (en) Stock right map display method and device, storage system and electronic equipment
CN116185545A (en) Page rendering method and device
US11281443B1 (en) Organizing deployment packages for software applications and services
CN115187097A (en) Task scheduling method and device, electronic equipment and computer storage medium
CN110633181B (en) Visual display method and device
CN113961296B (en) Page element layout method and device, readable medium and electronic equipment
CN109358899B (en) Method and device for updating resource versions in shared shelf
CN110333920B (en) Method and related device for updating icon
US20230409409A1 (en) Site convergence agent and associated method

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