Menu display method and electronic device

By saving and monitoring the progress of menu information in electronic devices, the problem of menu loss in third-party applications is solved, and the stability of menu display and user experience are improved.

CN117130698BActive Publication Date: 2024-10-11HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310356408.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-29
Publication Date
2024-10-11
Estimated Expiration
2043-03-29

AI Technical Summary

Technical Problem

Menus related to third-party applications in electronic devices may be lost in the system interface, affecting the user experience.

Method used

When the electronic device is started, the menu information to be displayed is saved in the cache, and the saving progress of the menu information is monitored to determine whether it is completely saved to ensure that the menu information is correctly displayed in the interface.

Benefits of technology

Improves the stability of menu display and reduces menu loss, thus improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117130698B_ABST
    Figure CN117130698B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a menu display method and electronic device, which are applied in the field of terminal technology, can solve the problem that the menu of the third-party application in the system interface is likely not to be displayed, and improve the stability of the menu display. The method includes: after starting the first application, the menu information of the second application to be displayed in one of the interfaces of the first application is saved to the cache of the electronic device. If the operation of opening the first interface corresponding to the first application is detected, and the notification information indicating that the menu information is all loaded into the cache is monitored, the target menu information for display on the first interface is obtained from the cache. Then the first interface is displayed, and the first interface includes the target menu information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a menu display method and an electronic device. Background Art

[0002] With the improvement of user demand, more and more applications (APPs) are installed on electronic devices. Among them, some applications are built-in programs that come with the system of the electronic device, which can be called system applications; some applications are unofficial programs downloaded by users themselves or configured by the electronic device when it leaves the factory, which can be called third-party applications. After the user starts the system application, the menu related to the third-party application can be dynamically displayed in the system interface. For example, the system application can be configured with menu options that control the opening and closing of some functions of the third-party application. The menu related to the third-party application is not statically displayed on the interface of the system application, but it will determine whether to display it according to the configuration file of the third-party application. If it is determined to be displayed, the data corresponding to the menu option obtained will be displayed in the setting interface.

[0003] However, in actual use, it was found that after entering the system interface, there is a probability that menus related to third-party applications will be lost, affecting the user experience. Summary of the invention

[0004] The present application provides a menu display method and electronic device, which can solve the problem that menus related to third-party applications in a system interface are probably not displayed, and improve the stability of menu display.

[0005] In a first aspect, an embodiment of the present application provides a menu display method that can be applied to an electronic device or a component that implements the function of an electronic device (such as a chip system). In this method, the electronic device starts a first application, and during or after the startup, the electronic device saves the menu information of the second application to be displayed in one of the interfaces of the first application to the cache of the electronic device. If an operation of opening the first interface corresponding to the first application is detected, and a notification message indicating that all menu information is saved in the cache is monitored, the target menu information for display on the first interface is obtained from the cache. The first interface is displayed, and the first interface includes the target menu information.

[0006] Based on the method provided by the present application, the electronic device determines whether the target menu information to be displayed on the first interface can be obtained through the notification message. Specifically, there may be three situations in which the electronic device saves the menu information to the cache, one is that the saving has not started, the other is that the saving has not been completed, and the other is that the saving is completed. For the first situation, if the menu information has not started to be saved, the target menu information cannot be obtained from the cache. For the second situation, if part of the menu information has not been saved, there is a probability that the target menu information cannot be obtained from the cache, such as the target menu information is included in the unsaved menu information, and the target menu information cannot be obtained; the target menu information is included in the saved menu information, and the target menu information can be obtained. For the third situation, if the menu information is completely saved, the menu information can be obtained from the cache. It can be understood that the electronic device will listen to the notification message in the third situation, then the electronic device can obtain the target menu information from the cache, and the electronic device can display the target menu information on the first interface. In this way, there will be no problem of the menu not being displayed, so the stability of the menu display is higher and the user experience is better.

[0007] In a possible design of the first aspect, the second application includes an application that is not displayed on the main interface of the electronic device. That is, the second application has no entry on the main interface of the electronic device, and the user cannot open the second application from the main interface. Then, starting the first application to manage the menu options of the second application can be to manage the functions of the second application, which can reduce the number of applications displayed on the main interface, making the main interface display more concise.

[0008] In a possible design of the first aspect, when the time difference between the electronic device starting the first application and detecting the operation of opening the first interface corresponding to the first application is less than or equal to a preset duration, if the target menu information is not saved in the cache of the electronic device, then after the electronic device detects the operation of opening the first interface corresponding to the first application, the method also includes: the electronic device displays the first interface, and the first interface does not include the target menu information.

[0009] Under this design mode, when the time difference between starting the first application and detecting the operation of opening the first interface corresponding to the first application is less than or equal to the preset duration, the first interface displayed by the electronic device will no longer lose the menu, but will be displayed twice. The first display of the first interface is before the notification information is detected, that is, the target menu information is not saved in the cache, resulting in the electronic device being unable to obtain the target menu information from the cache, and the target menu information will not be displayed on the first interface. The second display of the first interface is after the notification information is detected, and the electronic device obtains the target menu information from the cache again. Since the notification information indicates that all the menu information is saved to the cache, when all the menu information can be obtained from the cache, the electronic device can obtain the target menu information from the cache this time. Then the second interface displayed by the electronic device contains the target menu information. Generally speaking, the time for the menu information to be saved in the cache is 100ms-200ms (milliseconds), so the preset duration is an arbitrary value of 100ms-200ms. When the user performs the operation on the interface of the first application too quickly, resulting in the target menu information to be injected into the first interface display not being saved in the cache, the electronic device cannot display the target menu information. It is possible that after about tens of milliseconds, all the menu information has been saved, and then the electronic device can receive the notification information, obtain the target menu information from the cache and display it. That is to say, after about tens of milliseconds, the first interface displayed by the electronic device contains the target menu information. Since the refresh time from the first interface never containing the target menu information to containing the menu information is very short, which is less than the time it takes for all the menu information to be saved in the cache, compared with the related technology that requires the user to return to the previous level interface of the first interface and re-enter the first interface to display the target menu information normally, this design method will not cause trouble to the user when using the injected menu (target injected menu information), nor will it increase the user's operating steps, so the user experience is better.

[0010] In a possible design of the first aspect, after the electronic device detects the operation of opening the first interface corresponding to the first application, the method also includes: the electronic device sets a listener for each target menu information to be displayed on the first interface, the listener is used to monitor the saving progress of the menu information, and when all the menu information is saved to the cache, the electronic device triggers the listener to send notification information.

[0011] In this design, monitoring whether all menu information has been saved is achieved by setting a listener in the cache. Specifically, there are N listeners corresponding to the N target menu information required to be displayed in the first interface. The advantage of this is that each target menu information can be monitored separately, increasing the fault tolerance of monitoring. When the data in the cache is saved, the listener sends a callback (notification information), which means that the electronic device can obtain the target injection menu information from the cache. In response to the notification information, the electronic device obtains the target injection menu information from the cache. This design method can detect the progress of data in the cache in real time by registering a listener, so as to obtain the target injection menu information faster, and refresh the first interface based on the target injection menu information, so that there will be no menu loss in the first interface.

[0012] In a possible design of the first aspect, after displaying the first interface corresponding to the first application, the method further includes: if the target menu information is to be displayed in a menu group of the first interface, recording a group identifier of the menu group. Displaying the first interface, the first interface including the target menu information, includes: displaying the first interface, the menu group corresponding to the group identifier in the first interface including the target menu information.

[0013] Under this design mode, the target menu information displayed in the first interface is displayed in the menu group, and each menu group displays at least one menu option. The presentation effect of the first interface can be improved by grouping the target menu information. The purpose of recording the grouping identifier of the menu group is that when the first interface is opened, the target menu information is not obtained, and the electronic device deletes the menu option corresponding to the target menu information on the first interface, so that other menu options arranged after the target menu information are moved up, so that the presentation effect of the interface is good. When the menu option of the target menu information is deleted, the electronic device cannot determine which menu group it should be displayed in when re-acquiring the target menu information. Therefore, the electronic device can record the grouping identifier of the menu group after detecting the user's operation of opening the first interface, so that when the menu option corresponding to the target menu information is deleted and needs to be restored, the grouping identifier of the menu group to which it belongs can be used to determine which menu group the deleted menu option belongs to, and place it in the original menu group, so as to avoid the high degree of change of the menu distribution position in the first interface, causing the user to feel uncomfortable due to the sudden change of the screen.

[0014] In a possible design of the first aspect, the menu information of the second application to be displayed in one of the interfaces of the first application is saved in the cache of the electronic device, including: the electronic device calls the first thread of the first application to obtain the configuration information of multiple applications installed in the electronic device. Then the electronic device calls the first thread to determine that the application is the second application according to the configuration information of the application. The electronic device calls the first thread to save the menu information in the configuration information corresponding to the application to the cache.

