CN113126854B - Menu display method and device and electronic equipment - Google Patents

Menu display method and device and electronic equipment Download PDF

Info

Publication number
CN113126854B
CN113126854B CN201911410743.5A CN201911410743A CN113126854B CN 113126854 B CN113126854 B CN 113126854B CN 201911410743 A CN201911410743 A CN 201911410743A CN 113126854 B CN113126854 B CN 113126854B
Authority
CN
China
Prior art keywords
component
assembly
target
components
menu
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
CN201911410743.5A
Other languages
Chinese (zh)
Other versions
CN113126854A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201911410743.5A priority Critical patent/CN113126854B/en
Publication of CN113126854A publication Critical patent/CN113126854A/en
Application granted granted Critical
Publication of CN113126854B publication Critical patent/CN113126854B/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/0482Interaction with lists of selectable items, e.g. menus

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 application discloses a menu display method and device and electronic equipment, and relates to the technical field of display. The specific implementation scheme is as follows: acquiring a first operation provided by a first component through the first component under the condition that a first input associated with the first component is received in a first interface; under the condition that the first interface comprises a second assembly, if the second assembly receives an operation entry of a first operation transmitted by the first assembly, acquiring a second operation provided by the second assembly through the second assembly, wherein the first assembly is nested in the second assembly; and putting the operation inlet of the first operation and the operation inlet of the second operation into the first menu, and displaying the first menu. The first component and the second component respectively acquire the operation which can be provided by the first component, and the first component transmits the first operation which can be provided by the first component to the second component which is nested in the first component, so that the complexity of the components in the process of acquiring the operation which can be provided can be reduced, and the menu display efficiency is improved.

Description

