Interface jumping method and device, electronic equipment and storage medium
By using the jump link management interface for jumps, the problem of fixed interface jump logic is solved, which improves stability and scalability, and reduces maintenance costs and resource waste.
Patent Information
- Application Number
- CN202511408874.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-28
- Publication Date
- 2026-01-13
AI Technical Summary
In existing technologies, the interface navigation logic is fixed and hard-coded in the code, resulting in high maintenance costs, poor stability, and an increased probability of interface navigation errors.
A unified management system for navigation between interfaces is adopted. The navigation link status is determined by the interface type and navigation event, unused resources are released, and navigation links in frozen or active states are created, reducing the need to write logic code.
It reduces the maintenance cost of interface transitions, decreases the probability of errors, improves the stability and scalability of interface transitions, optimizes resource usage, and enhances interface display efficiency and user experience.
Smart Images

Figure CN121326326A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to an interface switching method, apparatus, electronic device and storage medium. Background Technology
[0002] With the development of computer technology, applications will have more and more business functions, and the corresponding interactions will become more and more intensive, making the logic for switching between interfaces increasingly complex. Due to the limited hardware capabilities of terminals and their sensitivity to power consumption, performance optimization for interface transitions is a key focus.
[0003] In related technologies, programmers typically hard-code the transition logic between interfaces. For example, a programmer might hardcode the transition logic—"Clicking a button on an interface should, if the application version is compatible, display the full-screen store interface and release all resources to hide it; otherwise, only display the store pop-up and release some resources to hide it"—into the code corresponding to that interface. During user interaction, this code is strictly executed.
[0004] However, as the number of interfaces increases, programmers need to write a lot of logic code, which increases the maintenance cost of interface transitions and also increases the probability of interface transition errors, affecting the stability of interface transitions. Summary of the Invention
[0005] This disclosure provides a method, apparatus, electronic device, and storage medium for interface navigation, achieving the goal of unified management of navigation between various interfaces using a navigation link. It eliminates the need for programmers to write navigation logic code for each interface, reducing maintenance costs, decreasing the probability of navigation errors, and improving navigation stability. The technical solution of this disclosure is as follows:
[0006] According to one aspect of the embodiments of this disclosure, a method for interface navigation is provided, including:
[0007] Display the first screen;
[0008] In response to a screen jump event from the first screen to the second screen, if the second screen is a sub-screen, the second screen is added to the end of the first jump link where the first screen is located. The first jump link is the jump link that is currently active.
[0009] If the second interface is the main interface, then create a second jump link with the second interface as the root node, set the first jump link to a frozen state, and set the second jump link to an active state;
[0010] Display the second interface, and release the resources of the interface in the first jump link based on the state of the first jump link;
[0011] Each jump link includes at least one node, each node is used to indicate an interface, and each jump link is used to indicate the jump situation between interfaces.
[0012] According to another aspect of the embodiments of this disclosure, an interface transition device is provided, comprising:
[0013] The display unit is configured to display the first interface;
[0014] The first processing unit is configured to execute an interface jump event in response to the first interface to the second interface. If the second interface is a sub-interface, the second interface is added to the end of the first jump link where the first interface is located. The first jump link is the jump link that is currently active.
[0015] The first processing unit is further configured to perform the following actions: if the second interface is the main interface, create a second jump link with the second interface as the root node, set the first jump link to a frozen state, and set the second jump link to an active state.
[0016] The display unit is also configured to display the second interface;
[0017] The second processing unit is configured to release the resources of the interface in the first jump link based on the state of the first jump link;
[0018] Each jump link includes at least one node, each node is used to indicate an interface, and each jump link is used to indicate the jump situation between interfaces.
[0019] In some embodiments, the second processing unit is configured to perform: if the first jump link is active, release a first proportion of resources for any interface in the first jump link other than the second interface; if the first jump link is frozen, release a second proportion of resources for any interface in the first jump link, the second proportion being greater than the first proportion.
[0020] In some embodiments, the second processing unit is configured to perform at least one of the following:
[0021] For any interface in the first jump link other than the second interface, release the portion of the graphics resources occupied by the interface;
[0022] Release some of the memory resources occupied by the interface;
[0023] Reduce the rendering resolution of the interface;
[0024] Pause the rendering process of the interface.
[0025] In some embodiments, the second processing unit is configured to perform at least one of the following:
[0026] For any interface in the first jump link, release all graphics resources occupied by the interface;
[0027] Release all memory resources occupied by the interface;
[0028] Completely stop the rendering process of the interface.
[0029] In some embodiments, an interface configuration table is pre-configured, which includes interface jump events between interfaces and the interface type of each interface, wherein the interface type includes the sub-interface and the main interface;
[0030] The device further includes:
[0031] The determining unit is configured to, upon detecting an interface jump event in the first interface, determine the second interface indicated by the interface jump event from the interface configuration table; and determine the interface type of the second interface from the interface configuration table.
[0032] In some embodiments, the apparatus further includes:
[0033] The hiding unit is configured to hide the first interface when the display attribute of the second interface is set to full-screen display.
[0034] In some embodiments, the hiding unit is configured to perform any of the following:
[0035] Move the display position of the first interface outside the display screen;
[0036] Save the node corresponding to the first interface in the first jump link where the first interface is located, and cancel rendering the first interface;
[0037] In the first redirection link where the first interface is located, delete the node corresponding to the first interface;
[0038] If the second interface is the main interface, delete the first redirect link where the first interface is located.
[0039] In some embodiments, the apparatus further includes:
[0040] The third processing unit is configured to take a screenshot of the first interface and obtain an interface image when the display attribute of the second interface is static mask display.
[0041] The display unit is further configured to display the interface image as the background image of the second interface, in addition to displaying the second interface.
[0042] In some embodiments, the display unit is further configured to perform:
[0043] In response to the closing event of the second interface, if the second interface is a sub-interface, the node corresponding to the second interface is deleted in the first jump link, and the first interface is displayed. After deleting the node corresponding to the second interface, the node of the first interface becomes the tail node in the first jump link.
[0044] If the second interface is the main interface, then delete the second jump link and display the first interface. The first jump link is the latest jump link created before the second jump link, and the node of the first interface is the tail node in the first jump link.
[0045] In some embodiments, the apparatus further includes:
[0046] The storage unit is configured to store multiple jump links. Different jump links are used to indicate the interface jump situation under different business scenarios. The root node in each jump link is used to indicate the main interface under the corresponding business scenario, and the child nodes in each jump link are used to indicate the sub-interfaces under the corresponding business scenario.
[0047] In some embodiments, the apparatus further includes:
[0048] The fourth processing unit is configured to execute an interface jump event in response to the second interface to the third interface. If the third interface already exists and the third interface is located in the created third jump link, then delete the target node in the third jump link and other jump links created after the third jump link. The target node is the node located after the corresponding node of the third interface.
[0049] The display unit is also configured to display the third interface.
[0050] According to another aspect of the embodiments of this disclosure, an electronic device is provided, the electronic device comprising:
[0051] One or more processors;
[0052] Memory used to store the executable program code of the processor;
[0053] The processor is configured to execute the program code to implement the aforementioned interface navigation method.
[0054] According to another aspect of the present disclosure, a computer-readable storage medium is provided, which, when the program code in the computer-readable storage medium is executed by the processor of an electronic device, enables the electronic device to perform the above-described interface switching method.
[0055] According to another aspect of the present disclosure, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the above-described interface jump method.
[0056] This disclosure provides an interface transition method. Upon detecting an interface transition event from a first interface to a second interface, the interface type of the second interface is first determined. If the second interface is a sub-interface, it is added to the end of the currently active first transition link. If the second interface is a main interface, a new transition link, i.e., the second transition link, is created with the second interface as the root node. The currently active transition link is then switched to the second transition link, and the first transition link is frozen. This allows the second interface indicated by the latest interface in the currently active transition link to be displayed. Based on the state of the first transition link, resources of non-displayed interfaces are released. This achieves the goal of uniformly managing transitions between interfaces using transition links. Programmers do not need to write logic code for transitions for each interface, which reduces the maintenance cost of interface transitions. It not only reduces the probability of interface transition errors and improves the stability of interface transitions, but also provides better scalability for interfaces, enabling it to cope with future complex interface requirements.
[0057] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0058] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0059] Figure 1 This is a schematic diagram illustrating the implementation environment of an interface navigation method according to an exemplary embodiment.
[0060] Figure 2 This is a flowchart illustrating an interface navigation method according to an exemplary embodiment.
[0061] Figure 3 This is a flowchart illustrating another interface navigation method according to an exemplary embodiment.
[0062] Figure 4 This is an example diagram illustrating a jump link according to an exemplary embodiment.
[0063] Figure 5 This is a framework diagram illustrating an interface transition according to an exemplary embodiment.
[0064] Figure 6 This is a framework diagram illustrating a closing interface according to an exemplary embodiment.
[0065] Figure 7 This is a block diagram illustrating an interface transition device according to an exemplary embodiment.
[0066] Figure 8 This is a block diagram illustrating a terminal according to an exemplary embodiment.
[0067] Figure 9 This is a block diagram illustrating a server according to an exemplary embodiment. Detailed Implementation
[0068] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0069] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0070] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this disclosure are authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, information such as interface jump events, jump links between interfaces, and resources occupied by interfaces involved in this disclosure were obtained with full authorization.
[0071] Figure 1 This is a schematic diagram illustrating an implementation environment for an interface transition method according to an exemplary embodiment. Taking an electronic device as an example, see [link to example]. Figure 1The implementation environment specifically includes: terminal 101 and server 102.
[0072] In some embodiments, terminal 101 is at least one of devices such as a smartphone, smartwatch, desktop computer, laptop, MP3 player, MP4 player, and laptop computer. Terminal 101 has an application installed and running that supports interface transitions. This application can be a multimedia application, a game application, a social application, or a browser, etc., and this embodiment of the disclosure does not limit this. Terminal 101 can connect to server 102 via a wireless network or a wired network. When an interface transition event is detected in the detected interface, terminal 101 can send a request to server 102 to request the service corresponding to the next interface, so as to accurately display the interface content of the next interface.
[0073] Terminal 101 generally refers to one of a plurality of terminals; this embodiment uses terminal 101 as an example. Those skilled in the art will understand that the number of terminals can be more or less. For example, there may be several terminals, or dozens or hundreds of terminals, or even more. This disclosure does not limit the number of terminals or the type of device.
[0074] In some embodiments, server 102 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), big data, and artificial intelligence platforms. Server 102 is used to provide background services for applications that support interface navigation. In some embodiments, server 102 undertakes the main computing work, and terminal 101 undertakes the secondary computing work; or, server 102 undertakes the secondary computing work, and terminal 101 undertakes the main computing work; or, server 102 and terminal 101 collaborate on computing using a distributed computing architecture.
[0075] Figure 2 This is a flowchart illustrating a user interface transition method according to an exemplary embodiment. See also: Figure 2 This interface navigation method is applied in the terminal and includes the following steps:
[0076] In step 201, the terminal displays the first interface.
[0077] In this embodiment of the disclosure, the first interface can be an interface in any application, and this embodiment of the disclosure does not limit the interface content (or visual elements) in the first interface.
[0078] In step 202, in response to an interface jump event from the first interface to the second interface, if the second interface is a sub-interface, the terminal adds the second interface to the end of the first jump link where the first interface is located. The first jump link is the jump link that is currently active.
[0079] In this embodiment, the interface transition event can be a user-triggered event on the first interface, such as clicking a control on the first interface; or, the interface transition event can also be caused by the first interface meeting a certain condition, such as a visual element on the first interface being displayed for a preset duration. This embodiment does not limit this. That is, the interface transition event from the first interface to the second interface can be actively triggered by the user or automatically triggered when a certain condition is met. This embodiment does not limit this.
[0080] Upon detecting a screen transition event from the first screen to the second screen, the terminal obtains the screen type of the second screen. Screen types include sub-screens and main screens. If the second screen is a sub-screen, the terminal determines the first transition link containing the first screen and adds the second screen to the end of the first transition link. The transition information between screens is saved through the transition link.
[0081] The first jump link includes at least one node. Each node indicates an interface. The process of adding a second interface to the end of the first jump link is as follows: the terminal adds a node representing the second interface to the end of the first jump link. Before adding the second interface, the first jump link is the currently active jump link. When a jump link is active, it means that the user is currently interacting with or viewing this jump link directly; the interface on this jump link is visible and can respond to user actions. That is, if it is determined that the second interface is a sub-interface, the terminal adds the second interface to the end of the currently active jump link. For an active jump link, the interface indicated by the tail node (or latest node) in that jump link is the current interface that the terminal wants to display.
[0082] In step 203, in response to the interface jump event from the first interface to the second interface, if the second interface is the main interface, the terminal creates a second jump link with the second interface as the root node, sets the first jump link to a frozen state, and sets the second jump link to an active state.
[0083] In this embodiment, when the second interface is the main interface, the terminal creates a new jump link, i.e., the second jump link, with the second interface as the root node. At this time, the second jump link has only one root node. Then, the terminal sets the first jump link to a frozen state and sets the second jump link to an active state. The frozen state is an inactive state. When a jump link is in a frozen state, it means that this jump link is currently not within the user's direct interaction or viewing range; the interface on the jump link is invisible and will not respond to user operations. That is, when it is determined that the second interface is the main interface, the terminal creates a new jump link with the second interface as the root node and switches the currently active jump link from the first jump link to the newly created jump link, so as to indicate the interface indicated by the latest node in the active jump link, i.e., the second interface, for subsequent display.
[0084] In step 204, the terminal displays a second interface and releases the resources of the interface in the first jump link based on the status of the first jump link.
[0085] In this embodiment of the disclosure, the terminal displays the second interface indicated by the latest node in the currently active jump link. Then, based on the state of the first jump link, the terminal releases the resources of the interface in the first jump link. For example, when the first jump link is active, the terminal releases a portion of the resources occupied by the first interface in the first jump link; when the first jump link is frozen, the terminal releases all the resources occupied by the first interface in the second jump link.
[0086] The resources of the interface include memory resources (such as textures, meshes, scripts, animations, and audio), rendering resources (such as cameras, materials, and shaders), and logic resources (such as event listeners, timers, and network requests), etc., which are not limited in this embodiment. Among the aforementioned resources, textures include images and icons in the interface; meshes refer to 3D models in the interface; scripts refer to scripts related to interface logic; cameras refer to cameras used for rendering the interface, such as scene cameras; materials refer to material resources used for rendering the interface; event listeners are event listeners bound to visual elements in the interface; timers refer to timers or countdowns in the interface; and network requests refer to network requests that may be initiated in the interface.
[0087] This disclosure provides an interface transition method. Upon detecting an interface transition event from a first interface to a second interface, the interface type of the second interface is first determined. If the second interface is a sub-interface, it is added to the end of the currently active first transition link. If the second interface is a main interface, a new transition link, i.e., the second transition link, is created with the second interface as the root node. The currently active transition link is then switched to the second transition link, and the first transition link is frozen. This allows the second interface indicated by the latest interface in the currently active transition link to be displayed. Based on the state of the first transition link, resources of non-displayed interfaces are released. This achieves the goal of uniformly managing transitions between interfaces using transition links. Programmers do not need to write logic code for transitions for each interface, which reduces the maintenance cost of interface transitions. It not only reduces the probability of interface transition errors and improves the stability of interface transitions, but also provides better scalability for interfaces, enabling it to cope with future complex interface requirements.
[0088] In some embodiments, based on the state of the first redirect link, releasing the resources of the interface in the first redirect link includes:
[0089] If the first redirect link is active, then for any interface in the first redirect link other than the second interface, release the first proportion of resources.
[0090] If the first redirect link is frozen, then for any interface in the first redirect link, release a second proportion of resources, which is greater than the first proportion.
[0091] The solution provided in this disclosure has several advantages. Firstly, since the active jump link contains the currently displayed interface, the user is more likely to jump between interfaces within that jump link. When the first jump link is active, less resources are released for non-displayed interfaces within it, allowing for faster resource recovery and display when jumping between interfaces, thus improving display efficiency. Secondly, since the frozen jump link contains only currently undisplayed interfaces, the user is less likely to jump from the currently displayed interface to one within that jump link. When the first jump link is frozen, more resources are released for non-displayed interfaces, saving more resources and avoiding waste.
[0092] In some embodiments, for any interface in the first jump link other than the second interface, releasing a first proportion of resources includes at least one of the following:
[0093] For any interface in the first jump link other than the second interface, release the portion of the graphics resources occupied by the interface;
[0094] Release some of the memory resources occupied by the interface;
[0095] Reduce the rendering resolution of the interface;
[0096] Pause the rendering process of the interface.
[0097] The solution provided in this embodiment can release some of the graphics resources or memory resources occupied by any non-displayed interface in an active jump link, or reduce the rendering resolution of the interface and pause the rendering process of the interface, so that when jumping between interfaces in the first jump link, the released resources can be restored more quickly, and the interface can be displayed in combination with the previously unreleased resources, thereby improving the interface display efficiency.
[0098] In some embodiments, for any interface in the first jump link, releasing a second proportion of resources includes at least one of the following:
[0099] For any interface in the first jump link, release all graphics resources occupied by the interface;
[0100] Release all memory resources used by the interface;
[0101] Completely stop the rendering process of the interface.
[0102] The solution provided in this disclosure can release all graphics resources or all memory resources occupied by any non-displayed interface in a frozen jump link, or completely stop the rendering process of the interface, thereby saving more resources, avoiding resource waste, reducing lag, optimizing the performance of interface display, and improving user experience.
[0103] In some embodiments, an interface configuration table is pre-configured, which includes interface transition events between interfaces and the interface type of each interface. The interface type includes sub-interfaces and main interfaces.
[0104] The method also includes:
[0105] If a screen jump event is detected in the first screen, determine the second screen indicated by the screen jump event from the screen configuration table;
[0106] Determine the interface type of the second interface from the interface configuration table.
[0107] The solution provided in this disclosure can pre-configure the interface type of each interface through an interface configuration table. This allows the interface type to be directly determined based on the interface configuration table during interface transitions, enabling subsequent interface transitions to be implemented by determining the transition path based on the interface type. This eliminates the need for programmers to write logic code for each interface transition, reducing the maintenance cost of interface transitions. It not only reduces the probability of interface transition errors and improves the stability of interface transitions, but also allows for better scalability of interfaces by simply configuring the interface type for the newly added interface in the interface configuration table, enabling transitions between the newly added interface and other interfaces. This can meet future complex interface requirements.
[0108] In some embodiments, the method further includes:
[0109] When the second interface is set to full-screen display, the first interface is hidden.
[0110] The solution provided in this embodiment, when the display attribute of the second interface is full-screen display, hides the first interface while displaying the second interface, which can effectively reduce overdraw (referring to a pixel on the screen being drawn multiple times in the same frame). This not only improves the display effect of the second interface, but also avoids GPU overload, reduces lag, and thus benefits the user's operating experience.
[0111] In some embodiments, hiding the first interface includes any of the following:
[0112] Move the display position of the first interface outside the display screen;
[0113] Save the node corresponding to the first interface in the first jump link where the first interface is located, and cancel rendering the first interface;
[0114] In the first redirection link where the first interface is located, delete the node corresponding to the first interface;
[0115] If the second interface is the main interface, delete the first redirect link where the first interface is located.
[0116] The solution provided in this disclosure allows for the following methods during the process of hiding the first interface: The display position of the first interface can be moved directly outside the display screen. This is not only simple to operate but also reduces the recalculation of various visual elements in the interface layout. When responding to a return to the first interface, the display of the first interface can be restored quickly. Alternatively, the nodes of the first interface can be saved, and only the rendering of the first interface can be canceled, thus releasing some of the resources of the first interface. This also facilitates the quick restoration of the display of the first interface when returning to it later. Alternatively, the nodes corresponding to the first interface can be deleted, thus releasing all the resources of the first interface and saving resources. Or, the jump link where the first interface is located can be directly deleted, saving even more resources and reducing lag.
[0117] In some embodiments, the method further includes:
[0118] With the second interface set to static mask display, take a screenshot of the first interface to obtain the interface image.
[0119] Based on the display of the second interface, the interface image is displayed as the background image of the second interface.
[0120] The solution provided in this embodiment hides the first interface by using a screenshot of the first interface as the background image of the second interface when the display attribute of the second interface is static mask display. In this case, only the interface image needs to be rendered and displayed on the basis of displaying the second interface. Compared with displaying the first interface, displaying the interface image occupies less resources, avoids resource waste, and can reduce lag.
[0121] In some embodiments, the method further includes:
[0122] In response to the closing event of the second interface, if the second interface is a sub-interface, the node corresponding to the second interface is deleted in the first jump link, and the first interface is displayed. After deleting the node corresponding to the second interface, the node of the first interface becomes the tail node in the first jump link.
[0123] If the second interface is the main interface, then delete the second jump link and display the first interface. The first jump link is the latest jump link created before the second jump link, and the node of the first interface is the tail node in the first jump link.
[0124] The solution provided in this embodiment, when the second interface is closed, if the second interface is a sub-interface, deletes the node of the second interface and directly displays the first interface indicated by the parent node of that node. This method does not require reloading the first interface, reducing user waiting time, releasing resources occupied by the sub-interface, and reducing resource consumption. If the second interface is the main interface, directly deletes the second jump link where the second interface is located and displays the first interface indicated by the tail node in the previous jump link. This method also does not require reloading the first interface, reducing user waiting time, releasing resources occupied by the entire jump link, and reducing even more resource consumption.
[0125] In some embodiments, the method further includes:
[0126] Multiple jump links are stored. Different jump links are used to indicate the interface jump situation under different business scenarios. The root node in each jump link is used to indicate the main interface under the corresponding business scenario, and the child nodes in each jump link are used to indicate the sub-interfaces under the corresponding business scenario.
[0127] The solutions provided in this disclosure, due to the varying frequency and complexity of interface transitions in different business scenarios, can employ different transition links for management in different business scenarios. This allows for precise control over the display and hiding of interfaces. For example, in high-frequency transition scenarios, the display position of the interface shown before the transition can be moved off-screen instead of being directly destroyed, effectively reducing the frequent loading and unloading of rendering resources, lowering the burden on the GPU and CPU, and improving rendering efficiency. Alternatively, through link management, the interface before the transition can be cached instead of being reloaded each time, reducing redundant loading and improving performance. For low-frequency transition scenarios, interfaces that are no longer displayed can be directly destroyed, reducing resource waste.
[0128] In some embodiments, the method further includes:
[0129] In response to a screen jump event from the second screen to the third screen, if the third screen already exists and is located in the created third jump link, then delete the target node in the third jump link and other jump links created after the third jump link. The target node is the node located after the corresponding node in the third screen.
[0130] The third interface is displayed.
[0131] The solution provided in this embodiment can directly determine the third jump link where the third interface is located when jumping from the currently displayed second interface to the previously displayed third interface. Other jump links created after the third jump link and interfaces after the third interface are deleted so that the node of the third interface is the latest node. This allows the third interface to be displayed based on the node in the future, without having to reload the third interface, reducing the user's waiting time and improving the efficiency of jumping between interfaces.
[0132] The above Figure 2 The diagram shown is merely the basic process of this disclosure. The following section will further elaborate on the solution provided in this disclosure based on a specific implementation method. Figure 3 This is a flowchart illustrating another interface transition method according to an exemplary embodiment. Taking an electronic device provided as a terminal as an example, see [link to example]. Figure 3 The methods for redirecting to this interface include:
[0133] In step 301, the terminal displays the first interface.
[0134] In this embodiment of the disclosure, the first interface can be an interface in any business scenario, such as a shopping mall interface in a shopping scenario or a game interface in a game scenario. This embodiment of the disclosure does not limit the first interface.
[0135] In step 302, if a screen jump event is detected in the first screen, the terminal determines the second screen indicated by the screen jump event from the screen configuration table; and determines the screen type of the second screen from the screen configuration table.
[0136] In this embodiment, an interface configuration table is pre-configured. The interface configuration table includes interface transition events between interfaces and the interface type of each interface. Interface transition events refer to events that enable navigation from one interface to another. These events can be operation events within the interface (such as clicks, swipes, etc.) or preset conditions met within the interface (such as the end of a match in a game interface). This embodiment does not limit the types of interface transition events. Interface types include sub-interfaces and main interfaces. The main interface can be the main interface for any business scenario, and sub-interfaces can be sub-interfaces for any business scenario.
[0137] When a screen transition event occurs on the first screen, the terminal queries the screen configuration table to determine the second screen indicated by the screen transition event, and then determines the screen type of the second screen from the screen configuration table. The solution provided in this disclosure allows for pre-configuration of the screen types of each screen through the screen configuration table. This enables the direct determination of the configured screen type based on the screen configuration table during screen transitions, facilitating subsequent screen transitions by determining the transition path based on the screen type. This eliminates the need for programmers to write logic code for each screen transition, reducing maintenance costs and improving stability. Furthermore, for newly added screens, simply configuring the screen type in the screen configuration table is sufficient to enable transitions between the new screen and other screens, resulting in better scalability and the ability to handle future complex screen requirements.
[0138] For example, the main interface type can be configured using the following code:
[0139] MainMenuUI = {
[0140] UIType = "MainMenuUI"
[0141] Layer=UIConst.UILayer.Base,
[0142] Order = 0,
[0143] PrefabPath="Art / UI / Prefabs / MainPanel / MainUI.Prefab",
[0144] ScriptPath="Logic / UILogic / UIModule / Lobby / UIMainMenu",
[0145] UIStatePath="Logic / UILogic / AutoGenerate / UIState / MainMenuUIState",
[0146] Input={UIConst.BaseSceneType.LOBBY},
[0147] LayerListNodeType=UI.Const.LayerListNodeType.Root,
[0148] }
[0149] In this context, `UIType` represents the type name of the interface, used to identify it and typically used to reference or differentiate different interfaces in code. `Layer` represents the layer in which the interface resides; `UIConst.UILayer.Base` indicates that this is a base layer, typically used for the main interface or other important interfaces. `Order` indicates the interface's order within the layers. A smaller value indicates the interface appears earlier in the hierarchy. Here, setting it to 0 indicates a base interface, usually displayed before other interfaces. `PrefabPath` represents the path to the interface's prefab. This is the path to the interface's resource files used to load UI components. `UIStatePath` represents the path to the interface's state management scripts. This is the path to the interface's state management code files, typically used to manage the interface's display state. `Input` represents the interface's input scene type. Here, it indicates that the interface is available in the "LOBBY" scene. `UIConst.BaseSceneType.LOBBY` is a constant used to represent the main menu scene. `LayerListNodeType` represents the type of the interface in the navigation chain. `UIConst.LayerListNodeType.Root` indicates that this is a root node interface, typically used for the main interface or other independent interfaces. The code snippet above is an example of interface configuration, used to define the interface type, layers, sorting, resource paths, logic script paths, input scenario types, and the type of navigation link (root node or child node). This configuration allows for easy management and navigation between different interfaces, improving development efficiency and user experience.
[0150] In step 303, if the second interface is a sub-interface, the terminal adds the second interface to the end of the first jump link where the first interface is located. The first jump link is the jump link that is currently active.
[0151] In this embodiment of the disclosure, when the second interface is a sub-interface, the terminal obtains the currently active jump link, i.e., the first jump link where the first interface is located. Then, the terminal adds a child node at the end of the first jump link, using this child node to represent the second interface, and creates an instance of the second interface for subsequent display.
[0152] Each node in a navigation chain is a logical unit representing the position and state of the interface within the chain. The node itself does not directly correspond to a specific UI instance; instead, it manages the UI's lifecycle processes, such as showing, hiding, and destroying it. An UI instance is a concrete UI object, typically a GameObject or similar object, used for actual rendering and interaction. An instance is the specific object referenced by a node. Nodes can be used to cache instances of the corresponding UI to reduce redundant loading when navigating to that UI again.
[0153] In step 304, if the second interface is the main interface, the terminal creates a second jump link with the second interface as the root node, sets the first jump link to a frozen state, and sets the second jump link to an active state.
[0154] In this embodiment, when the second interface is the main interface, the terminal creates a new navigation link, i.e., the second navigation link, with the second interface as the root node. Then, the terminal freezes the first navigation link, ceasing to process interface navigation based on it; and activates the second navigation link, so subsequent interface navigation events will be processed on this second navigation link. In short, when navigating to a new main interface, the terminal creates a new navigation link with this main interface as the root node. This new navigation link is independent of the first navigation link.
[0155] The "frozen" state indicates that the interfaces indicated by each node in the navigation chain are hidden, no new navigation requests are processed, and users cannot navigate to other interfaces through this navigation chain. Interfaces in a frozen navigation chain still exist, but are not activated or updated. The "active" state indicates that the interface indicated by the latest node in the navigation chain is displayed. All user operations are performed on navigation chains in the active state, and the system manages all interface navigation and states within this chain. The core of this approach is managing navigation between the main interface and sub-interfaces by creating new navigation chains. Its benefits include independent management of interface navigation, optimized resource consumption, improved user experience, and simplified development and maintenance. This method allows for better management of complex interface navigation logic, improving overall application performance and user experience.
[0156] In some embodiments, the terminal can store multiple jump links. Different jump links are used to indicate interface jump situations under different business scenarios. The root node in each jump link is used to indicate the main interface under the corresponding business scenario. The child nodes in each jump link are used to indicate the sub-interfaces under the corresponding business scenario. Business scenarios can be game scenarios, shopping scenarios, etc., and this disclosure does not limit them. The solution provided by this disclosure can manage interface jump situations under different business scenarios by using different jump links, since the interface jump frequency and complexity vary in different business scenarios. It can precisely control the display and hiding of the interface. For example, in high-frequency jump business scenarios, the display position of the interface displayed before the jump can be moved off-screen instead of being destroyed directly, which can effectively reduce the frequent loading and unloading of rendering resources, reduce the burden on the GPU and CPU, and improve rendering efficiency; or the interface before the jump can be cached through link management instead of being reloaded every time, reducing repeated loading and improving performance; while for low-frequency jump business scenarios, the interface that is no longer displayed can be destroyed directly to reduce resource waste.
[0157] For example, Figure 4 This is an example diagram illustrating a jump link according to an exemplary embodiment. See also... Figure 4 There are currently 4 navigation links. The root node of each navigation link represents a main interface (such as the login main interface, lobby main interface, preparation main interface, and battle main interface). The child nodes of each navigation link represent a sub-interface (such as the announcement interface, card library interface, upgrade interface, and battle end settlement interface).
[0158] In step 305, the terminal displays the second interface based on the display attributes of the second interface, and releases the resources of the interface in the first jump link based on the status of the first jump link.
[0159] In this embodiment, the interface display attributes include two types: full-screen display and static masking display. Static masking display indicates that the main content and interface elements of the previous interface (such as the first interface) are covered by a static layer (usually semi-transparent), and the second interface is displayed on top of this layer. For example, if the second interface is a pop-up window, its display attribute can be static masking display, which will not completely obscure the first interface. This display attribute can also be stored through the aforementioned interface configuration table. The terminal displays the second interface according to its display attributes.
[0160] In some embodiments, when the display attribute of the second interface is full-screen, the terminal can also hide the first interface. The solution provided by the embodiments of this disclosure, when the display attribute of the second interface is full-screen, hides the first interface while displaying the second interface, which can effectively reduce overdraw (referring to a pixel on the screen being drawn multiple times in the same frame), not only improving the display effect of the second interface, but also avoiding GPU overload, reducing lag, and thus benefiting the user's operating experience.
[0161] This disclosure does not limit the method of hiding the first interface. Four hiding methods are exemplified below, but are by no means limited thereto.
[0162] The first method of hiding the interface involves moving the display position of the first interface off-screen. That is, the terminal moves the position of each pixel in the first interface entirely off-screen while maintaining the relative positions of the pixels (i.e., maintaining the layout of the visual elements in the first interface). Directly hiding the interface incurs some performance overhead, and for more complex interfaces, it may cause lag on low-end devices. Therefore, we adopted the operation of moving the interface off-screen, while pausing some interface update logic to reduce lag.
[0163] The second method of hiding the rendering process involves the terminal saving the node corresponding to the first interface in the first redirection link, and then canceling the rendering of the first interface. In other words, the terminal saves the interface instance of the first interface, but only deletes the rendering logic of the first interface or pauses the rendering process of the first interface. In short, the terminal releases some of the resources occupied by the first interface.
[0164] The third method of hiding the interface involves the terminal deleting the node corresponding to the first interface from the first redirection link. In other words, the terminal releases all resources occupied by the first interface.
[0165] The fourth method of hiding is to delete the first redirect link where the first interface is located if the second interface is the main interface. That is, when switching redirect links, the terminal can delete the previous redirect link and release the resources occupied by the previous redirect link.
[0166] The solution provided in this disclosure allows for the following methods during the process of hiding the first interface: The display position of the first interface can be moved directly outside the display screen. This is not only simple to operate but also reduces the recalculation of various visual elements in the interface layout. When responding to a return to the first interface, the display of the first interface can be restored quickly. Alternatively, the nodes of the first interface can be saved, and only the rendering of the first interface can be canceled, thus releasing some of the resources of the first interface. This also facilitates the quick restoration of the display of the first interface when returning to it later. Alternatively, the nodes corresponding to the first interface can be deleted, thus releasing all the resources of the first interface and saving resources. Or, the jump link where the first interface is located can be directly deleted, saving even more resources and reducing lag.
[0167] In other embodiments, when the display attribute of the second interface is static mask display, the terminal takes a screenshot of the first interface to obtain an interface image. Based on displaying the second interface, the terminal uses this interface image as the background image of the second interface. That is, the terminal uses the screenshot-obtained interface image instead of the first interface for display. The solution provided by this disclosure, when the display attribute of the second interface is static mask display, uses the interface image obtained by taking a screenshot of the first interface as the background image of the second interface to hide the first interface. In this case, based on displaying the second interface, only the interface image needs to be rendered and displayed. Compared to displaying the first interface, displaying the interface image occupies fewer resources, avoiding resource waste and reducing lag.
[0168] For example, Figure 5 This is a framework diagram illustrating interface transitions according to an exemplary embodiment. See also... Figure 5 During the transition from the first interface to the second interface, the terminal checks whether the second interface is the main interface. If the second interface is not the main interface but a sub-interface, the terminal adds the second interface to the end of the first transition link containing the first interface. If the second interface is the main interface, the terminal creates a new transition link with the second interface as the root node, i.e., the second transition link. Then, the terminal checks whether the display attribute of the second interface is full-screen. If the display attribute of the second interface is full-screen, the terminal hides other interfaces (including the first interface) and turns off the scene camera used to render other interfaces. If the display attribute of the second interface is static mask display, the terminal takes a screenshot of the first interface and displays the screenshot image as the background image of the second interface.
[0169] The root node hides all interfaces in the previous navigation link. The root node is the main interface of the business scenario, and no other interfaces are allowed to be displayed below it. Since the main interface is also a newly added navigation link, it hides all interfaces in the previous navigation link. Full-screen interfaces hide the preceding non-full-screen interfaces of the navigation link. That is, a full-screen interface fills the entire screen, obscuring the details of the interfaces below. Therefore, the interfaces below can be hidden. Since it exists within a specific navigation link, only the preceding non-full-screen interfaces of that link need to be hidden. Static masked interfaces hide all interfaces in the current navigation link. For pop-up-like interfaces, this solution takes a screenshot of the scene and interface below, blurs it, and uses it as the background of the current interface. This can then be treated as a full-screen interface, similar to full-screen interface processing. Since full-screen interfaces and static masked interfaces do not show the details of the interfaces below, nor the scene, we can turn off the scene's camera, effectively reducing overdraw.
[0170] In addition to displaying the second interface, the terminal can also release resources of the interfaces in the first jump link based on the state of the first jump link. The state of the first jump link can be active or frozen. For interfaces that are not currently displayed, less resources can be released for interfaces in the active jump link, and more resources can be released for interfaces in the frozen jump link. Accordingly, the process of the terminal releasing resources of the interfaces in the first jump link based on the state of the first jump link includes: if the first jump link is active, then for any interface in the first jump link other than the second interface, the terminal releases a first proportion of resources. If the first jump link is frozen, then for any interface in the first jump link, the terminal releases a second proportion of resources. The second proportion is greater than the first proportion.
[0171] For example, for an active, currently not displayed interface in a navigation chain, the terminal can keep the interface in memory. All resources of the interface (textures, scripts, animations, etc.) are still loaded, but the interface itself is not visible. That is, the terminal can pause the interface's animations and timers, but does not destroy the interface's resources. Alternatively, for an active, currently not displayed interface in a navigation chain, the terminal can release the interface's rendering resources, such as hiding the interface, disabling the scene camera and materials, to reduce GPU load. The terminal can pause the interface's animations and timers, but retain resources in memory, such as the interface's textures and scripts, for quick resumption of display. For a frozen, currently not displayed interface in a navigation chain, the terminal can destroy the interface instance, releasing all memory resources (textures, scripts, animations, etc.). In this case, the interface no longer occupies any resources and needs to be recreated to be displayed.
[0172] This disclosure does not limit the method of releasing the first proportion of resources. In some embodiments, the terminal may release the first proportion of resources using at least one of the following methods.
[0173] The first item is that, for any interface in the first jump link other than the second interface, the terminal releases part of the graphics resources occupied by the interface.
[0174] The second point is that for any interface in the first jump link other than the second interface, the terminal releases part of the memory resources occupied by the interface.
[0175] Thirdly, for any interface in the first jump link other than the second interface, the terminal reduces the rendering resolution of the interface.
[0176] Fourthly, for any interface in the first jump link other than the second interface, the terminal pauses the rendering process of the interface.
[0177] The solution provided in this embodiment can release some of the graphics resources or memory resources occupied by any non-displayed interface in an active jump link, or reduce the rendering resolution of the interface and pause the rendering process of the interface, so that when jumping between interfaces in the first jump link, the released resources can be restored more quickly, and the interface can be displayed in combination with the previously unreleased resources, thereby improving the interface display efficiency.
[0178] This disclosure does not limit the method of releasing the second proportion of resources. In some embodiments, the terminal may release the second proportion of resources using at least one of the following methods.
[0179] The first item is that, for any interface in the first jump link, the terminal releases all the graphics resources occupied by the interface.
[0180] The second point is that for any interface in the first jump link, the terminal releases all memory resources occupied by the interface.
[0181] Thirdly, for any interface in the first jump link, the terminal completely stops the rendering process of the interface.
[0182] The solution provided in this disclosure can release all graphics resources or all memory resources occupied by any non-displayed interface in a frozen jump link, or completely stop the rendering process of the interface, thereby saving more resources, avoiding resource waste, reducing lag, optimizing the performance of interface display, and improving user experience.
[0183] In some embodiments, the terminal can also manage the second interface based on the closing of the jump link interface. In response to a closing event of the second interface, if the second interface is a sub-interface, the terminal deletes the node corresponding to the second interface in the first jump link and displays the first interface. After deleting the node corresponding to the second interface, the node of the first interface becomes the tail node in the first jump link. If the second interface is the main interface, the terminal deletes the second jump link and displays the first interface. The first jump link is the latest jump link created before the second jump link, and the node of the first interface becomes the tail node in the first jump link. The solution provided by this disclosure embodiment, when the second interface is closed, if the second interface is a sub-interface, deletes the node of the second interface and directly displays the first interface indicated by the parent node of that node. This method does not require reloading the first interface, reducing user waiting time, releasing resources occupied by the sub-interface, and reducing resource consumption. If the second interface is the main interface, directly deletes the second jump link where the second interface is located and displays the first interface indicated by the tail node in the previous jump link. This method also does not require reloading the first interface, reducing user waiting time, releasing resources occupied by the entire jump link, and reducing further resource consumption.
[0184] For example, Figure 6 This is a framework diagram illustrating a closing interface according to an exemplary embodiment. See also... Figure 6 During the process of closing the second interface and displaying the first interface, the terminal displays the first interface according to its display attributes. When the first interface's display attribute is full-screen, the terminal hides the second interface, opens the scene camera of the first interface, and displays the first interface in full-screen mode. When the first interface's display attribute is static mask display, the target interface's image is displayed as the background image of the first interface, in addition to the first interface itself. The target interface is the interface corresponding to the parent node of the first interface's nodes, i.e., the interface preceding the first interface. During the transition from the target interface to the first interface, the terminal takes a screenshot of the target interface, obtains its image, and displays it as the background image of the first interface. When transitioning from the first interface to the second interface, the target interface's image can be saved so that the display method of the first interface remains unchanged when returning to it later.
[0185] In some embodiments, the terminal can also jump from the current interface to a previously displayed interface based on a jump link. Accordingly, in response to an interface jump event from the second interface to the third interface, if a third interface already exists and is located within an existing third jump link, the terminal deletes the target node in the third jump link and any other jump links created after the third jump link. The target node is the node located after the corresponding node in the third interface. The terminal then displays the third interface. That is, with the management of multiple jump links, it is only necessary to specify the root node of the jump link containing the third interface to which the user needs to return, and the nodes of the third interface itself. Jump links and nodes created after the third interface can be deleted, which is equivalent to pruning the jump links.
[0186] For example, see [link to relevant documentation] Figure 4 To return to the card library interface from the battle interface, simply specify the root node of the main lobby interface and the card library interface; pruning will effectively allow you to return to the designated interface. The logic for displaying / hiding interfaces is already handled when each navigation link is activated. That is, when in the main battle interface, the display / hiding logic for the nodes on the previous three navigation links doesn't need to be handled. When returning to the card library interface, simply delete the navigation links for the main battle interface and the preparation interface, and simultaneously traverse and delete the navigation links in the main lobby interface from back to front until the card library interface node is found and displayed.
[0187] The solutions provided in this disclosure, due to the varying frequency and complexity of interface transitions in different business scenarios, can employ different transition links for management in different business scenarios. This allows for precise control over the display and hiding of interfaces. For example, in high-frequency transition scenarios, the display position of the interface shown before the transition can be moved off-screen instead of being directly destroyed, effectively reducing the frequent loading and unloading of rendering resources, lowering the burden on the GPU and CPU, and improving rendering efficiency. Alternatively, through link management, the interface before the transition can be cached instead of being reloaded each time, reducing redundant loading and improving performance. For low-frequency transition scenarios, interfaces that are no longer displayed can be directly destroyed, reducing resource waste.
[0188] If any of the above interfaces is opened multiple times, it can exist in multiple navigation links, or it may exist in multiple nodes within the same navigation link. That is, an interface can exist in multiple independent navigation links, each navigation link is independent, and the interface has its own instance in each navigation link. Suppose a user navigates from the main interface to the e-commerce interface, and then from the main interface to the settings interface. In this case, the e-commerce interface and the settings interface exist in two separate navigation links. An interface can exist in multiple nodes within the same navigation link; that is, the same interface can be opened multiple times, and each opening creates a new node in the navigation link. Suppose a user navigates from the main interface to the e-commerce interface, then opens a product details page in the e-commerce interface, and then returns to the e-commerce interface from the product details page. In this case, the e-commerce interface exists in multiple nodes within the same navigation link.
[0189] This disclosure provides an interface transition method. Upon detecting an interface transition event from a first interface to a second interface, the interface type of the second interface is first determined. If the second interface is a sub-interface, it is added to the end of the currently active first transition link. If the second interface is a main interface, a new transition link, i.e., the second transition link, is created with the second interface as the root node. The currently active transition link is then switched to the second transition link, and the first transition link is frozen. This allows the second interface indicated by the latest interface in the currently active transition link to be displayed. Based on the state of the first transition link, resources of non-displayed interfaces are released. This achieves the goal of uniformly managing transitions between interfaces using transition links. Programmers do not need to write logic code for transitions for each interface, which reduces the maintenance cost of interface transitions. It not only reduces the probability of interface transition errors and improves the stability of interface transitions, but also provides better scalability for interfaces, enabling it to cope with future complex interface requirements.
[0190] All of the above-mentioned optional technical solutions can be combined in any way to form optional embodiments of this disclosure, and will not be described in detail here.
[0191] Figure 7 This is a block diagram illustrating an interface transition device according to an exemplary embodiment. See also: Figure 7 The interface switching device includes a display unit 701, a first processing unit 702, and a second processing unit 703.
[0192] Display unit 701 is configured to display the first interface;
[0193] The first processing unit 702 is configured to execute a screen jump event in response to a first screen to a second screen. If the second screen is a sub-screen, the second screen is added to the end of the first jump link where the first screen is located. The first jump link is the jump link that is currently active.
[0194] The first processing unit 702 is also configured to perform the following actions: if the second interface is the main interface, create a second jump link with the second interface as the root node, set the first jump link to a frozen state, and set the second jump link to an active state.
[0195] Display unit 701 is also configured to display a second interface;
[0196] The second processing unit 703 is configured to execute a state based on the first jump link and release the resources of the interface in the first jump link;
[0197] Each jump link includes at least one node, each node is used to indicate an interface, and each jump link is used to indicate the jump situation between interfaces.
[0198] In some embodiments, the second processing unit 703 is configured to perform: if the first jump link is in an active state, release a first proportion of resources for any interface in the first jump link other than the second interface; if the first jump link is in a frozen state, release a second proportion of resources for any interface in the first jump link, the second proportion being greater than the first proportion.
[0199] In some embodiments, the second processing unit 703 is configured to perform at least one of the following:
[0200] For any interface in the first jump link other than the second interface, release the portion of the graphics resources occupied by the interface;
[0201] Release some of the memory resources occupied by the interface;
[0202] Reduce the rendering resolution of the interface;
[0203] Pause the rendering process of the interface.
[0204] In some embodiments, the second processing unit 703 is configured to perform at least one of the following:
[0205] For any interface in the first jump link, release all graphics resources occupied by the interface;
[0206] Release all memory resources used by the interface;
[0207] Completely stop the rendering process of the interface.
[0208] In some embodiments, an interface configuration table is pre-configured, which includes interface transition events between interfaces and the interface type of each interface. The interface type includes sub-interfaces and main interfaces.
[0209] The device also includes:
[0210] The determining unit is configured to, upon detecting a screen jump event in the first screen, determine the second screen indicated by the screen jump event from the screen configuration table; and determine the screen type of the second screen from the screen configuration table.
[0211] In some embodiments, the apparatus further includes:
[0212] The hidden unit is configured to hide the first interface when the display attribute of the second interface is set to full-screen.
[0213] In some embodiments, the hidden unit is configured to perform any of the following:
[0214] Move the display position of the first interface outside the display screen;
[0215] Save the node corresponding to the first interface in the first jump link where the first interface is located, and cancel rendering the first interface;
[0216] In the first redirection link where the first interface is located, delete the node corresponding to the first interface;
[0217] If the second interface is the main interface, delete the first redirect link where the first interface is located.
[0218] In some embodiments, the apparatus further includes:
[0219] The third processing unit is configured to take a screenshot of the first interface and obtain an interface image when the display attribute of the second interface is static mask display.
[0220] The display unit 701 is also configured to display the interface image as the background image of the second interface, based on the display of the second interface.
[0221] In some embodiments, the display unit 701 is further configured to perform:
[0222] In response to the closing event of the second interface, if the second interface is a sub-interface, the node corresponding to the second interface is deleted in the first jump link, and the first interface is displayed. After deleting the node corresponding to the second interface, the node of the first interface becomes the tail node in the first jump link.
[0223] If the second interface is the main interface, then delete the second jump link and display the first interface. The first jump link is the latest jump link created before the second jump link, and the node of the first interface is the tail node in the first jump link.
[0224] In some embodiments, the apparatus further includes:
[0225] The storage unit is configured to store multiple jump links. Different jump links are used to indicate the interface jump situation under different business scenarios. The root node in each jump link is used to indicate the main interface under the corresponding business scenario, and the child nodes in each jump link are used to indicate the sub-interfaces under the corresponding business scenario.
[0226] In some embodiments, the apparatus further includes:
[0227] The fourth processing unit is configured to execute a response to an interface jump event from the second interface to the third interface. If the third interface already exists and is located in the created third jump link, then the target node in the third jump link and other jump links created after the third jump link are deleted. The target node is the node located after the corresponding node of the third interface.
[0228] Display unit 701 is also configured to display a third interface.
[0229] This disclosure provides an interface transition device. Upon detecting an interface transition event from a first interface to a second interface, the device first determines the interface type of the second interface. If the second interface is a sub-interface, it adds the second interface to the end of the currently active first transition link. If the second interface is a main interface, it creates a new transition link, i.e., the second transition link, with the second interface as the root node, and switches the currently active transition link to the second transition link. The first transition link is frozen, so that the second interface indicated by the latest interface in the currently active transition link is displayed. Based on the state of the first transition link, the resources of the non-displayed interfaces are released. This achieves the goal of uniformly managing transitions between various interfaces using transition links. Programmers do not need to write logic code for transitions for each interface, which reduces the maintenance cost of interface transitions. It not only reduces the probability of interface transition errors and improves the stability of interface transitions, but also provides better scalability for interfaces and can cope with complex future interface requirements.
[0230] It should be noted that the interface switching device provided in the above embodiments is only illustrated by the division of the above functional units when switching from one interface to another. In practical applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the electronic device can be divided into different functional units to complete all or part of the functions described above. In addition, the interface switching device and the interface switching method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0231] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0232] When an electronic device is provided as a terminal, Figure 8 This is a block diagram illustrating a terminal 800 according to an exemplary embodiment. The terminal... Figure 8 A structural block diagram of a terminal 800 provided in an exemplary embodiment of this disclosure is shown. The terminal 800 may be a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The terminal 800 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, or other names.
[0233] Typically, terminal 800 includes a processor 801 and a memory 802.
[0234] Processor 801 may include one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 801 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 801 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 801 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 801 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0235] The memory 802 may include one or more computer-readable storage media, which may be non-transitory. The memory 802 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 802 are used to store at least one computer program, which is executed by the processor 801 to implement the interface jump method provided in the method embodiments of this application.
[0236] In some embodiments, the terminal 800 may also optionally include a peripheral device interface 803 and at least one peripheral device. The processor 801, memory 802, and peripheral device interface 803 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 803 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 804, a display screen 805, a camera assembly 806, an audio circuit 807, and a power supply 808.
[0237] Peripheral device interface 803 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 801 and memory 802. In some embodiments, processor 801, memory 802 and peripheral device interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 801, memory 802 and peripheral device interface 803 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0238] The radio frequency (RF) circuit 804 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 804 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 804 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. In some embodiments, the RF circuit 804 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 804 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 804 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.
[0239] Display screen 805 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 805 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 801 for processing. In this case, display screen 805 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 805, disposed on the front panel of terminal 800; in other embodiments, there may be at least two display screens, disposed on different surfaces of terminal 800 or in a folded design; in other embodiments, display screen 805 may be a flexible display screen, disposed on a curved or folded surface of terminal 800. Furthermore, display screen 805 may be configured as a non-rectangular irregular shape, i.e., a non-rectangular screen. Display screen 805 may be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).
[0240] The camera assembly 806 is used to acquire images or videos. In some embodiments, the camera assembly 806 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 806 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash is a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.
[0241] The audio circuit 807 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 801 for processing, or input to the radio frequency circuit 804 to achieve voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each located at a different part of the terminal 800. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert the electrical signals from the processor 801 or the radio frequency circuit 804 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 807 may also include a headphone jack.
[0242] Power supply 808 is used to supply power to the various components in terminal 800. Power supply 808 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 808 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, while a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0243] Those skilled in the art will understand that Figure 8 The structure shown does not constitute a limitation on terminal 800 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0244] When electronic devices are provided as servers, Figure 9 This is a block diagram illustrating a server 900 according to an exemplary embodiment. The server 900 can vary significantly due to differences in configuration or performance. It may include one or more Central Processing Units (CPUs) 901 and one or more memories 902. The memory 902 stores at least one line of program code, which is loaded and executed by the processor 901 to implement the interface navigation methods provided in the various method embodiments described above. Of course, the server may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input / output. The server 900 may also include other components for implementing device functions, which will not be elaborated upon here.
[0245] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 802 or memory 902 including instructions, which can be executed by the processor 801 of the terminal 800 or the processor 901 of the server 900 to complete the interface switching method described above. Optionally, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device, etc.
[0246] A computer program product includes a computer program / instructions that, when executed by a processor, implement the aforementioned interface jump method.
[0247] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0248] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A method for interface navigation, characterized in that, The method includes: Display the first interface; In response to a screen jump event from the first screen to the second screen, if the second screen is a sub-screen, the second screen is added to the end of the first jump link where the first screen is located. The first jump link is the jump link that is currently active. If the second interface is the main interface, then create a second jump link with the second interface as the root node, set the first jump link to a frozen state, and set the second jump link to an active state; Display the second interface, and release the resources of the interface in the first jump link based on the state of the first jump link; Each jump link includes at least one node, each node is used to indicate an interface, and each jump link is used to indicate the jump situation between interfaces.
2. The interface jump method according to claim 1, characterized in that, The step of releasing the resources of the interface in the first jump link based on the state of the first jump link includes: If the first jump link is active, then for any interface in the first jump link other than the second interface, release a first proportion of resources; If the first redirect link is frozen, then for any interface in the first redirect link, a second proportion of resources is released, where the second proportion is greater than the first proportion.
3. The interface transition method according to claim 2, characterized in that, Releasing a first proportion of resources for any interface in the first jump link other than the second interface includes at least one of the following: For any interface in the first jump link other than the second interface, release the portion of the graphics resources occupied by the interface; Release some of the memory resources occupied by the interface; Reduce the rendering resolution of the interface; Pause the rendering process of the interface.
4. The interface transition method according to claim 2, characterized in that, Releasing a second proportion of resources for any interface in the first jump link includes at least one of the following: For any interface in the first jump link, release all graphics resources occupied by the interface; Release all memory resources occupied by the interface; Completely stop the rendering process of the interface.
5. The interface transition method according to claim 1, characterized in that, A pre-configured interface configuration table is provided, which includes interface transition events between interfaces and the interface type of each interface. The interface type includes the sub-interface and the main interface. The method further includes: If a screen jump event is detected in the first screen, the second screen indicated by the screen jump event is determined from the screen configuration table; The interface type of the second interface is determined from the interface configuration table.
6. The interface transition method according to claim 1, characterized in that, The method further includes: When the display property of the second interface is set to full-screen, the first interface is hidden.
7. The interface transition method according to claim 6, characterized in that, Hiding the first interface includes any of the following: Move the display position of the first interface outside the display screen; Save the node corresponding to the first interface in the first jump link where the first interface is located, and cancel rendering the first interface; In the first redirection link where the first interface is located, delete the node corresponding to the first interface; If the second interface is the main interface, delete the first redirect link where the first interface is located.
8. The interface transition method according to claim 1, characterized in that, The method further includes: With the second interface set to static mask display, a screenshot of the first interface is taken to obtain the interface image. Based on the display of the second interface, the interface image is displayed as the background image of the second interface.
9. The interface transition method according to claim 1, characterized in that, The method further includes: In response to the closing event of the second interface, if the second interface is a sub-interface, the node corresponding to the second interface is deleted in the first jump link, and the first interface is displayed. After deleting the node corresponding to the second interface, the node of the first interface becomes the tail node in the first jump link. If the second interface is the main interface, then delete the second jump link and display the first interface. The first jump link is the latest jump link created before the second jump link, and the node of the first interface is the tail node in the first jump link.
10. The interface transition method according to claim 1, characterized in that, The method further includes: Multiple jump links are stored. Different jump links are used to indicate the interface jump situation under different business scenarios. The root node in each jump link is used to indicate the main interface under the corresponding business scenario, and the child nodes in each jump link are used to indicate the sub-interfaces under the corresponding business scenario.
11. The interface transition method according to claim 1, characterized in that, The method further includes: In response to an interface jump event from the second interface to the third interface, if the third interface already exists and is located in an already created third jump link, then delete the target node in the third jump link and other jump links created after the third jump link. The target node is a node located after the corresponding node of the third interface. The third interface is displayed.
12. An interface transition device, characterized in that, The device includes: The display unit is configured to display the first interface; The first processing unit is configured to execute an interface jump event in response to the first interface to the second interface. If the second interface is a sub-interface, the second interface is added to the end of the first jump link where the first interface is located. The first jump link is the jump link that is currently active. The first processing unit is further configured to perform the following actions: if the second interface is the main interface, create a second jump link with the second interface as the root node, set the first jump link to a frozen state, and set the second jump link to an active state. The display unit is also configured to display the second interface; The second processing unit is configured to release the resources of the interface in the first jump link based on the state of the first jump link; Each jump link includes at least one node, each node is used to indicate an interface, and each jump link is used to indicate the jump situation between interfaces.
13. An electronic device, characterized in that, The electronic device includes: One or more processors; Memory used to store the executable program code of the processor; The processor is configured to execute the program code to implement the interface navigation method as described in any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the interface switching method as described in any one of claims 1 to 11.
15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the interface jump method according to any one of claims 1 to 11.