[0015] Under this design mode, the electronic device can perform a processing operation of saving menu information in a thread. Specifically, the electronic device calls the first thread to determine whether the application is the second application from the configuration information of multiple applications installed in the electronic device. The configuration information can be used to indicate whether the application is the second application. In this way, the second application refers to the application that needs to display the menu information on one of the interfaces of the first application. After determining the second application, the electronic device calls the first thread to save the menu information of the second application to the cache, so that when the user opens any interface of the first application, the electronic device can obtain the menu information corresponding to the interface from the cache and display it on the interface. In other words, the menu information of the second application is the injected menu information displayed on any interface of the first application. The menu information of the second application can be displayed on the same interface or on different interfaces. The different interfaces can be two interfaces of the same level or different levels. Taking the interface displayed by starting the first application as the first-level interface as an example, when the menu option of the first-level interface is clicked, the second-level interface can be entered, and different menu options correspond to different second-level interfaces. The menu information of the second application can be information displayed on two different second-level interfaces, so it can be said that the menu information of the second application is displayed on different interfaces of the same level. The menu information of the second application may also be information displayed on the first-level interface and the second-level interface, so it can be said that the menu information of the second application is displayed on interfaces of different levels.

[0016] In a possible design of the first aspect, the electronic device displays a first interface, and the first interface does not include target menu information, including: the electronic device calls the second thread of the first application to obtain the target menu information from the cache. If the electronic device determines that the target menu information is not obtained, the electronic device displays the first interface, and the first interface does not include the target menu information.

[0017] Under this design, the electronic device can perform processing operations to extract information from the cache in the second thread, wherein the second thread and the first thread are different threads, so the processing operations of the electronic device to extract information and the processing operations of the electronic device to store information in the cache can be implemented in parallel, that is, the electronic device can store information in the cache while retrieving data from the cache to increase the processing speed. Since the processing operations of the two threads are parallel, the first thread may not put the target menu information into the cache, and the second thread may obtain the target menu information from the cache, resulting in the problem of menu loss. When the menu is lost, the first interface displayed by the electronic device does not include the target menu information, and the user cannot perform operations on the target menu information on the first interface.

[0018] In a possible design of the first aspect, the electronic device obtains target menu information for display on the first interface from the cache, including: the electronic device calls the main thread of the first application to obtain target menu information for display on the first interface from the cache.

[0019] Among them, the main thread is a thread different from the first thread and the second thread. The main thread can be used to display or refresh the interface and process input events on the interface (such as click events, scroll events, drag events, etc.). When the second thread does not obtain the target menu information, the second thread will remove the menu options corresponding to the target menu information in the second interface, so that the first interface does not display the target menu information. Therefore, the main thread will obtain the target menu information from the cache again, in order to avoid the second thread obtaining information from the cache before the target menu information is saved in the cache, resulting in the loss of the menu due to the failure to obtain the information. The purpose of using the main thread under this design method is that the main thread can be parallel to the second thread. During the processing of the second thread, if the notification information is detected, the main thread can directly obtain the target menu information from the cache and display it, without waiting for the second thread to complete the task and then obtain the target menu information, so the task processing efficiency is higher.

[0020] In a possible design of the first aspect, the first application includes a system setting application; and the electronic device starts the first application, including: when the process of the system setting application is not started, the electronic device starts the system setting application.

[0021] Among them, the system settings application, also known as the system application, is a built-in program that comes with the electronic device system. The settings application can be configured in the electronic device without downloading it from the application market. Therefore, it is more versatile as an application that displays the injected menu information of third-party applications. Since menu loss occurs when there is no target menu information in the cache, the electronic device needs to obtain the target menu information from the cache. Therefore, when the settings application is cold-started, the process of the settings application has just been created, and the menu information has not been saved to the cache in time, so menu loss is prone to occur. Therefore, in view of the problem that menu loss is prone to occur when the settings application is cold-started, this design method can reduce the probability of menu loss and improve the stability of menu display, so that users have a better experience.

[0022] In a possible design manner of the first aspect, the first interface is an interface displayed after a trigger operation for a menu option in the second interface is detected, and the second interface includes an interface displayed after the first application is started.

[0023] In the design method provided in the present application, the first interface can be any interface of the first application, for example, it can be an interface displayed after opening the first application, or it can be another interface switched to by triggering a menu option in the interface displayed by the first application.

[0024] In this design, the second interface is the first interface after the first application is started, and the first interface is an interface that can be entered through a trigger operation on the first interface.

[0025] The menu information includes menu name, description information, and menu icon. The description information is used to indicate the on / off status of the application function corresponding to the menu item. Users can process the menu options that need to be managed through the menu name and description information. Menu icons can be displayed on some interfaces, such as the first interface, where a menu icon for each menu option is displayed to help users identify menu options more quickly and improve user experience. Menu icons can also increase the visual appeal of menu options, making it easier for users to understand the functions of menu options.

[0026] In a possible design of the first aspect, the electronic device displays a first interface, and the first interface includes target menu information, including: if the target menu information meets the display conditions, the electronic device displays the first interface, and the first interface includes the target menu information.

[0027] In this design, after the electronic device obtains the target menu information, it does not directly display the target menu information, but determines whether it meets the display conditions. For example, the display conditions include: display at location A, not display at location B. Or the display conditions include: display at model m electronic device, not display at model n electronic device, etc. The electronic device determines whether the target menu information needs to be displayed based on the display conditions, and displays the target menu information if the target menu information meets the display conditions. If the target menu information does not meet the display conditions, the target menu information is not displayed.

[0028] In a possible design manner of the first aspect, the configuration information of the second application includes indication information for indicating that menu information of the second application is to be displayed in one of the interfaces of the first application.

[0029] Among them, the indication information can be an identifier negotiated between the second application and the first application. Then, after the electronic device starts the first application, it reads the configuration information of the installed application. When the identifier is read, it can be determined that the application is the second application, and the menu information of the application needs to be injected into the interface of the first application for display. The identifier can be a key value corresponding to the first application and the second application. If the key value of the application is the same as that of the first application, the application is the second application. In addition to the negotiated identifier, the indication information can also be a configuration item related to the first application. According to the configuration items in the configuration information of the second application, it is determined that it has menu information that needs to be displayed in the interface of the first application. The indication information can enable the electronic device to quickly query the second application from multiple installed applications, which is more efficient.

[0030] In a second aspect, the present application provides an electronic device, comprising: a processor, a display screen, and a memory for storing instructions executable by the processor, wherein when the processor is configured to execute the instructions, the electronic device implements the method provided in the first aspect and any possible design thereof.

[0031] In a third aspect, the present application provides an electronic device, which includes: a processor, a display screen, and a memory for storing executable instructions of the processor. When the computer instructions are executed by the processor, the processor performs the following steps: starting a first application, and during or after the startup, the processor saves the menu information of a second application to be displayed in one of the interfaces of the first application to a cache of the processor. If an operation of opening a first interface corresponding to the first application is detected, and a notification message indicating that all menu information is saved in the cache is monitored, the target menu information for display on the first interface is obtained from the cache. The first interface is displayed, and the first interface includes the target menu information.

[0032] In a possible design of the third aspect, when the time difference between the processor starting the first application and detecting the operation of opening the first interface corresponding to the first application is less than or equal to a preset duration, if the target menu information is not saved in the cache of the processor, then after the processor detects the operation of opening the first interface corresponding to the first application, the method also includes: the processor displays the first interface, and the first interface does not include the target menu information.

[0033] In a possible design of the third aspect, after the processor detects the operation of opening the first interface corresponding to the first application, the method also includes: the processor sets a listener for each target menu information to be displayed on the first interface, the listener is used to monitor the saving progress of the menu information, and when all the menu information is saved to the cache, the processor triggers the listener to send notification information.

[0034] In a possible design of the third aspect, after displaying the first interface corresponding to the first application, the method further includes: if the target menu information is to be displayed in a menu group of the first interface, recording a group identifier of the menu group. Displaying the first interface, the first interface including the target menu information, includes: displaying the first interface, the menu group corresponding to the group identifier in the first interface including the target menu information.

[0035] In a possible design of the third aspect, the menu information of the second application to be displayed in one of the interfaces of the first application is saved in the cache of the processor, including: the processor calls the first thread of the first application to obtain configuration information of multiple applications installed in the processor. Then the processor calls the first thread to determine that the application is the second application according to the configuration information of the application. The processor calls the first thread to save the menu information in the configuration information corresponding to the application to the cache.

[0036] In a possible design of the third aspect, the processor displays the first interface, and the first interface does not include the target menu information, including: the processor calls the second thread of the first application to obtain the target menu information from the cache. If the processor determines that the target menu information is not obtained, the processor displays the first interface, and the first interface does not include the target menu information.

[0037] In a possible design of the third aspect, the processor obtains target menu information for display on the first interface from the cache, including: the processor calls the main thread of the first application to obtain target menu information for display on the first interface from the cache.

[0038] In a possible design manner of the third aspect, the first application includes a system setting application; and the processor starts the first application, including: when the process of the system setting application is not started, the processor starts the system setting application.