Menu display method and device and electronic equipment
Technical Field
The present application relates to the field of display technologies in computer technologies, and in particular, to a menu display method and apparatus, and an electronic device.
Background
In some applications, some commonly used operation entries are placed in a menu. For example, when a user performs an operation in an application interface, for example, right mouse button clicking, the application may analyze a clicked position and scene, generate an operation that can be performed by the current user according to the context information, and then put entries of the operations into a menu and pop up, so that the user can perform the operation in the menu.
However, in the process of displaying a menu, since one interface may relate to a plurality of components, and nested relationships exist among the components, when an operation is performed at a certain position, the component corresponding to the operation needs to analyze the operations of all components related to the component, and the process is complex, which easily results in poor menu display efficiency.
Disclosure of Invention
The application provides a menu display method and device and electronic equipment, and aims to solve the problem of poor menu display efficiency.
In a first aspect, an embodiment of the present application provides a menu display method, including:
acquiring a first operation provided by a first component through the first component under the condition that a first input associated with the first component is received in a first interface;
Under the condition that the first interface comprises a second assembly, if the second assembly receives an operation entrance of the first operation transmitted by the first assembly, acquiring a second operation provided by the second assembly through the second assembly, wherein the first assembly is nested in the second assembly;
and putting the operation inlet of the first operation and the operation inlet of the second operation into a first menu, and displaying the first menu.
According to the menu display method provided by the embodiment of the application, after a first input in a first interface is received, a first component related to the first input acquires a first operation which can be provided by the first component, then an operation inlet of the first component is transmitted to a second component, the second component acquires a second operation which can be provided by the second component, and it can be understood that the first component and the second component do not need to analyze operations which can be provided by components other than the first component, the first component and the second component acquire the operations which can be provided by the first component, and the first component transmits the first operation which can be provided by the first component to the second component which is nested in the first component.
Optionally, the number of the second assemblies is N, where N is an integer greater than 1, and the N second assemblies are sequentially nested;
if the second component receives the operation entry of the first operation transmitted by the first component, acquiring, by the second component, a second operation provided by the second component, including:
if the target assembly receives an operation entry transmitted by a sub-assembly of the target assembly, acquiring a second operation provided by the target assembly through the target assembly;
the target assembly is any one of the N second assemblies, the subassembly of the target assembly is nested in the target assembly, the operation entry passed by the subassembly of the target assembly comprises the operation entry of the second operation provided by the subassembly of the target assembly and the operation entry passed by the subassembly of the target assembly in the N second assemblies and the first assembly to the subassembly of the target assembly, the subassembly of the bottom layer assembly in the N second assemblies is the first assembly, and the operation entry passed by the first assembly to the bottom layer assembly is the operation entry of the first operation provided by the first assembly.
Through the process, any one of the N second components can analyze the operation which can be provided by the component, namely, the second operation which can be provided by the component is obtained, the transferred operation is received from the sub-component of the component, and the operation is provided by the component which is lower than the nesting level of the component, the operation provided by the component is not needed to be analyzed, the analysis of the provided operation by the component is reduced, and the menu display efficiency is improved.
Optionally, if the N second components include a parent component of the target component, the target component transfers an operation entry of the second operation provided by the target component and a received operation entry transferred by a child component of the target component to the parent component of the target component in the N second components.
The operation entry of the second operation provided by the target assembly and the received operation entry transferred by the sub-assembly of the target assembly are transferred to the parent assembly of the target assembly in the N second assemblies through the target assembly so as to finish transferring the operation entry provided by the assembly with the nesting level lower than that of the parent assembly of the target assembly to the parent assembly of the target assembly, therefore, the parent assembly of the target assembly does not need to analyze the operation provided by the assembly with the nesting level lower than that of the parent assembly of the target assembly, the analysis difficulty of the assembly on the operation is reduced, and the menu display efficiency is improved.
Optionally, the placing the operation entry of the first operation and the operation entry of the second operation into a first menu, and displaying the first menu includes:
putting the operation inlet of the first operation and the operation inlets of the second operations of the N second assemblies into the first menu through a top-layer assembly, and displaying the first menu;
Wherein the other of the N second assemblies is nested in the topping assembly, the other assembly being an assembly of the N second assemblies other than the topping assembly.
Therefore, the operation entry of the first operation and the operation entries of the second operations of the N second assemblies are placed in the first menu through one top-layer assembly, so that the integrity of the operation entries in the first menu is improved.
In a second aspect, an embodiment of the present application further provides a menu display apparatus, including:
the first acquisition module is used for acquiring a first operation provided by a first component through the first component under the condition that a first input associated with the first component is received in a first interface;
the second obtaining module is used for obtaining a second operation provided by a second component through the second component if the second component receives an operation entry of the first operation transmitted by the first component under the condition that the first interface comprises the second component, wherein the first component is nested in the second component;
and the processing module is used for putting the operation inlet of the first operation and the operation inlet of the second operation into a first menu and displaying the first menu.
Optionally, the number of the second assemblies is N, where N is an integer greater than 1, and the N second assemblies are sequentially nested;
the second obtaining module is used for obtaining a second operation provided by the target assembly through the target assembly if the target assembly receives the operation entrance transmitted by the sub-assembly of the target assembly;
the target assembly is any one of the N second assemblies, the subassembly of the target assembly is nested in the target assembly, the operation entry passed by the subassembly of the target assembly comprises the operation entry of the second operation provided by the subassembly of the target assembly and the operation entry passed by the subassembly of the target assembly in the N second assemblies and the first assembly to the subassembly of the target assembly, the subassembly of the bottom layer assembly in the N second assemblies is the first assembly, and the operation entry passed by the first assembly to the bottom layer assembly is the operation entry of the first operation provided by the first assembly.
Optionally, if the N second components include a parent component of the target component, the target component transfers an operation entry of a second operation provided by the target component and a received operation entry transferred by a child component of the target component to the parent component of the target component in the N second components.
Optionally, the processing module includes:
putting the operation entrance of the first operation and the operation entrances of the second operations of the N second assemblies into the first menu through a top-layer assembly, and displaying the first menu;
wherein the other of the N second assemblies is nested in the topping assembly, the other assembly being an assembly of the N second assemblies other than the topping assembly.
In a third aspect, an embodiment of the present application further provides an electronic device, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the methods provided by the embodiments of the present application.
In a fourth aspect, an embodiment of the present application further provides a non-transitory computer readable storage medium storing computer instructions, wherein the computer instructions are configured to cause the computer to perform the method provided by the embodiments of the present application.
In a fifth aspect, an embodiment of the present application further provides a computer program product, which includes a computer program that, when being executed by a processor, implements the method provided by the embodiments of the present application.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be considered limiting of the present application. Wherein:
FIG. 1 is a schematic flow chart diagram of a menu display method according to one embodiment of the present application;
FIG. 2 is a schematic diagram of a menu display method according to one embodiment of the present application;
fig. 3 is a block diagram of a menu display apparatus for implementing a menu display method of an embodiment of the present application;
fig. 4 is a block diagram of an electronic device that can implement the menu display method according to the embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
As shown in fig. 1, according to an embodiment of the present application, there is provided a menu display method applicable to an electronic device, including:
step 101: in the case that a first input associated with the first component is received in the first interface, a first operation provided by the first component is acquired through the first component.
The first interface may be an interface of an application, a system desktop, a web page, and the like, and one interface may include multiple components.
In some applications, for example, Web applications, etc., in order to provide convenience for a user, operation entries for some operations may be put into a menu, the menu is displayed, after the user triggers the display of the menu, the user may perform operations in the menu, and when a desired operation entry is selected, an operation corresponding to the selected operation entry may be performed.
In the process of performing the first input in the first interface, the first input has a corresponding position in the first interface, for example, the first input corresponds to the first position and is the first input at the first position in the first interface. For example, the first input is performed at a point a in the first interface, the associated first component is a component 1, and the first input is performed at a point B in the first interface, and the associated first component is a component 2. Upon receiving the first input, its associated first component may be determined. In the case of receiving a first input to the first interface associated with the first component, the first component analyzes the operations that the first component can perform, and the first component obtains the first operations that the first component can provide. For example, a first input is made in a status bar in a browser webpage, an associated first component analyzes operations that can be made by the first input, and the obtained first component can provide first operations such as displaying a search bar, displaying an avatar, and the like. For another example, a first input (e.g., right click) is performed in an input area of an opened word interface, the associated first component analyzes the operation that can be performed by the first component, and the obtained first operation that can be provided by the first component may be inserting a symbol, pasting, and the like.
Step S102: under the condition that the first interface comprises the second assembly, if the second assembly receives the operation entrance of the first operation transmitted by the first assembly, the second assembly acquires a second operation provided by the second assembly.
Wherein the first assembly is nested in the second assembly. In this embodiment, it needs to be detected whether the components related to the first interface include a second component that has a nesting relationship with the first component and is nested with the first component, if such a second component exists, after the first component obtains the first operation, the first component may transfer the operation entry of the first operation to the second component, and after the second component receives the operation entry of the first operation transferred by the first component, the second component may analyze the operation that can be provided by itself, and the second component itself obtains the second operation that can be provided by the second component, where each second operation has a corresponding operation entry.
Step S103: and putting the operation entrance of the first operation and the operation entrance of the second operation into the first menu, and displaying the first menu.
The user may execute the second operation in response to the input to the operation entry of the second operation by inputting, for example, clicking, the operation entry of the second operation. For example, the paste entry may be clicked to perform the paste. After the first component acquires the first operation and the second component acquires the second operation, the operation entry of the first operation and the operation entry of the second operation can be placed in the first menu, and the first menu is displayed for the user to view so that the user can operate in the menu.
According to the menu display method provided by the embodiment of the application, after a first input in a first interface is received, a first component related to the first input acquires a first operation which can be provided by the first component, then an operation inlet of the first component is transmitted to a second component, the second component acquires a second operation which can be provided by the second component, and it can be understood that the first component and the second component do not need to analyze operations which can be provided by components other than the first component, the first component and the second component acquire the operations which can be provided by the first component, and the first component transmits the first operation which can be provided by the first component to the second component which is nested in the first component.
In one embodiment, the number of the second assemblies is N, N is an integer greater than 1, and the N second assemblies are nested in sequence.
In this embodiment, if the second component receives the operation entry of the first operation transmitted by the first component, the obtaining, by the second component, the second operation provided by the second component includes: and if the target component receives the operation entrance transmitted by the sub-component of the target component, acquiring a second operation provided by the target component through the target component.
The target assembly is any one of the N second assemblies, the subassembly of the target assembly is nested in the target assembly, the operation entrance transmitted by the subassembly of the target assembly comprises the operation entrance of the second operation provided by the subassembly of the target assembly and the operation entrance transmitted by the N second assemblies and the subassembly of the target assembly in the first assembly to the subassembly of the target assembly, the subassemblies of the underlayer assembly in the N second assemblies are the first assemblies, and the operation entrance transmitted by the first assembly to the underlayer assembly is the operation entrance of the first operation provided by the first assembly.
The first assembly is nested in the second assembly, and it is understood that the first assembly and the second assembly have a nesting relationship, and the nesting level of the second assembly in the nesting relationship is higher than that of the first assembly. In this embodiment, the number of the second assemblies is multiple, the N second assemblies are sequentially nested, the first assembly can be directly nested in a bottom assembly of the N second assemblies, the bottom assembly is a parent assembly of the first assembly and is an assembly with the lowest nesting level in the nesting relation of the N second assemblies, the bottom assembly is an assembly, except for the bottom assembly, nested in the N second assemblies, and the first assembly is indirectly nested in the assemblies, except for the bottom assembly, of the N second assemblies.
In this embodiment, a first input related to a first component is received, if the first component is nested in N second components that are sequentially nested, the first component first transfers an operation entry of a first operation to a bottom component, a sub-component of the bottom component is the first component, a parent component of the first component is the bottom component, the bottom component can obtain a second operation provided by the bottom component after receiving the operation entry of the first operation, the bottom component can transfer an operation entry of the second operation provided by the bottom component and an operation entry of the first operation transferred by the first component together to the middle bottom component of the N second components, the bottom component is a sub-component of the parent component of the bottom component, the parent component of the bottom component also obtains a second operation provided by the bottom component after receiving the operation entry of the second operation provided by the bottom component, and the parent component of the bottom component can transfer an operation entry of the second operation provided by the bottom component together with an operation entry transferred by the bottom component to the parent component of the N second components And repeating the operation of the parent component, and repeating the operation until the second component with the highest nesting level in the N second components receives the operation entry transferred by the sub component, and obtaining the second operation provided by the second component after the second component with the highest nesting level receives the operation entry transferred by the sub component. In this embodiment, the operation entries passed by the subassembly thereof received by the second highest nested level include the operation entry of the first operation provided by the first component.
Since the subassembly of the bottom-layer assembly in the N second assemblies is the first assembly, and the subassembly of the bottom-layer assembly does not exist in the N second assemblies and the first assembly, if the target assembly is the bottom-layer assembly, the operation entry for transferring the subassembly of the bottom-layer assembly can be understood as empty, the operation entry for transferring the subassembly of the target assembly comprises the operation entry for the second operation provided by the subassembly of the target assembly, and since the subassembly of the target assembly is the first assembly, the operation entry for the second operation provided by the subassembly of the target assembly is the operation entry for the first operation provided by the first assembly, it can be understood that the operation entry for transferring the subassembly of the bottom-layer assembly comprises the operation entry for the first operation transferred by the first assembly.
Through the process, any one of the N second assemblies can analyze the operation provided by the assembly, namely the second operation provided by the assembly is obtained, the operation entry provided by other assemblies lower than the nesting level of the assembly and transmitted by the sub-assembly of the assembly is received, the operation provided by other assemblies except the assembly is not required to be analyzed, the analysis difficulty of the assembly on the operation is reduced, and therefore the menu display efficiency is improved.
In one embodiment, if the parent component of the target component is included in the N second components, the target component transfers the operation entry of the second operation provided by the target component and the received operation entry transferred by the sub component of the target component to the parent component of the target component in the N second components.
For the target component, if the parent component exists in the N second components, that is, the second component indicates that the target component is not the second component with the highest nesting level, in this case, the target component may not only receive the operation entry passed by the child component of the target component and obtain the second operation provided by itself, but also pass the operation entry of the second operation provided by the target component and the received operation entry passed by the child component of the target component to the parent component of the target component in the N second components. If the parent component of the target component is not included in the N second components, that is, it indicates that the parent component of the target component is not included in the N second components, it can be understood that the target component is a second component with the highest nesting level in the N second components, and it is only necessary to obtain the second operation provided by the target component without transferring the operation entry of the second operation provided by the target component and the operation entry transferred by the received sub-component of the target component.
The operation entry of the second operation provided by the target assembly and the received operation entry transferred by the sub-assembly of the target assembly are transferred to the parent assembly of the target assembly in the N second assemblies through the target assembly so as to finish transferring the operation entry provided by the assembly with the nesting level lower than that of the parent assembly of the target assembly to the parent assembly of the target assembly, therefore, the parent assembly of the target assembly does not need to analyze the operation provided by the assembly with the nesting level lower than that of the parent assembly of the target assembly, the analysis difficulty of the assembly on the operation is reduced, and the menu display efficiency is improved.
In one embodiment, putting an operation entry of a first operation and an operation entry of a second operation into a first menu and displaying the first menu includes: putting an operation inlet of a first operation and operation inlets of second operations of N second assemblies into a first menu through the top assembly, and displaying the first menu; and the other assemblies in the N second assemblies are nested in the top assembly, and the other assemblies are the assemblies except the top assembly in the N second assemblies.
The top-level component is a second component with the highest nesting level in the N second components, can receive the operation entries of the second operations provided by the other transferred components and the operation entry of the first operation provided by the first component, can analyze the operation provided by the top-level component, and obtains the operation entry of the second operation provided by the top-level component, that is, the top-level component can obtain the operation entry of the first operation and the operation entries of the second operations of the N second components, so that the operation entry of the first operation and the operation entries of the second operations of the N second components can be placed into the first menu through the top-level component, and the first menu is displayed.
Therefore, the operation entrance of the first operation and the operation entrances of the second operations of the N second assemblies are placed in the first menu through one top-level assembly, so that the integrity of the operation entrance in the first menu is improved.
The process of displaying the menu is described in detail below with an embodiment. Take the first interface as an application interface as an example.
As shown in fig. 2, the plurality of components involved in the application interface include a component 1, a component 2, a component 3, a component 4, and the like, and the abstract structure of the application interface may be embodied in the form of a plurality of components, where the plurality of components have a nested relationship. For example, as shown in FIG. 2, module 4 is nested within module 3, or can be juxtaposed with module 3, i.e., at the same level of nesting, module 3 is nested within module 2, and module 2 is nested within module 1.
If a trigger event (i.e. the first input) is performed at point a associated with component 4, component 4 will first receive the trigger event and analyze the operation that can be provided by its current state, the component finds its parent component 3, and component 4 passes the operation entry of the operation provided by component 4 to component 3. Component 4 need not analyze the operations provided by all components associated with component 4 (i.e., component 3, component 2, and component 1), but rather component 4 analyzes the operations provided by component 4 and passes the operational entry of the operations provided by it to its parent component 3.
After receiving the operation entry passed by the component 4, the component 3 analyzes the operation which can be provided by itself, and the component 3 can transfer the operation entry of the operation which is provided by itself and the operation entry passed by the component 4 to the component 2. After receiving the operation entry transferred by the component 3, the component 2 analyzes the operation which can be provided by itself, and the component 2 can transfer the operation entry of the operation which is provided by itself and the operation entry transferred by the component 3 to the component 1. After receiving the operation entry transmitted by the component 2, the component 1 analyzes the operation which can be provided by the component 1, the component 1 does not have a parent component, the component 1 puts the operation entry transmitted by the component 2 and the operation entry of the operation provided by the component 1 into a first menu (context menu), and pops up the first menu to allow a user to operate. The first menu popped up at this time contains operation entries for all operations that can be provided by the component 1, the component 2, the component 3, and the component 4. It should be noted that the operation entry may be a control or the like.
If a trigger event is performed at point B associated with component 4, component 4 will first receive the trigger event and analyze the operation that can be provided by its current state, the component finds its parent component 2, and component 4 passes the operation entry of the operation provided by component 4 to component 2. Component 4 need not analyze the operations provided by all components associated with component 4 (i.e., component 2 and component 1), but rather component 4 analyzes the operations provided by component 4 and passes the operational entry of the operations provided by it to its parent component 2.
After receiving the operation entry transmitted by the component 4, the component 2 analyzes the operation which can be provided by itself, and the component 2 can transmit the operation entry of the operation which is provided by itself and the operation entry transmitted by the component 4 to the component 1. After receiving the operation entry transmitted by the component 2, the component 1 analyzes the operation which can be provided by the component 1, the component 1 does not have a parent component, the component 1 puts the operation entry transmitted by the component 2 and the operation entry of the operation provided by the component 1 into a first menu, and pops up the first menu to allow a user to operate. The first menu popped up at this time contains operation entries for all operations that can be provided by the component 1, the component 2, and the component 4.
In development, the code logic of the same component is generally multiplexed, and the final presentation is determined according to different incoming parameters and data. The conventional method requires adding the code logic of all components related to one component to the code of the component. The code logic of component 1 and component 2 is also needed, for example, in the code of component 3 to make decisions on the state and behavior of component 1 and component 2. It is necessary to take into account and handle all of its parent components when developing a new component 4. This can be a very cumbersome process when the variety and hierarchy of components is large. And the nesting relationships between components may not be uniform. If the assembly 4 in fig. 2 can be nested in the assembly 3 or can be parallel to the assembly 3, and the nesting relationship of the assembly 4 is not fixed, the conventional implementation method is more limited. If the nesting relation of the components is changed, the generation logic of the menu in each component needs to be reformed again. Due to the fact that the coupling degree of the components is too high, development, maintenance and expansion are not easy, flexible use of the components on a nesting level cannot be achieved, and therefore generation and display of menus cannot be achieved flexibly.
Based on the consideration of the above problems, in the technical solution of the present application, after an event is triggered in a certain component, only the analysis related to the component is performed in the component, an operation entry of an operation that can be processed by the component is generated, and the operation entry is transferred to a parent component directly nested in the component. The parent component only analyzes and generates operation entries related to the parent component, and then continues to deliver to the upper level. And after the top-most component (the component with the highest nested level) receives the passed operation entry and performs analysis related to the component, generating an operation entry, and then generating a first menu and popping up the first menu.
In the technical scheme of the application, the code of each component only needs to realize the state analysis of the component after receiving an event, generate the operation entry and transmit the operation entry provided by the operation entry and the received operation entry transmitted by the sub-component of the operation entry to the parent component. When a component is newly developed, the nesting relation of the components in actual use is not required to be considered, and the analysis and operation entry generation of the rest components in the first interface is not required to be processed. Even if the number of components is large, the complexity and flexibility of the nesting relation do not influence the complexity of the development of new components. When the nesting relation of the components is changed such as newly adding, deleting and adjusting, the related code logic of the existing components and the newly added components does not need to be adjusted. When a certain component is used, no matter what nesting relation the component is in, the operation provided by the component and the operation entry are only needed to be analyzed, the operation of other components is not needed to be analyzed, and the first menu can be flexibly generated.
As shown in fig. 3, in one embodiment, the present application further provides a menu display apparatus 300 applicable to an electronic device, the apparatus including:
a first obtaining module 301, configured to obtain, by a first component, a first operation provided by the first component when a first input associated with the first component is received in a first interface;
the second obtaining module 302 is configured to, if the first interface includes a second component, obtain, through the second component, a second operation provided by the second component if the second component receives an operation entry of the first operation delivered by the first component, where the first component is nested in the second component;
the processing module 303 is configured to put an operation entry of the first operation and an operation entry of the second operation into the first menu, and display the first menu.
In one embodiment, the number of the second assemblies is N, N is an integer greater than 1, and the N second assemblies are nested in sequence;
the second acquisition module is used for acquiring a second operation provided by the target assembly through the target assembly if the target assembly receives the operation entrance transmitted by the sub-assembly of the target assembly;
the target assembly is any one of the N second assemblies, the subassembly of the target assembly is nested in the target assembly, the operation entrance transmitted by the subassembly of the target assembly comprises the operation entrance of the second operation provided by the subassembly of the target assembly and the operation entrance transmitted by the N second assemblies and the subassembly of the target assembly in the first assembly to the subassembly of the target assembly, the subassemblies of the underlayer assembly in the N second assemblies are the first assemblies, and the operation entrance transmitted by the first assembly to the underlayer assembly is the operation entrance of the first operation provided by the first assembly.
In one embodiment, if the parent component of the target component is included in the N second components, the target component transfers the operation entry of the second operation provided by the target component and the received operation entry transferred by the sub component of the target component to the parent component of the target component in the N second components.
In one embodiment, a processing module comprises:
putting an operation inlet of a first operation and operation inlets of second operations of N second assemblies into a first menu through the top assembly, and displaying the first menu;
and the other assemblies in the N second assemblies are nested in the top assembly, and the other assemblies are the assemblies except the top assembly in the N second assemblies.
The menu display device of each embodiment is a device for implementing the menu display method of each embodiment, and the technical features and technical effects correspond to each other, which are not described herein again.
According to embodiments of the present application, an electronic device, a readable storage medium, and a computer program product are also provided.
Fig. 4 is a block diagram of an electronic device according to the menu display method of the embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 4, the electronic apparatus includes: one or more processors 401, memory 402, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, if desired. Also, multiple electronic devices may be connected, with each device providing some of the necessary operations (e.g., as an array of servers, a group of blade servers, or a multi-processor system). One processor 401 is illustrated in fig. 4.
Memory 402 is a non-transitory computer readable storage medium as provided herein. The memory stores instructions executable by at least one processor to cause the at least one processor to perform the menu display method provided by the present application. The non-transitory computer-readable storage medium of the present application stores computer instructions for causing a computer to execute the menu display method provided by the present application.
Memory 402, which is a non-transitory computer-readable storage medium, may be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules (e.g., first acquisition module 301, second acquisition module 302, and processing module 303 shown in fig. 3) corresponding to the menu display method in the embodiments of the present application. The processor 401 executes various functional applications of the server and data processing, i.e., implements the menu display method in the above-described method embodiments, by running non-transitory software programs, instructions, and modules stored in the memory 402.
The memory 402 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the electronic device displayed by the keyboard, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 402 may optionally include memory located remotely from processor 401, which may be connected to keyboard display electronics over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the menu display method may further include: an input device 403 and an output device 404. The processor 401, the memory 402, the input device 403 and the output device 404 may be connected by a bus or other means, and fig. 4 illustrates an example of a connection by a bus.
The input device 403 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device displayed by the keyboard, such as a touch screen, keypad, mouse, track pad, touch pad, pointer stick, one or more mouse buttons, track ball, joystick, or other input device. The output devices 404 may include a display device, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
According to the technical scheme of the embodiment of the application, after the first input in the first interface is received, the first component related to the first input acquires the first operation which can be provided by the first component, and then the operation inlet of the first component is transmitted to the second component, and the second component acquires the second operation which can be provided by the second component.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments are not intended to limit the scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A method of menu display, the method comprising:
acquiring a first operation provided by a first component through the first component under the condition that a first input associated with the first component is received in a first interface;
under the condition that the first interface comprises a second assembly, if the second assembly receives an operation entry of the first operation transmitted by the first assembly, acquiring a second operation provided by the second assembly through the second assembly, wherein the first assembly is nested in the second assembly;
And putting the operation inlet of the first operation and the operation inlet of the second operation into a first menu, and displaying the first menu.
2. The method according to claim 1, wherein the number of the second components is N, N is an integer greater than 1, and N second components are nested in sequence;
if the second component receives the operation entry of the first operation transmitted by the first component, acquiring, by the second component, a second operation provided by the second component, where the second operation includes:
if the target assembly receives an operation entrance transmitted by the sub-assembly of the target assembly, acquiring a second operation provided by the target assembly through the target assembly;
the target assembly is any one of the N second assemblies, the subassembly of the target assembly is nested in the target assembly, the operation entrance transmitted by the subassembly of the target assembly comprises the operation entrance of the second operation provided by the subassembly of the target assembly and the operation entrance transmitted by the subassembly of the N second assemblies and the subassembly of the target assembly in the first assembly to the subassembly of the target assembly, the subassembly of the underlying assembly in the N second assemblies is the first assembly, and the operation entrance transmitted by the first assembly to the underlying assembly is the operation entrance of the first operation provided by the first assembly.
3. The method according to claim 2, wherein if a parent component of the target component is included in the N second components, the target component passes an operation entry of a second operation provided by the target component and a received operation entry passed by a sub-component of the target component to the parent component of the target component in the N second components.
4. The method according to claim 2, wherein the placing the operation entry of the first operation and the operation entry of the second operation into a first menu and displaying the first menu comprises:
putting the operation entrance of the first operation and the operation entrances of the second operations of the N second assemblies into the first menu through a top-layer assembly, and displaying the first menu;
wherein other components of the N second components are nested in the top-level component, and the other components are components of the N second components except the top-level component.
5. A menu display apparatus, characterized in that the apparatus comprises:
the first acquisition module is used for acquiring a first operation provided by a first component through the first component under the condition that a first input associated with the first component is received in a first interface;
The second obtaining module is used for obtaining a second operation provided by a second component through the second component if the second component receives an operation entry of the first operation transmitted by the first component under the condition that the first interface comprises the second component, wherein the first component is nested in the second component;
and the processing module is used for putting the operation inlet of the first operation and the operation inlet of the second operation into a first menu and displaying the first menu.
6. The apparatus of claim 5, wherein the number of the second components is N, N is an integer greater than 1, and the N second components are nested in sequence;
the second obtaining module is used for obtaining a second operation provided by the target assembly through the target assembly if the target assembly receives the operation entrance transmitted by the sub-assembly of the target assembly;
the target assembly is any one of the N second assemblies, the subassembly of the target assembly is nested in the target assembly, the operation entry passed by the subassembly of the target assembly comprises the operation entry of the second operation provided by the subassembly of the target assembly and the operation entry passed by the subassembly of the target assembly in the N second assemblies and the first assembly to the subassembly of the target assembly, the subassembly of the bottom layer assembly in the N second assemblies is the first assembly, and the operation entry passed by the first assembly to the bottom layer assembly is the operation entry of the first operation provided by the first assembly.
7. The apparatus according to claim 6, wherein if the parent component of the target component is included in the N second components, the target component passes an operation entry of a second operation provided by the target component and a received operation entry passed by a child component of the target component to the parent component of the target component in the N second components.
8. The apparatus of claim 6, wherein the processing module comprises:
putting the operation inlet of the first operation and the operation inlets of the second operations of the N second assemblies into the first menu through a top-layer assembly, and displaying the first menu;
wherein other components of the N second components are nested in the top-level component, and the other components are components of the N second components except the top-level component.
9. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.
10. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-4.
CN201911410743.5A 2019-12-31 2019-12-31 Menu display method and device and electronic equipment Active CN113126854B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911410743.5A CN113126854B (en) 2019-12-31 2019-12-31 Menu display method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911410743.5A CN113126854B (en) 2019-12-31 2019-12-31 Menu display method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN113126854A CN113126854A (en) 2021-07-16
CN113126854B true CN113126854B (en) 2022-06-28