[0039] In a possible design manner of the third aspect, the first interface is an interface displayed after a trigger operation for a menu option in the second interface is detected, and the second interface includes an interface displayed after the first application is started.

[0040] In a possible design of the third aspect, the processor displays a first interface, and the first interface includes target menu information, including: if the target menu information meets the display conditions, the processor displays the first interface, and the first interface includes the target menu information.

[0041] In a possible design manner of the third aspect, the configuration information of the second application includes indication information for indicating that menu information of the second application is to be displayed in one of the interfaces of the first application.

[0042] In a fourth aspect, the present application provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method described in the first aspect and any possible design thereof.

[0043] In a fifth aspect, the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the method described in the first aspect and any possible design thereof.

[0044] In a sixth aspect, the present application provides a chip system, which includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by lines. The chip system is applied to an electronic device including a communication module and a memory; the interface circuit is used to receive a signal from the memory and send a signal to the processor, the signal including a computer instruction stored in the memory. When the processor executes the computer instruction, the electronic device executes the method of the first aspect and any possible implementation.

[0045] It can be understood that the beneficial effects that can be achieved by the electronic device of the second aspect, the third aspect and any possible implementation method thereof, the computer storage medium of the fourth aspect, the computer program product of the fifth aspect, and the chip system of the sixth aspect provided above can refer to the beneficial effects in the first aspect and any possible implementation method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 An interface diagram provided for an embodiment of the present application;

[0047] Figure 2 Another interface diagram provided for an embodiment of the present application;

[0048] Figure 3 Another interface diagram provided for an embodiment of the present application;

[0049] Figure 4 A flowchart of a method for displaying an injection menu provided in the related art;

[0050] Figure 5 A flowchart of a menu display method provided in an embodiment of the present application;

[0051] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0052] Figure 7 A schematic diagram of a software structure of an electronic device provided in an embodiment of the present application;

[0053] Figure 8 A flowchart of a menu display method provided in an embodiment of the present application;

[0054] Fig. 9 A schematic diagram of starting a first application provided in an embodiment of the present application;

[0055] Fig.10 Another interface diagram provided for an embodiment of the present application;

[0056] Fig.11 Another interface diagram provided for an embodiment of the present application;

[0057] Fig.12 A schematic diagram of the progress of saving the injected menu information provided by an embodiment of the present application;

[0058] Fig.13 A schematic diagram of the relationship between an application and injected menu information provided in an embodiment of the present application;

[0059] Fig.14 A schematic diagram of obtaining data provided in an embodiment of the present application;

[0060] Fig.15 Another interface diagram provided for an embodiment of the present application;

[0061] Fig.16 Another interface diagram provided for an embodiment of the present application;

[0062] Fig.17 A structural diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0063] The technical solution in the embodiment of the present application will be described below in conjunction with the drawings in the embodiment of the present application. In the description of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0064] In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art can understand that the words "first", "second" and the like are only used for descriptive purposes, and do not limit the quantity and execution order, nor can they be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present embodiment, unless otherwise specified, the meaning of "multiple" is two or more. And the words "first", "second" and the like are not necessarily different. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present embodiment, unless otherwise specified, "at least one" means one or more, and the meaning of "multiple" is two or more.

[0065] In the embodiments of the present application, the words "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.

[0066] In addition to the need for system applications to schedule, monitor and maintain electronic equipment systems, electronic devices also need to install third-party applications to meet various user needs. Some third-party applications do not have an entrance on the electronic device desktop, that is, these third-party applications cannot be found on the desktop. Then the management of these third-party applications that do not have an entrance on the desktop can be configured to the system application or other third-party applications with an entrance. In addition, for the purpose of facilitating users to uniformly manage the permissions of some functions provided by third-party applications, electronic devices can also configure the management of third-party applications with entrances on the desktop to system applications or other third-party applications with entrances. In other words, whether the relevant configuration items managed by users for third-party applications need to be configured in other applications has no direct relationship with whether the third-party application has an entrance to start the application on the desktop. In order to meet actual needs, the menu of any third-party application installed by the electronic device can be displayed in the interface of the system application or other third-party application with an entrance, so that the user can enter the interface of the system application or other third-party application with an entrance and manage the third-party application according to the displayed menu options.

[0067] For example, in order to pay more attention to the privacy of users and the needs of personalized operation of electronic devices, third-party applications can provide services to users with the permission of users. Some functions provided by third-party applications usually need to be enabled with the consent of users before they can be used. Then the management of third-party applications can be: starting, closing or adjusting some functional permissions of third-party applications corresponding to menu options on the interface displayed by system applications or other third-party applications with entrances, such as turning off the positioning function of map applications, turning on the auxiliary functions of auxiliary application applications, and adjusting the time range for weather applications to allow access to location information.

[0068] In some embodiments, the system application or other third-party application with an entrance may be a setting application, that is, the user enters the setting application interface (or setting interface) and can manage the corresponding third-party application according to the displayed menu options. Figure 1 As shown, the electronic device displays a settings interface 101. Settings interface 101 is one of the interfaces that the user enters after starting the settings application. For example, the settings interface can be a first-level interface that can be displayed when the settings application is started. The settings interface can also be a second-level interface that the user switches to by triggering some menus in the first-level interface. The settings interface can also be a third-level interface that the user switches to by triggering some menus in the second-level interface, and so on. Menu options 102 (or menus) for file sharing apps and smart travel apps are displayed on settings interface 101. Users can view the function activation status of third-party apps through menu option 102. Figure 1 The function status of the file sharing APP is displayed as "off". On the setting interface 101, the user can also perform a trigger operation on the menu option 102, so that the electronic device switches to the next level interface 103 corresponding to the menu option 102, and the next level interface 103 displays a switch button 104 of the third-party application function corresponding to the menu option. The user clicks the switch button 104 to turn the third-party application function on and off.

[0069] The current problem is that there is a certain probability that the menu will be lost after the user enters the settings interface, that is, the menu corresponding to the third-party application is not displayed in the settings interface, so the user cannot manage the menu corresponding to the third-party application on the settings interface, which greatly reduces the user experience.

[0070] After research, it was found that in addition to the menus corresponding to the third-party applications mentioned above, the settings interface also includes menus corresponding to system applications, and the menus corresponding to system applications will not be lost, only the menus corresponding to third-party applications are likely to be lost. For example, the menus corresponding to third-party applications such as file sharing, smart travel, and auxiliary functions may not be displayed in the settings interface. After locating the problem, it was found that the menus corresponding to some third-party applications are displayed on the settings interface in the form of injected menus, where the injected menu refers to the menu displayed by dynamically inputting data. Unlike the static menu, the display content and display conditions of the injected menu will be affected by the configuration file of the third-party application. Taking smart travel as an example, if the configuration file of the smart travel APP is configured that smart travel services are not supported in place A, then the user will not see the menu corresponding to smart travel when opening the settings interface of the electronic device in place A. At present, third-party applications generally display menus in the settings application in the form of injected menus, so that users can manage third-party applications in the settings interface. It is precisely because the injected menu needs to download the data corresponding to the menu within a short time after the user opens the settings interface. Once the injection fails, the menu cannot be displayed.

[0071] Combine the following Figure 2 For further information on the Inject menu, refer to Figure 2 , the user can enter the search page 201 of the electronic device by pulling down the home screen, etc., and enter the application name 202 on the search page 201. If the application corresponding to the application name 202 has an injection menu, then in one case the search page will display the icon of the application into which the application is injected, such as Figure 2 In (a), a setting icon 203 is displayed, and the setting icon 203 corresponds to the application name 202: file sharing. In another case, the search page will display the icon of the application injected by the application and the icon of the application, such as Figure 2 (b) shows the settings icon and settings application name, the smart travel application icon and smart travel application name.

[0072] In both cases, the user can switch to the interface (such as the settings interface 101) displayed by the injected application by clicking the icon of the application (such as the settings application) into which the application corresponding to the application name 202 is injected. That is to say, regardless of whether the application A is configured with an entry that can directly open the application A on the desktop of the electronic device, when some function menus of the application A can be displayed in the application B, the function menu of the application A can be set by starting the application B and entering one of the interfaces of the application B. Therefore, it is possible to determine whether the menu displayed in the application B is an injected menu or a non-injected menu (or static menu) in this way, and to determine whether each application corresponds to an injected menu.

[0073] Since the injected menu may be lost, and the non-injected menu will be displayed normally, when the user starts the settings app and clicks "More connections" to enter the settings interface, the settings interface will normally be as follows Figure 3 As shown in interface 301, interface 301 displays a near field communication (NFC) menu, a file sharing menu, a smart travel menu, a mobile screen projection menu, a printing menu, a virtual private network (VPN) menu, and an encrypted domain name system (DNS). Figure 3 As shown in interface 302, the file sharing menu and the smart menu are not displayed in interface 302, indicating that the menu is missing. At this time, the user can click the return button 303 to return to the previous display interface 304 of interface 302, and click "More Connections" again to enter the setting interface, until the setting interface is as shown in interface 301, and then perform operations for the injection menu in interface 301. This not only causes trouble for users to use the injection menu, but also increases the user's operation steps, resulting in a poor user experience.

[0074] In order to locate the problem that the injection menu is likely to be lost and cannot be displayed on the interface, the following takes the display of the injection menu in the settings application of the smart travel APP as an example to analyze the display process of the injection menu. Figure 4As shown, the electronic device executes S401, S401 includes the first application being cold-started, thereby displaying the interface 1 corresponding to the first application (equivalent to the above-mentioned second interface). Among them, the first application is a setting application, and the setting application being cold-started means that the process of the setting application is closed and then restarted. Interface 1 can be understood as a first-level interface in the setting interface displayed after starting the setting application, and multiple first-level menus are displayed in interface 1. Then the electronic device executes S402, S402 includes saving the injection menu information corresponding to at least one second application in the multiple applications obtained in the configuration information to the cache. Among them, the injection menu information of the second application is used to display in one of the interfaces of the setting application. For example, the second application includes a smart travel APP, an auxiliary function APP, etc. The smart travel APP is displayed in the interface corresponding to the first-level menu "More Connections", and the auxiliary function APP is displayed in the interface corresponding to the first-level menu "Accessibility", and the interfaces injected by the two are different. Therefore, when the user performs a trigger operation for the first-level menu "More Connections" in interface 1, the electronic device executes S403, S403 includes displaying the interface 2 corresponding to the first-level menu "More Connections" (equivalent to the above-mentioned first interface). Among them, interface 2 is used to display the secondary menus "Smart Travel", "NFC", "Mobile Screen Casting", etc. included in the primary menu "More Connections". In the listed secondary menus, "Smart Travel" is an injection menu, so after opening interface 2, the electronic device needs to execute S404 to obtain the injection menu information corresponding to "Smart Travel" and display it on interface 2. S404 includes obtaining the injection menu information corresponding to "Smart Travel" from the cache. Since S403 does not necessarily wait until all the information of S402 is obtained before execution, it may appear that during the process of cache execution and saving, the user performs a trigger operation for the primary menu "More Connections", causing the electronic device to switch to interface 2, resulting in the injection menu information corresponding to "Smart Travel" in the primary menu "More Connections" not being saved in the cache. Therefore, there may be two situations after the electronic device executes S404. One is that the injection menu information corresponding to "Smart Travel" is obtained from the cache, then interface 2 displays normally; the other is that the injection menu information corresponding to "Smart Travel" is not obtained from the cache, then interface 2 displays abnormally, that is, the injection menu information corresponding to "Smart Travel" has a menu loss problem.

[0075] In order to avoid the problem of menu loss when the cache fails to obtain the corresponding injection menu information of "Smart Travel" when opening interface 2 mentioned above, such as Figure 5As shown, an embodiment of the present application provides a menu display method, which is applied to an electronic device, and can register a listener to monitor when the injection menu information (equivalent to the above-mentioned menu information) in the cache is saved after executing S403 to open interface 2. After the saving is completed, the electronic device obtains the target injection menu information to be displayed (equivalent to the above-mentioned target menu information) from the cache again, and displays the injection menu on interface 2. In this way, the problem of menu loss caused by the injection menu information not being saved in the cache and the interface 2 not displaying the injection menu is avoided. The embodiment of the present application increases the probability of the injection menu being successfully displayed on interface 2, so that the user experience is better.

[0076] In some embodiments, when the time difference between the electronic device starting the first application and detecting the operation of opening the interface 2 corresponding to the first application is less than or equal to a preset duration, if the target injection menu information is not saved in the cache of the electronic device, then after the electronic device detects the operation of opening the interface 2 corresponding to the first application, the electronic device displays interface 2, and interface 2 does not include the target injection menu information. Then, when the notification information triggered by the listener is detected and it is determined that the injection menu information has been saved, the first interface is refreshed so that the refreshed first interface includes the target injection menu information.

[0077] Specifically, when the time difference between starting the first application and detecting the operation of opening the interface 2 corresponding to the first application is less than or equal to the preset duration, the interface 2 displayed by the electronic device will no longer lose the menu, but will be displayed twice. The first display of interface 2 is before the notification information is detected, that is, the target injection menu information is not saved in the cache, resulting in the electronic device being unable to obtain the target injection menu information from the cache, and the target injection menu information will not be displayed on interface 2. The second display of interface 2 is after the notification information is detected, and the electronic device once again obtains the target injection menu information from the cache. Since the notification information indicates that the injection menu information is all saved to the cache, when the injection menu information can all be obtained from the cache, the electronic device can obtain the target injection menu information from the cache by this acquisition action. Then the second interface displayed by the electronic device contains the target injection menu information. Generally speaking, the time for the injection menu information to be saved in the cache is 100ms-200ms (milliseconds), so the preset duration is an arbitrary value of 100ms-200ms. When the user performs operations on the interface of the first application too quickly, resulting in the target injection menu information to be injected into the interface 2 for display not being saved in the cache, the electronic device cannot display the target injection menu information. It may be that after about tens of milliseconds, all the injection menu information is saved, then the electronic device can receive the notification information, obtain the target injection menu information from the cache and display it. That is to say, after about tens of milliseconds, the interface 2 displayed by the electronic device contains the target injection menu information. Since the refresh time from never containing the target injection menu information to containing the injection menu information is very short, which is less than the time for all the injection menu information to be saved in the cache, compared with the related art that requires the user to return to the upper level interface of interface 2 and re-enter interface 2 to display the target injection menu information normally, this embodiment will not cause trouble to the user's use of the injection menu (target injection menu information), nor will it increase the user's operating steps, so the user experience is better.

[0078] In the embodiments of the present application, the electronic device may be a portable computer (such as a mobile phone), a tablet computer, a laptop computer, a personal computer (PC), a wearable electronic device (such as a smart watch), an augmented reality (AR) device, a virtual reality (VR) device, a car computer, or other devices. The following embodiments do not impose any special restrictions on the specific form of the electronic device.

[0079] like Figure 6As shown, taking the electronic device as a mobile phone as an example, the mobile phone may include a processor 610, an external memory interface 620, an internal memory 621, a universal serial bus (USB) interface 630, a charging management module 640, a power management module 641, a battery 642, an antenna 1, an antenna 2, a mobile communication module 650, a wireless communication module 660, an audio module 670, a speaker 670A, a receiver 670B, a microphone 670C, an earphone interface 670D, a sensor module 680, a button 690, a motor 691, an indicator 692, a camera 693, a display screen 694, and a subscriber identification module (SIM) card interface 695, etc.

[0080] Among them, the above-mentioned sensor module 680 may include sensors such as pressure sensor, gyroscope sensor, air pressure sensor, magnetic sensor, acceleration sensor, distance sensor, proximity light sensor, fingerprint sensor, temperature sensor, touch sensor, ambient light sensor and bone conduction sensor.

[0081] It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the mobile phone. In other embodiments, the mobile phone may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0082] The processor 610 may include one or more processing units, for example, the processor 610 may include an application processor (application processor, AP), a sensor hub (sensor hub), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural network processor (neural-network processing unit, NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0083] The controller can be the nerve center and command center of the electronic device. The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.

[0084] The processor 610 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 610 is a cache memory. The memory may store instructions or data that the processor 610 has just used or cyclically used. If the processor 610 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 610, and thus improves the efficiency of the system.

[0085] In some embodiments, the processor 610 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuits sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0086] It is understandable that the interface connection relationship between the modules illustrated in this embodiment is only a schematic illustration and does not constitute a structural limitation of the electronic device. In other embodiments, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0087] The electronic device implements the display function through a GPU, a display screen 694, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 694 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 610 may include one or more GPUs that execute program instructions to generate or change display information.

[0088] The external memory interface 620 can be used to connect an external memory card, such as a MicroSD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 610 through the external memory interface 620 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.

[0089] The internal memory 621 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 621 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as controlling an electronic device switching interface, etc.), etc. The data storage area may store data created during the use of the electronic device (such as configuration information), etc. In addition, the internal memory 621 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 610 executes various functional applications and data processing of the electronic device by running instructions stored in the internal memory 621, and / or instructions stored in a memory provided in the processor.

[0090] The display screen 694 is used to display images, videos, etc. The display screen may be a touch screen.

[0091] In the embodiment of the present application, the display screen 694 can display a first interface and a second interface, wherein the first interface is an interface for displaying target injection menu information, and the second interface is a home interface for starting the first application. The interface displayed on the display screen 694 can be switched, for example, in response to a user triggering operation on a menu option displayed on the second interface, the second interface can be switched to the first interface.

[0092] The touch screen may be composed of a display screen 694 and a touch sensor. The touch sensor detects a touch operation applied thereon or near the touch screen, and the touch screen sends the touch data to the AP.

[0093] The display screen 694 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc.

[0094] The electronic device can realize the shooting function through ISP, camera 693, video codec, GPU, display screen 694 and application processor.

[0095] The ISP is used to process the data fed back by the camera 693. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 693.

[0096] The camera 693 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device may include N cameras 693, where N is a positive integer greater than 1.