Family

ID=76770276

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911410743.5A Active CN113126854B (en) 2019-12-31 2019-12-31 Menu display method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113126854B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000066793A (en) * 1998-08-19 2000-03-03 Sharp Corp File operation controller and recording medium recording file operation control program
CN106250128A (en) * 2016-07-26 2016-12-21 网易(杭州)网络有限公司 The display processing method of user interface and device
CN108391175A (en) * 2017-02-01 2018-08-10 开放电视公司 Menu modification based on controller operation data
CN109683879A (en) * 2018-12-29 2019-04-26 北京创鑫旅程网络技术有限公司 Front end assemblies processing method and processing device
CN109901764A (en) * 2019-01-29 2019-06-18 深圳点猫科技有限公司 A kind of code editor right-click menu function realizing method and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130086496A1 (en) * 2011-08-31 2013-04-04 Wixpress Ltd Adaptive User Interface for a Multimedia Creative Design System

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000066793A (en) * 1998-08-19 2000-03-03 Sharp Corp File operation controller and recording medium recording file operation control program
CN106250128A (en) * 2016-07-26 2016-12-21 网易(杭州)网络有限公司 The display processing method of user interface and device
CN108391175A (en) * 2017-02-01 2018-08-10 开放电视公司 Menu modification based on controller operation data
CN109683879A (en) * 2018-12-29 2019-04-26 北京创鑫旅程网络技术有限公司 Front end assemblies processing method and processing device
CN109901764A (en) * 2019-01-29 2019-06-18 深圳点猫科技有限公司 A kind of code editor right-click menu function realizing method and electronic equipment