[0097] Digital signal processors are used to process digital signals. In addition to processing digital image signals, they can also process other digital signals. For example, when an electronic device selects a frequency point, a digital signal processor is used to perform Fourier transform on the frequency point energy.

[0098] Video codecs are used to compress or decompress digital videos. Electronic devices can support one or more video codecs. In this way, electronic devices can play or record videos in multiple coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0099] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and continuously self-learn. NPU can realize applications such as intelligent cognition of electronic devices, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0100] The electronic device can implement audio functions such as music playing and recording through the audio module 670, the speaker 670A, the receiver 670B, the microphone 670C, the headphone jack 670D, and the application processor.

[0101] The audio module 670 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 670 can also be used to encode and decode audio signals. The speaker 670A, also known as the "speaker", is used to convert audio electrical signals into sound signals. The receiver 670B, also known as the "earpiece", is used to convert audio electrical signals into sound signals. The microphone 670C, also known as the "microphone" or "microphone", is used to convert sound signals into electrical signals. The headphone jack 670D is used to connect wired headphones. External audio equipment (such as speakers) is used to convert audio electrical signals into sound signals.

[0102] The buttons 690 include a power button, a volume button, etc. The motor 691 can generate a vibration prompt. The indicator 692 can be an indicator light, which can be used to indicate the charging status, power change, etc. The SIM card interface 695 is used to connect a SIM card.

[0103] The methods in the following embodiments can all be implemented in an electronic device having the above hardware structure.

[0104] The software system of the electronic device can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. TM Taking the system as an example, the software structure of the electronic device is illustrated.

[0105] like Figure 7 As shown in FIG. 1 , the layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, Android TM The system is divided into four layers, from top to bottom: application layer, application framework layer (referred to as framework layer), Android runtime (Android TM runtime) and system libraries and kernel layer.

[0106] Among them, the application package can include camera, calendar, map, video, music, short message, gallery, call, setting, navigation, desktop assistant and other applications.

[0107] In an embodiment of the present application, the settings application may have the function of displaying the injection menu information of other applications. By starting the settings application and displaying any interface corresponding to the settings application, the injection menu information can be managed and controlled to adjust the functions of other applications. Applications such as navigation and desktop assistants may not have an entrance on the main interface of the electronic device, that is, these applications are not displayed on the main interface, which can reduce the number of applications displayed on the main interface. Since there is no entrance, the information related to these applications can be injected into the settings application for display, so that these applications can be managed on the interface of the settings application.

[0108] The framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The framework layer includes some predefined functions. The framework layer can include setting services, window managers, content providers, view systems, resource managers, notification managers, activity managers, etc.

[0109] In the embodiment of the present application, the setting service is used to process the data flow related to the setting application. For example, after starting the setting application, the setting service can create thread 1 based on the call command of the setting application to save the injection menu information of the third-party application that meets the setting injection condition to the cache. After the user clicks on a first-level menu in the setting application and the electronic device displays the interface of the first-level menu, the setting service can create thread 2 to obtain the injection menu information corresponding to the injection application to be displayed on the interface of the first-level menu from the cache.

[0110] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0111] Content providers are used to store and retrieve data and make it accessible to apps. This data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0112] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0113] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0114] The notification manager enables applications to display notification messages in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used for download completion notifications and message reminders. The notification manager can also manage notifications that appear in the system's top status bar in the form of icons or scrolling text, such as notifications from applications running in the background. The notification manager can also manage notifications that appear on the screen in the form of dialog windows, such as prompting text messages in the status bar, emitting reminder sounds, vibrating electronic devices, and flashing indicator lights.

[0115] The activity manager is used to manage the life cycle of each application and the navigation back function. TMThe main thread is created and the life cycle of each application is maintained.

[0116] Android TM Runtime includes core libraries and virtual machines. Android TM Runtime is responsible for the scheduling and management of the Android system.

[0117] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0118] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0119] like Figure 7 As shown, the system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0120] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0121] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0122] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0123] A two-dimensional (2D) graphics engine is a drawing engine for 2D drawings.

[0124] The kernel layer is the layer between hardware and software. The kernel layer contains at least camera driver, audio driver, sensor driver, etc. Among them, the camera driver is the driver layer of the camera, which is mainly responsible for the interaction with the hardware. For example, the camera driver can start the camera of the hardware layer, and the started camera can collect image data.

[0125] The following is an example of the workflow of the software system and hardware system of the electronic device in combination with the interface display scenario.

[0126] When a user performs a touch operation on the touch sensor, the corresponding hardware interrupt is sent to the kernel layer, which processes the touch operation into a raw input event, which includes information such as touch coordinates and the timestamp of the touch operation. The raw input event is stored in the kernel layer, and the application framework layer obtains the raw input event from the kernel layer, identifies the control corresponding to the raw input event, and notifies the APP corresponding to the control.

[0127] For example, the above touch operation is a single-click operation, and the APP corresponding to the above control is a setting application. After the setting application is started by the single-click operation, the setting service can call the display driver of the kernel layer through the API, and control the display screen 694 to display the interface 1 corresponding to the setting application through the display driver. Then, the setting service creates thread 1 to save the injection menu information of the third-party application that meets the setting injection condition to the cache.

[0128] At least one first-level menu is displayed in interface 1, and the first-level menu can also be triggered by the user through the corresponding control to switch to interface 2 corresponding to the first-level menu. After entering interface 2, if thread 1 has saved the injection menu information to the cache, thread 2 created by the setting service can obtain the injection menu information of the third-party application required to be displayed in interface 2 from the cache, and call the display driver of the kernel layer through the API, and control the display screen 694 to display interface 2 corresponding to the first-level menu through the display driver, and interface 2 includes the injection menu information of the second-level menu.

[0129] In another case, thread 1 does not save the injection menu information into the cache (or has not started saving), and the setting service will call the main thread to directly obtain the injection menu information and display it on interface 2.

[0130] In another case, thread 1 has not completely saved the injected menu information into the cache (or the information that needs to be displayed on interface 2 has not been saved), and the setting service will call thread 2 to obtain information from the cache. Then interface 2 will not display the injected menu information that has not been obtained, and the menu loss problem will occur.

[0131] The scenarios in which the method provided in the embodiments of the present application can be applied are as follows.

[0132] At least two applications are installed in the electronic device, one application is called the first application, which is used to display the injection menu information, and the other application is called the injection application (or the second application), which can display the injection menu information on one of the interfaces of the first application by configuring the injection conditions (or injection rules).

[0133] The injection condition can be configured in the configuration file of each third-party application. After the first application is started, the configuration files of the third-party applications installed in the electronic device are traversed to see if they contain the injection condition: if they contain the injection condition, it means that the third-party application is an injection application; if they do not contain the injection condition, it means that the third-party application is not an injection application.

[0134] Again, the first application has at least one interface for displaying the injection menu information of the second application. The above embodiment takes the second-level menu of the first application to display the injection menu information of the second application as an example. In actual applications, the first-level menu, third-level menu, etc. of the first application all have the ability to display the injection menu information of the second application, and the interface for displaying the injection menu information can be configured according to actual needs.

[0135] In addition, the first application has at least one entry for launching the application. The above is explained using the example of launching the first application on the desktop. In actual applications, the application launched by triggering operations such as voice instructions, touch operations, gesture operations, etc. can also serve as the first application that can inject menu information into other applications. This application has no restrictions on this.

[0136] It should also be added that the first application and the second application are not limited to application programs, but can also be Android application packages (Android TM The difference between APK and APP is that APK is Android TM The installation package on the system can be used directly without downloading, so it is installed on electronic devices with Android TM In the case of a system, the first application and the second application may be application programs and installation packages installed on the electronic device.

[0137] The following takes the electronic device as a mobile phone and the first application as a setting application as an example, and describes the method provided in the embodiment of the present application in conjunction with the accompanying drawings.

[0138] The present application embodiment provides a menu display method, which is applied to a mobile phone, such as Figure 8 As shown, the method comprises the following steps:

[0139] S801. The mobile phone starts a first application and displays an interface 1 corresponding to the first application.

[0140] In this embodiment, the first application is a setting application, which is a system-built application of the mobile phone. Unlike a third-party application, the setting application can be configured in the mobile phone without downloading it from the application market. Therefore, it is more versatile as an application that displays the injection menu information of third-party applications.

[0141] Before the mobile phone executes S801, the process of the settings application has not been started, that is, the startup operation of the mobile phone executing S801 is a cold start. Specifically, when the settings application is started, there is no process of the settings application in the background of the mobile phone. At this time, the system of the mobile phone will recreate a new process and assign it to the settings application, so it will first create and initialize the application class (or application class), then create and initialize the MainActivity class (or main activity class), and then display interface 1. Different from a cold start, a hot start refers to the case where the settings application has been opened, and after returning to the desktop or switching to other apps due to operations such as pressing the return key or the home button on the home screen, the settings application is reopened. A hot start will be started from an existing process, so a hot start does not need to create and initialize the application class, but only needs to create and initialize the MainActivity class. When the settings application is cold started, the mobile phone will execute S802-S803 below to save the injected menu information to the cache. When the information is saved, the mobile phone will directly execute S804 when the settings application is hot started.

[0142] Since the problem of injection menu information loss occurs when the process of setting the application is just started, there is a probability that the injection menu information has not been saved yet, resulting in the mobile phone cache not being able to obtain the target injection menu information, so this embodiment takes the cold start of the setting application as an example for explanation.

[0143] In some embodiments, the mobile phone may have multiple entrances for launching the settings application. Fig. 9 As shown, the mobile phone can display the application icon of the setting application on the desktop, and when the user clicks the application icon of the setting application, the setting application can be started and interface 1 is displayed. For another example, the mobile phone can open the setting application in other applications, can start the setting application by voice, can double-click the side of the mobile phone to start the setting application, etc. The embodiment of the present application does not impose any restrictions on the starting method of the setting application.

[0144] For example, when a user clicks on the icon of the settings application on the desktop, when the background of the mobile phone does not create a process of the settings application, the settings application is started and a main thread is created to display or refresh the interface and process input events on the interface (such as click events, scroll events, drag events, etc.). In addition to the main thread, the settings application also creates a sub-thread 1 (equivalent to the first thread) to execute S802-S803 below.

[0145] S802. The mobile phone obtains configuration information of multiple application programs.

[0146] If the service of management interface 1 is called a first-level menu module, then after the mobile phone starts interface 1, the first-level menu module starts sub-thread 1 to obtain configuration information of multiple applications to determine whether the application needs to be injected into the injection menu displayed in the interface of the setting application.

[0147] In this embodiment, the multiple applications can be all the apps installed on the mobile phone, including system applications (such as desktop folder launcher) and third-party applications; including applications with a launch entry on the desktop (such as weather APP, camera APP), and also including applications without a launch entry on the desktop (such as file sharing APP).

[0148] Each application has corresponding configuration information, which can be a configuration file (such as an XML file or a config file), or one or more configuration items in the configuration file. The configuration information configures whether the application-related menu needs to be injected into the interface of the settings application. For example, if the menu of application A needs to be injected into the interface of the settings application, then the configuration file of application A is configured with relevant configuration items; if the menu of application B does not need to be injected into the interface of the settings application, then the configuration file of application B is not configured with relevant configuration items. Then the mobile phone obtains the configuration file of application A and the configuration file of application B, and can filter out the injection application (equivalent to the second application above) from multiple applications based on whether the configuration files are configured with relevant configuration items.

[0149] In some embodiments, sub-thread 1 can extract configuration files of all applications installed in the mobile phone through the package management module, traverse the configuration files to determine which applications meet the conditions for being displayed in the application settings interface, and execute S803 below after determining.

[0150] S803: The mobile phone saves the injection menu information corresponding to at least one second application among the multiple application programs obtained from the configuration information into a cache.

[0151] Among them, the second application refers to an application that needs to display the injected menu information on a certain interface of the setting application. The second application can negotiate an identifier with the setting application. The mobile phone can determine that the application is the second application by reading the identifier, and the identifier can be configured in the configuration information of the application. The identifier can be a key value corresponding to the second application and the configuration application. For example, the key value of the setting application is 1212, the key value of the file sharing app is 1212, and the key value of the camera app is 2000. According to the key value, it can be determined that the file sharing app is an application that needs to be injected into a certain interface of the setting application.

[0152] In addition to the negotiated identifier, the mobile phone can also determine whether the application is a second application based on whether the configuration information of the application includes configuration items related to the settings application. Exemplarily, the configuration information of application A includes configuration item 1: displayed in the more connection menu interface of the settings application. The configuration information of application B includes configuration item 2: displayed on the negative one screen page. The mobile phone can then determine that the menu related to application A needs to be injected into the interface of the settings application, so the mobile phone saves the injection menu information corresponding to the second application (i.e., application A) among multiple applications (i.e., application A and application B) to the cache.

[0153] In this step, the mobile phone calls thread 1 to save all the injection menu information of all the second applications into the cache, so that when the user opens any interface of the first application, the mobile phone can obtain the injection menu information corresponding to the interface from the cache and display it on the interface. In other words, when all the injection menu information that needs to be injected into the setting application is saved in the cache, no matter which interface of the setting application is displayed by the mobile phone, the corresponding target injection menu information can be displayed in the interface.

[0154] Among them, the cache is a data exchange area, and the cache is used to store data saved by sub-thread 1 and for sub-thread 2 to retrieve data. If the data is read directly from the hard disk by the processor (such as CPU) without passing through the cache, the data reading speed is slow, so the purpose of setting the cache is to speed up the efficiency of the processor reading data. When the process of the setting application is closed, the data in the cache is cleared. Therefore, each time the setting application is cold started, the setting service of the setting system needs to create a sub-thread 1 to save the injection menu information to the cache. Correspondingly, if the process of the setting application has always existed, that is, it has not been closed, then the injection menu information has been saved in the cache, and there is no need to execute S803 when starting the setting application.

[0155] The injected menu information saved to the cache is used to display in one of the settings application screens. Fig.10 As shown, the first-level menu "More Connections" and "Accessibility" are displayed on the settings interface. The user clicks "More Connections" to open the interface 1 corresponding to the More Connections menu. Interface 1 displays as shown Fig.10 The second-level menus shown include the file sharing menu, smart travel menu, etc.

[0156] The user clicks "Accessibility" to open the interface 2 corresponding to the "Accessibility" menu. Interface 2 displays as follows: Fig.10 The user clicks "Accessibility" to open the interface 3 corresponding to the Accessibility menu. Interface 3 displays the following: Fig.10The screen reading menu shown. The injected menu information can be the content displayed in interface 1, interface 2, and interface 3, such as the injected menu information is the file sharing menu and smart travel menu in interface 1, the injected menu information is the accessibility menu in interface 2, and the injected menu information is the screen reading menu in interface 3.

[0157] Continue to refer Fig.10 The injected menu information includes a menu name 1001, description information 1002, or a menu icon 1003. The description information 1002 is used to indicate the on / off state of the application function corresponding to the menu item. By performing a trigger operation such as clicking, touching, or dragging on the injected menu information, the application function of the second application can be managed and controlled.

[0158] S804: In response to a triggering operation on a menu option in interface 1, the mobile phone displays interface 2 corresponding to the first application.

[0159] This embodiment is explained by taking the injection menu information displayed in the second level interface of the setting application as an example, so interface 2 is the interface switched to after the mobile phone receives the user's trigger operation for the menu option in interface 1. In other words, interface 2 is the second level interface of the menu option in interface 1.

[0160] Reference again Fig.10 , taking the menu option "More Connections" as an example, then Interface 1 is the first-level interface that displays the More Connections menu, and Interface 2 is the second-level interface that displays the File Sharing menu and Smart Travel menu after clicking the More Connections menu. Among them, the first-level interface can be understood as the first interface after starting the Settings application, and the second-level interface can be understood as the interface that can be entered through a trigger operation on the first-level interface.

[0161] In actual applications, interface 2 can be one of the interfaces entered by launching the first application, that is, interface 2 can be a first-level interface, a second-level interface, or a third-level interface. This embodiment does not limit which interface the injected menu information is displayed on, and it can be selected according to actual needs.

[0162] Let's continue to use the example of interface 2 being the second-level interface. Setting the application to have multiple interfaces, such as Fig.11 As shown, the setting interface includes interface 1 and interface 2. When the setting application is cold started, interface 1 is displayed, and the user performs a trigger operation for a menu option in interface 1. The mobile phone receives the trigger operation and switches to interface 2 in response to the trigger operation.

[0163] After executing S804, the static menu on interface 2 can be displayed directly. The injected menu can only be displayed after obtaining the injected menu information from the cache. Since it takes about 100ms-200ms for sub-thread 1 to save all the injected menu information to the cache, there are three situations depending on whether there is injected menu information in the cache. You can refer to Fig.12 .

[0164] Case 1: No injected menu information has been saved in the cache.

[0165] In case 1, sub-thread 1 has not started to save the injection menu information, so there is no injection menu information in the cache, and the subsequent sub-thread 2 will not execute the step of obtaining the injection menu information in the cache. According to the existing mechanism, the main thread of the setting application will obtain the injection menu information from the configuration information. That is to say, in this case, the mobile phone obtains the injection menu information once.

[0166] Case 2: All the injected menu information has been saved in the cache.

[0167] In case 2, sub-thread 1 has completed the operation of saving all the injection menu information, so all the injection menu information has been saved in the cache, and then sub-thread 2 will obtain the injection menu information to be displayed on the second interface from the cache. That is to say, in this case, the number of times the mobile phone obtains the injection menu information is also 1.

[0168] Case three: some of the injected menu information is saved in the cache.

[0169] In case 3, the steps executed by subthread 1 and subthread 2 are parallel, that is, when subthread 1 starts saving, if interface 2 is open, subthread 2 can obtain it from the cache. Then, when only part of the injection menu information is saved in the cache, the injection menu information that needs to be displayed on the second interface may not be saved in the cache, so subthread 2 will not be able to obtain the data when it tries to obtain it. At this time, subthread 2 has already performed an acquisition action, so when it fails to obtain the data, the second interface cannot display the unobtained data.

[0170] In order to make the solution more universal, no matter which of the above situations 1 to 3 is selected, the mobile phone will execute the following S805. However, in situations 1 and 2, since the injection menu information in the second interface is normally displayed, there is no refresh of the interface from being unable to display the injection menu information to being able to display the injection menu information. In other words, this solution can reduce the probability of the injection menu information being unable to be displayed when situation 3 occurs, so that the menu display is more complete.

[0171] S805 . The mobile phone sets a monitoring for the target injection menu information corresponding to at least one target application in at least one second application to be displayed on interface 2 .

[0172] The target injection menu information of the target application is used to be displayed in interface 2. Fig.13 As shown, the applications installed in the mobile phone include a first application and multiple applications, wherein the multiple applications include a second application, and the second application includes a target application. Corresponding to the multiple applications is configuration information, which includes injection menu information, which corresponds to the second application; the injection menu information includes target injection menu information, which corresponds to the target application. Therefore, when switching to interface 2, the mobile phone will set a monitor for the target menu information to be displayed on interface 2, that is, each target injection menu information is set with a monitor, and the number of monitors corresponds to the number of target injection menu information displayed on interface 2.

[0173] In some embodiments, the listener is set after the mobile phone receives the trigger operation, because after the mobile phone receives the trigger operation, it can determine the interface to be switched to, and thus determine the target injection menu information to be displayed on the interface. Of course, the listener can also be set after the display interface 2, and can be adjusted as needed in actual use.

[0174] The listener is used to monitor the saving progress of the injected menu information. When all the injected menu information is saved in the cache, the mobile phone triggers the listener to send a notification message. The notification message is used to indicate that all the injected menu information is saved in the cache.

[0175] S806: If the mobile phone monitors the notification information, the mobile phone obtains the target injection menu information from the cache.

[0176] Regarding the first situation mentioned above, before the mobile phone enters interface 2, the injection menu information has not yet started to be saved. Then after the mobile phone enters interface 2, the listener will not be triggered, and the main thread of the mobile phone will obtain the target injection menu information from the configuration information and display it on interface 2.

[0177] Regarding the second situation mentioned above, before the mobile phone enters interface 2, the injection menu information has been saved in the cache. Then after the mobile phone enters interface 2, the listener will not be triggered. The mobile phone's child thread 2 will obtain the target injection menu information from the cache and display it on interface 2.

[0178] Regarding the third situation mentioned above, before the mobile phone enters interface 2, part of the injection menu information is saved in the cache. After the mobile phone enters interface 2, sub-thread 2 fails to obtain the target injection menu information, and the menu is lost in interface 2. Since sub-thread 1 is still saving the injection menu information, when sub-thread 1 has saved all the injection menu information, it sends a callback. The listener listens to the callback (or sub-thread 1 sends a notification message to the listener), and the mobile phone once again executes the operation of obtaining the target injection menu information from the cache. Since this operation is performed after all the injection menu information has been saved, the mobile phone can obtain the target injection menu information and display it on interface 2.

[0179] That is to say, in situation three, subthread 2 performs one acquisition operation, and the main thread performs one acquisition operation, and the mobile phone performs two acquisition operations in total. In the first acquisition operation, the menu may be lost, and in the second acquisition, the data corresponding to the menu is obtained, so the menu can be restored after refreshing. Then, when the time between starting the setting application and displaying interface 2 is less than or equal to the preset time, that is, when situation three is met, interface 2 will refresh from not displaying the target injection menu information to displaying the target injection menu information.

[0180] For example, Fig.14 As shown, in case one, sub-thread 1 has not started to save the injection menu information, so the main thread obtains the target injection menu information from the configuration information, that is, the mobile phone performs an acquisition operation. In case two, sub-thread 1 has saved all the injection menu information to the cache, so sub-thread 2 obtains the target injection menu information from the cache, that is, the mobile phone also only performs an acquisition operation once. In case three, sub-thread 1 is saving the injection menu information but the target injection menu information has not been saved to the cache, so sub-thread 2 has not obtained the target injection menu information. After the notification information is monitored, it means that all the injection menu information is saved to the cache, and the main thread obtains the target injection menu information from the cache, that is, the mobile phone performs two acquisition operations, and ensures that the second acquisition operation obtains the target injection menu information from the injection menu information that has been saved, thereby avoiding the loss of the target application's menu.

[0181] After the target injection menu information is obtained, it can be displayed on interface 2. Among them, interface 2 can be any interface of the setting application. In the embodiment of the present application, the injection menu information of the second application is the injection menu information displayed on any interface of the setting application. The injection menu information of different second applications can be displayed on the same interface or on different interfaces. The different interfaces can be two interfaces of the same level or interfaces of different levels. Taking the interface displayed by starting the setting application as the first-level interface as an example, when the menu option of the first-level interface is clicked, the second-level interface can be entered, and different menu options correspond to different second-level interfaces. The injection menu information of the second application can be the information displayed on two different second-level interfaces, so the injection menu information of the second application can be said to be displayed on different interfaces of the same level. The injection menu information of the second application can also be the information displayed on the first-level interface and the second-level interface, so the injection menu information of the second application can be said to be displayed on interfaces of different levels.

[0182] The above embodiment is described by taking the example that the target injection menu information needs to be displayed on the interface 2. In actual application, after the target injection menu information is obtained, the following S807 may be executed.

[0183] S807: The mobile phone determines whether to display the target injection menu information.

[0184] S807 specifically includes: the mobile phone determines whether to display the target injection menu information according to the configuration information, and / or when the mobile phone system is Android TM In the case of the system, the mobile phone reads the display conditions of the file configuration by calling the manifest.xml file (or manifest file) of the target application.

[0185] The configuration information of each application may be configured with display conditions, such as the display conditions including: the menu is displayed at location A, but not displayed at location B.

[0186] The mobile phone queries whether the configuration information contains the configuration items of the display conditions. If the configuration items of the display conditions are not included, the mobile phone displays the target injection menu information. If the configuration items of the display conditions are included, it is further determined whether the display conditions are met according to the display conditions. For example, if the menu is displayed at location A, it can be determined that the target injection menu information needs to be displayed at location A according to the address of the mobile phone.

[0187] In addition to configuration information, the manifest.xml file of the target application may also be configured with display conditions, such as display conditions including: the menu is displayed when the target application does not have an entry on the desktop. After the mobile phone obtains the target injected menu information, it queries whether the manifest.xml file contains configuration items for display conditions. If the configuration items for display conditions are not included, the mobile phone displays the target injected menu information. If the configuration items for display conditions are included, it is further determined whether the display conditions are met based on the display conditions. For example, if the file sharing application does not have an entry on the desktop, it can be determined that the target injected menu information needs to be displayed.

[0188] In some embodiments, if any of the above-mentioned display conditions is satisfied, S808 is executed. Or if the display conditions in the above-mentioned configuration information are satisfied and the display conditions in the manifest.xml file are satisfied, S808 is executed. Otherwise, the mobile phone executes S809.

[0189] S808. If yes, the mobile phone displays target injection menu information on interface 2.

[0190] S809. If not, the mobile phone does not display the target injection menu information on interface 2.

[0191] In the embodiment of the present application, the meaning of the target injection menu information not being displayed on the interface 2 is different from the meaning of the target injection menu information being lost. Fig.15 As shown in (a), interface 2 is the second-level interface of the setting application, and the second-level interface displays the NFC menu, file sharing menu, smart travel menu, mobile screen projection menu, print menu, VPN menu and DNS menu, among which the file sharing menu and smart travel menu are the target injection menus and are both displayed in interface 2. Fig.15 The difference of (a) is that in Fig.15 The interface 2 shown in (b) does not include the Smart Travel menu, that is, the menu is not displayed in the interface 2. Unlike the lost menu, which can be refreshed by returning to the first level interface and then entering the second level interface, the menu that is not displayed in the interface 2 will not be displayed even if you return to the first level interface and then enter the second level interface. Fig.15 (a) corresponds to the interface 2 described in S808, Fig.15 (b) corresponds to interface 2 described in S809.

[0192] In some embodiments, a placeholder for each menu option is pre-set on the interface 2 displayed by the mobile phone to indicate the display position (including display order and display area) of each menu option. When the interface 2 does not need to display a certain target injection menu information, the node occupied by the target injection menu information will be removed, so that the menu options after the target injection menu information are moved up in the display order. Fig.15 As shown in (c), the mobile screen projection menu, print menu, VPN menu and DNS menu are all moved upward by a placeholder, so that the presentation effect of interface 2 is better.

[0193] The above is explained by taking the case where the mobile phone obtains the target injection menu information, but the target injection menu information does not need to be displayed on the interface 2 as an example. In some embodiments, it may happen that both the sub-thread 2 and the main thread obtain the target injection menu information, but the target application is not installed in the mobile phone. In this case, the sub-thread 2 and the main thread cannot obtain the target injection menu information of the target application. If the menu option of the target injection menu information is pre-placed on the interface 2, the menu option will be deleted, so that the presentation effect of the interface 2 is better.

[0194] That is to say, there may be three situations in which the mobile phone removes the menu options corresponding to the target injection menu information. The first is that the target injection menu information is not obtained. The second is that the target injection menu information is obtained, but the configuration item of the display condition in the configuration information indicates that the target injection menu information does not need to be displayed. The third is that the target injection menu information is obtained, but the configuration item of the display condition in the manifest.xml file indicates that the target injection menu information does not need to be displayed.

[0195] In addition to the above three situations, if interface 2 does not display the target injection menu information, it means that the menu is lost. Since this embodiment can monitor whether the data has been saved, when the data is saved, the main thread will obtain the data again and display it on interface 2, so that interface 2 can display the target injection menu information.

[0196] In some embodiments, interface 2 includes multiple menu groups, each menu group displays at least one menu option. When child thread 2 fails to obtain the target injection menu information and removes the corresponding menu option, the main thread cannot determine which menu group to display the target injection menu information even if it re-obtains the target injection menu information.

[0197] Based on this, when the target injected menu information is to be displayed in the menu group of interface 2, after the mobile phone executes S804, the mobile phone also executes the following steps: recording the grouping identifier of the menu group where the target injected menu information is to be displayed. This step can be executed simultaneously with S805, or in sequence.

[0198] The purpose of recording the grouping identifier of the menu group is that when the child thread 2 removes the menu option corresponding to the target injected menu information, the main thread needs to recreate the menu option, so it is necessary to determine which menu group the menu option belongs to, so as to add the menu option to the corresponding menu group.

[0199] like Fig.16 As shown, the NFC menu, file sharing menu and smart travel menu belong to the same menu group, and the file sharing menu and the smart travel menu display the target injection menu information. Therefore, after displaying interface 2, the main thread records the menu group to which the file sharing menu belongs and the menu group to which the smart travel menu belongs, so that when the menu options of the file sharing menu are deleted or the menu options of the smart travel menu are deleted and need to be restored, the grouping identifier of the menu group to which the deleted menu options belong can be used to determine which menu group the deleted menu options belong to, and place them in the original menu group, so as to avoid the high degree of change in the distribution position of the menus in interface 2, which may cause discomfort to the user due to sudden changes in the screen.

[0200] The specific implementation process of the child thread 2 deleting the menu option and the main thread recording the parent node of the menu option is described below.

[0201] After the phone cold-starts the settings application, sub-thread 1 starts to save the injection menu information. During the saving process, the user clicks the More Connections menu in interface 1 to switch the phone to interface 2. After opening interface 2, the phone saves the parent node (corresponding to the above menu group) of the menu option corresponding to each target injection menu information. At the same time, sub-thread 2 obtains the target injection menu information from the cache. Since the injection menu information has not been saved yet, it may happen that the target injection menu information has not been saved in the cache, so sub-thread 2 does not obtain the target injection menu information, and sub-thread 2 deletes the menu option corresponding to the target injection menu information.

[0202] In this way, the menu option corresponding to the target injection menu information is deleted, so its parent node is empty. Then, after listening to the notification message, the main thread can also determine whether the menu option is deleted by judging whether the parent node of the menu option corresponding to the target injection menu information is empty. If the menu option has been deleted, the target injection menu information is obtained from the cache again. In other words, by judging the parent node of the menu option corresponding to each target injection menu information, it can also be determined whether the target injection menu information needs to be obtained again.

[0203] In summary, the embodiment of the present application provides a menu display method. After the user opens the interface corresponding to the menu option of the target injection menu information, the mobile phone registers a monitor for each target injection menu information to monitor whether the injection menu information has been saved. The mobile phone also saves the parent node of each target injection menu information, which is used to query the display position of the menu option through the parent node when the menu option corresponding to the target injection menu information is deleted. When the notification information is monitored, it means that after displaying the interface, the child thread 1 has not saved all the injection menu information to the cache, so in order to prevent the target injection menu information from not being obtained, the mobile phone will obtain the target injection menu information from the cache again, and display it in the menu group corresponding to the parent node according to its parent node. In the embodiment of the present application, when the child thread 2 does not obtain the target injection menu information, by setting the monitor so that the child thread 1 saves all the injection menu information to the cache, the main thread is triggered to obtain the target injection menu information from the cache to reduce the probability of menu loss, thereby improving the user experience.

[0204] Some other embodiments of the present application provide an electronic device, which may include: the above-mentioned display screen (such as a touch screen), a memory and one or more processors. The display screen, the memory and the processor are coupled. The memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device can execute the various functions or steps executed by the mobile phone in the above-mentioned method embodiment. The structure of the electronic device can refer to Figure 6 The structure of the mobile phone is shown.

[0205] The present application also provides a chip system, such as Fig.17 As shown, the chip system includes at least one processor 1701 and at least one interface circuit 1702. The processor 1701 and the interface circuit 1702 can be interconnected through a line. For example, the interface circuit 1702 can be used to receive signals from other devices (e.g., a memory of an electronic device). For another example, the interface circuit 1702 can be used to send signals to other devices (e.g., the processor 1701).

[0206] For example, the interface circuit 1702 may read instructions stored in a memory in the electronic device, and send the instructions to the processor 1701. When the instructions are executed by the processor 1701, the electronic device may execute the steps in the above embodiments.

[0207] An embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes each function or step executed by the mobile phone in the above-mentioned method embodiment.

[0208] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute each function or step executed by the mobile phone in the above method embodiment.

[0209] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0210] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0211] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0212] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0213] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0214] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A menu display method, characterized in that: Used in electronic equipment, including: Launch the first application; Saving menu information of the second application to be displayed in one of the interfaces of the first application in a cache of the electronic device; If an operation of opening a first interface corresponding to the first application is received within a preset time period from when the first application is started, the first interface is displayed, and the first interface does not include target menu information; wherein the target menu information is menu information displayed by the second application on the first interface, and the preset time period is the time period required to save all the menu information to the cache of the electronic device; monitoring notification information indicating that all the menu information is saved in the cache, and acquiring target menu information for display on the first interface from the cache; The first interface is refreshed, and the refreshed first interface includes the target menu information.