Also Published As

Publication number Publication date
CN113126854A (en) 2021-07-16

Similar Documents

Publication Publication Date Title
CN110992112A (en) Method and device for processing advertisement information
US11734454B2 (en) Method for providing applet service capability, electronic device, and storage medium
CN111949272A (en) Compilation optimization method and device for hosted application, electronic device and readable storage medium
CN110851726B (en) Interest point selection method and device and electronic equipment
CN111598131A (en) Image processing method, image processing device, electronic equipment and storage medium
CN111610972A (en) Page generation method, device, equipment and storage medium
CN111881339A (en) Resource information pushing and informing method and device, electronic equipment and storage medium
CN110909390B (en) Task auditing method and device, electronic equipment and storage medium
EP3812958A1 (en) Method and apparatus for detecting and tracking target, electronic device and storage media
CN113126854B (en) Menu display method and device and electronic equipment
CN111638787A (en) Method and device for displaying information
CN111177479A (en) Method and device for acquiring feature vectors of nodes in relational network graph
US20170279658A1 (en) Communicating between components in business process management systems
CN112446728B (en) Advertisement recall method, device, equipment and storage medium
CN111651229A (en) Font changing method, device and equipment
CN111985969A (en) Media information display method, device and equipment and computer storage medium
CN111723318A (en) Page data processing method, device, equipment and storage medium
CN111967492A (en) Method and device for training classification model, electronic equipment and storage medium
CN111783872A (en) Method and device for training model, electronic equipment and computer readable storage medium
CN112100362A (en) Document format recommendation model training method and device and electronic equipment
CN112783543A (en) Generation method, device, equipment and medium for small program distribution materials
CN112445968A (en) Information pushing method, device, equipment and computer readable storage medium
CN111177558A (en) Channel service construction method and device
CN112836153A (en) Page processing method and device for hosted application, electronic device and readable storage medium
CN113010811A (en) Webpage acquisition method and device, electronic equipment and computer readable storage medium

Legal Events

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