2. The method according to claim 1, characterized in that After detecting an operation of opening the first interface corresponding to the first application, the method further includes: A listener is set for each target menu information to be displayed on the first interface, and the listener is used to monitor the saving progress of the menu information. When all the menu information is saved to the cache, the listener is triggered to send the notification information.

3. The method according to claim 1, characterized in that The method further comprises: If the target menu information is to be displayed in a menu group of the first interface, recording a group identifier of the menu group; The displaying of the first interface, wherein the first interface includes the target menu information, includes: The first interface is displayed, and the menu group corresponding to the group identifier in the first interface includes the target menu information.

4. The method according to any one of claims 1 to 3, characterized in that The step of saving the menu information of the second application to be displayed in one of the interfaces of the first application to the cache of the electronic device includes: Calling the first thread of the first application to obtain configuration information of multiple application programs installed in the electronic device; Calling the first thread to determine that the application is a second application according to the configuration information of the application; The first thread is called to save the menu information in the configuration information corresponding to the application into a cache.

5. The method according to claim 1, characterized in that The displaying of the first interface, wherein the first interface does not include the target menu information, includes: Calling the second thread of the first application to obtain the target menu information from the cache; It is determined that the target menu information is not obtained, and the first interface is displayed, where the first interface does not include the target menu information.

6. The method according to any one of claims 1 to 3, characterized in that The acquiring, from the cache, target menu information for displaying on the first interface includes: The main thread of the first application is called to obtain the target menu information for display on the first interface from the cache.

7. The method according to any one of claims 1 to 3, characterized in that The first application includes a system setting application; and starting the first application includes: When the process of the system setting application is not started, the system setting application is started.

8. The method according to any one of claims 1 to 3, characterized in that The first interface is an interface displayed after a trigger operation for a menu option in the second interface is detected, and the second interface includes an interface displayed after the first application is started.

9. The method according to any one of claims 1 to 3, characterized in that: The displaying of the first interface, wherein the first interface includes the target menu information, includes: If the target menu information meets the display condition, the first interface is displayed, and the first interface includes the target menu information.

10. The method according to any one of claims 1 to 3, characterized in that: The configuration information of the second application includes indication information for indicating that menu information of the second application is to be displayed in one of the interfaces of the first application.

11. An electronic device, characterized in that: include: A processor, a display screen, and a memory for storing instructions executable by the processor, wherein when the processor is configured to execute the instructions, the electronic device implements the method as claimed in any one of claims 1 to 10.

12. A computer-readable storage medium, characterized in that: The method comprises computer instructions, and when the computer instructions are executed on the electronic device, the electronic device executes the method according to any one of claims 1 to 10.