A jump method, device, equipment and storage medium

Through the router manager, the routing stack and configuration file management scenario identification and resource address are solved, and the problems of difficulty in reuse, long loading time and high maintenance costs in the micro front-end routing system are achieved, and the consistency and fluency of routing jumps between different business scenarios are achieved.

CN114117278BActive Publication Date: 2025-06-17SHANGHAI PUDONG DEVELOPMENT BANK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111431054.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-29
Publication Date
2025-06-17
Estimated Expiration
2041-11-29

AI Technical Summary

Technical Problem

The existing micro front-end routing system is difficult to reuse among applications, long loading time, frequent white screen phenomena, affecting the user experience, and the pain points of public resource loading and component granular communication and maintenance costs of the base SPA model are high.

Method used

The router manager detects user touch operations, obtains the scene identifier of the jump button between scenes, finds the configuration file to obtain the target resource address, creates a new target container and loads resources, and achieves the consistency between routing stack management and jump between scenes.

Benefits of technology

The consistency of routing jump methods between different business scenarios is achieved, the smoothness of jump is ensured, the user's operating experience is improved, and the problems of difficulty in reuse, long loading time and high maintenance costs in the existing technology are solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114117278B_ABST
    Figure CN114117278B_ABST
Patent Text Reader

Abstract

The present invention discloses a jump method, device, equipment and storage medium. This method is executed by a routing manager, and the method includes: detecting a touch operation of a user on a button for jumping between scenarios, and then obtaining a scenario identifier corresponding to the button for jumping between scenarios; searching a configuration file according to the scenario identifier corresponding to the button for jumping between scenarios to obtain a target resource address; creating a target container; and loading corresponding resources to the target container according to the target resource address. Through the technical solution of the present invention, it is possible to manage a routing stack through a routing manager, and manage the unique identifier and resource address of a scenario through a configuration file, so as to achieve the consistency of the routing jump method between different business scenarios, ensure the smoothness of the jump, and improve the user operation experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer technology, and in particular, to a jump method, device, equipment, and storage medium. Background Art

[0002] Nowadays, the business requirements of mobile applications are iterating at a high speed, and front-end applications have evolved from the original monolithic applications to the current micro-frontend architecture. In the micro-frontend framework, a front-end application can be split into a group of independently deployable and loosely coupled application programs, and then these application programs can be combined together to create an application program for users. Therefore, in the case of micro-frontends, the front-end is no longer restricted to a single technology stack, and specific technology stacks can be used according to the characteristics of different applicable business scenarios. For example, for the home page with extremely high requirements for response speed, the RN (React Native) technology stack is adopted; for external link pages, the h5 technology stack is adopted to improve the embeddability of the page.

[0003] Currently, there are the following several mainstream micro-frontend routing systems: a total routing dispatcher + multi-page application (MPA, Multi-page Application), based on the Single-SPA (SPA, Single-page Application) mode, pedestal SPA, and traditional SPA + componentization + private npm (Node Package Manager) source.

[0004] Based on the mode of the total routing dispatcher + multi-page application, since the applications are completely isolated from each other, it is difficult to reuse. In addition, the loading time of each SPA application becomes longer, and a white screen phenomenon will occur, affecting the user experience. Based on the Single-SPA mode, the sub-applications need to implement hook functions such as mounting and unloading in the code, which invades the code and will also cause global pollution and resource competition. Based on the pedestal SPA mode, the pedestal is strongly related to the framework, and any modification of the pedestal will affect the implementation of the sub-applications. The loading of common resources is also a pain point of this mode, and a set of strong specifications are required to develop each sub-application. Based on the traditional SPA + componentization + private npm source mode, with the explosive increase in the number of components in the business, the communication between component granularities and the maintenance cost of components have increased sharply, and true independent development, testing, and deployment cannot be achieved. Summary of the Invention

[0005] The embodiments of the present invention provide a jump method, device, equipment, and storage medium to achieve the ability to...

[0006] In a first aspect, the embodiments of the present invention provide a jump method, which is executed by a routing manager, and the method includes:

[0007] When a touch operation of the user on the inter-scene jump button is detected, obtain the scene identifier corresponding to the inter-scene jump button;

[0008] Find the configuration file according to the scene identifier corresponding to the inter-scene jump button to obtain the target resource address;

[0009] Create a target container;

[0010] Load the corresponding resource to the target container according to the target resource address.

[0011] In a second aspect, an embodiment of the present invention further provides a jump device, which includes:

[0012] A first acquisition module, configured to obtain the scene identifier corresponding to the inter-scene jump button when a touch operation of the user on the inter-scene jump button is detected;

[0013] A first search module, configured to find the configuration file according to the scene identifier corresponding to the inter-scene jump button to obtain the target resource address;

[0014] A first creation module, configured to create a target container;

[0015] A first loading module, configured to load the corresponding resource to the target container according to the target resource address.

[0016] In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the jump method as described in any one of the embodiments of the present invention when executing the program.

[0017] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the jump method as described in any one of the embodiments of the present invention.

[0018] In the embodiment of the present invention, by detecting the touch operation of the user on the inter-scene jump button, obtaining the scene identifier corresponding to the inter-scene jump button, finding the configuration file according to the scene identifier to obtain the target resource address, and loading the corresponding resource to the newly created target container according to the target resource address. Through the technical solution of the present invention, the routing stack can be managed by the routing manager, and the unique identifier and resource address of the scene can be managed by the configuration file, so as to achieve the consistency of the routing jump method between different business scenarios, ensure the smoothness of the jump, and improve the user's operation experience. Description of the Drawings

[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings required for the embodiments. It should be understood that the following drawings only show some embodiments of the present invention, and thus should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.

[0020] Figure 1 It is a flowchart of a jump method provided in Embodiment 1 of the present invention;

[0021] Figure 2 It is a schematic structural diagram of a jump device provided in Embodiment 2 of the present invention;

[0022] Figure 3 It is a schematic structural diagram of an electronic device provided in Embodiment 3 of the present invention. Detailed Embodiments

[0023] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention, rather than limiting the present invention. Additionally, it should be noted that for the convenience of description, only the parts related to the present invention rather than all the structures are shown in the drawings. Furthermore, without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.

[0024] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of the operations can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operations are completed, but it can also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc. Furthermore, without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.

[0025] The term "including" and its variations used in the present invention are open-ended, that is, "including but not limited to". The term "based on" is "at least partially based on". The term "one embodiment" means "at least one embodiment".

[0026] It should be noted that: similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used for differential description and cannot be understood as indicating or implying relative importance.

[0027] Example 1

[0028] Figure 1 It is a flowchart of a jump method provided by Example 1 of the present invention. This example is applicable to the situation of jumping. This method can be executed by the jump device in the embodiments of the present invention, and the device can be implemented in a software and / or hardware manner, such as Figure 1 As shown, the method specifically includes the following steps:

[0029] S101. When a touch operation on the inter-scene jump button is detected, obtain the scene identifier corresponding to the inter-scene jump button.

[0030] It should be noted that the meaning of a scene is an atomic process unit. A business process can be divided into several functional modules. These functional modules are relatively independent and there is no logical coupling. Each module implements a basic and atomic function and can be reused by different business processes, and may even appear multiple times in the same business process in different states. In this embodiment, these modules are defined as "scenes". The definition of a scene is not limited to between projects. According to the differences in implemented functions and business link entrances, etc., the same project may also be divided into multiple scenes. Each scene carries a scene identifier, and the scene corresponding to the scene identifier can be found and determined according to the scene identifier.

[0031] In this embodiment, the jump button can be understood as a button to initiate a scene jump. When the user triggers the jump button, it is regarded as initiating a scene jump request, and jumps from the current scene to the target scene specified by the user according to the jump request. The touch operation refers to the operation of the user triggering the jump button.

[0032] Specifically, when the APP (abbreviation for Application, application program) detects that the user triggers the inter-scene jump button, after the routing manager receives the jump request, it obtains the scene identifier corresponding to the inter-scene jump button. If it is a jump within a scene, the single-page application mode SPA in the background technology is adopted, and the specific method and process are the same as those in the prior art, and will not be elaborated here one by one.

[0033] S102. Search the configuration file according to the scene identifier corresponding to the inter-scene jump button to obtain the target resource address.

[0034] Among them, the configuration file is a file for recording scene information, which is divided into a central warehouse table and a project routing information table. The central warehouse table is used to register and access front-end projects with routes, including all registered front-end projects. The specific contents include the English name of the front-end project, the Chinese name of the project, the address of the routing information table corresponding to the project, the jump domain name, and the routing version information, etc. The project routing information table records the specific scenes registered by the front-end project, including the scene name, loading container, loading path, and authentication information, etc.

[0035] It should be noted that the target resource address refers to the resource address corresponding to the target scene when jumping from the current scene to the target scene.

[0036] During the actual operation process, when the APP starts, the configuration file is obtained. When it detects the touch operation of the user on the button for scene transition, after the routing manager receives the transition request, it obtains the scene identifier corresponding to the button for scene transition, and searches the configuration file according to the scene identifier corresponding to the button for scene transition to obtain the target resource address.

[0037] S103. Create a target container.

[0038] It should be noted that the container mainly refers to the native control for loading scene code. On the IOS (iPhone OperationSystem) side, a new ViewController is uniformly used for jumping. Currently, the mainstream Android container modes are the multi-activity mode and the single-activity combined with multi-fragment mode. Since the multi-activity mode is applicable to scenarios with complex business logic, deep page levels, and fast demand iteration speed, while the single-activity combined with multi-fragment mode is more applicable to scenarios with multiple parallel pages, the multi-activity mode is adopted in the embodiments of the present invention.

[0039] Exemplarily, in this embodiment, the target container can be a newly created tab page for loading the resources corresponding to the target resource address.

[0040] Specifically, create a target container to load the resources corresponding to the target resource address.

[0041] S104. Load the corresponding resources to the target container according to the target resource address.

[0042] It should be noted that the corresponding resources refer to the rendering resources corresponding to the target scene to which it is about to jump. In this embodiment, the corresponding resources can be preset rendering resources.

[0043] During the actual operation process, the APP sends a resource loading request to the remote server according to the target resource address, and the remote server sends the corresponding resources to the target container for downloading and displaying according to the target resource address.

[0044] In addition, this embodiment also provides hook functions related to the container life cycle (the essence of a hook is a program for processing system messages, which can be hooked into the system through system calls), and the page loading can be determined through the page display hook function and the page disappearance hook function.

[0045] There are multiple sub-applications in an APP (sub-applications refer to all components on the page), and a page or a series of pages are implemented by one sub-application. To ensure the loading speed between sub-applications, the APP has designed container preloading to improve the initialization speed of the container when a new container is opened. For the white screen phenomenon that occurs during page initialization, pre-rendering transformation is performed for each scenario. Through the supporting user interface components (USER INTERFACE Module, i.e., UI components), the experience consistency between sub-applications is ensured. When selecting UI components, components of the same style within the resources are selected, and the display styles and corresponding functions of the same UI components in different pages are the same.

[0046] A jump method in this embodiment provides operations for adding or deleting a routing stack at the underlying native side (i.e., the APP).

[0047] Optionally, the jump method further includes:

[0048] When it is detected that the user touches the first control, obtain the routing stack to be closed corresponding to the first control.

[0049] Exemplarily, the first control can be a button for performing the operation of closing the routing stack.

[0050] It should be explained that the routing stack is composed of the physical stack of the native side and the history stack of the browser side. In this embodiment, the physical stack of the native side is mainly used. The physical stack is designed based on the idea of the stack "first in, last out; last in, first out". Each time the APP opens a new container, a record is inserted at the top of the routing stack. When closing the container, the corresponding routing stack is popped. The routing stack is the basis for routing distribution, and the routing dispatcher adds or deletes the routing stack according to different instructions to achieve jumping.

[0051] In this embodiment, the routing stack to be closed refers to the routing stack to be closed corresponding to the first control.

[0052] Specifically, after the APP detects that the user touches the first control, that is, a close request is initiated, obtain the routing stack to be closed corresponding to the first control.

[0053] Determine the container to be closed according to the routing stack to be closed.

[0054] It should be noted that the container to be closed refers to the container to be closed corresponding to the routing stack to be closed.

[0055] Specifically, after the APP detects that the user touches the first control, that is, a close request is initiated, obtain the routing stack to be closed corresponding to the first control, and determine the container to be closed according to the routing stack to be closed.

[0056] During the actual operation process, the APP passes the number of routing stacks to be closed to the routing manager, and the manager closes the corresponding number of containers to complete the closing of the routing stack. In addition, the APP can also pass the identification information of the routing stack to be closed to the routing manager, and the routing manager automatically calculates the number of containers to be closed, thus completing the operation of closing the routing stack.

[0057] Optionally, the jump method further includes:

[0058] Upon detecting a touch operation by the user on the second control, obtain the identification information of the new scene corresponding to the second control.

[0059] Exemplarily, the second control can be a button for performing the new scene operation.

[0060] It should be noted that the new scene refers to a scene newly added on the basis of the current scene. Each scene carries a scene identifier, and the scene corresponding to the scene identifier can be found and determined according to the scene identifier. The identification information is the scene identifier of the new scene.

[0061] Specifically, after the APP detects a touch operation by the user on the second control, that is, after initiating a new scene request, it obtains the identification information of the new scene corresponding to the second control.

[0062] Search the configuration file according to the identification information of the new scene to obtain the resource address of the new scene.

[0063] During the actual operation process, after obtaining the identification information of the new scene corresponding to the second control, search the configuration file according to the identification information of the new scene to obtain the resource address of the new scene.

[0064] Create a first container.

[0065] Exemplarily, in this embodiment, the first container can be a newly created tab page for loading the resources corresponding to the resource address of the new scene.

[0066] Specifically, create a first container to load the resources corresponding to the resource address of the new scene.

[0067] Load the corresponding resources to the first container according to the resource address of the new scene.

[0068] Specifically, the APP sends a resource loading request to the remote server according to the resource address of the new scene, and the remote server sends the corresponding resources to the first container for downloading and display according to the resource address of the new scene.

[0069] During the actual operation process, the APP passes the identification information of the new scene to the routing manager. The routing manager finds the resource address of the new scene through the configuration file, and completes the new routing stack operation by loading the resources corresponding to the resource address of the new scene through the newly created first container, and then completes the new scene operation.

[0070] Optionally, the jump method further includes:

[0071] When detecting a touch operation of the user on the third control, obtain the identification information of the jump scene corresponding to the third control.

[0072] In this embodiment, the third control can be understood as a button for performing the scene jump function. The jump scene refers to the scene after jumping from the current scene to the user-specified scene.

[0073] Specifically, when the APP detects that the user triggers the third control, that is, after initiating a jump scene request, obtain the identification information of the jump scene corresponding to the third control.

[0074] Search the configuration file according to the identification information of the jump scene to obtain the resource address of the jump scene.

[0075] Specifically, after obtaining the identification information of the jump scene corresponding to the third control, search the configuration file according to the identification information of the jump scene to obtain the resource address of the jump scene.

[0076] Create a second container.

[0077] Exemplarily, in this embodiment, the second container can be a newly created tab page used to load the resources corresponding to the resource address of the jump scene.

[0078] Specifically, create a second container to load the resources corresponding to the resource address of the jump scene.

[0079] Load the corresponding resources to the second container according to the resource address of the jump scene.

[0080] Specifically, the APP sends a resource loading request to the remote server according to the resource address of the jump scene, and the remote server sends the corresponding resources to the second container for downloading and displaying according to the resource address of the jump scene.

[0081] During the actual operation process, the APP passes the identification information of the jump scene to the routing manager. The routing manager finds the resource address of the jump scene through the configuration file, and completes the jump scene operation by loading the resources corresponding to the resource address of the jump scene through the newly created second container.

[0082] In the scenario jump, the verification of permissions such as logging in to the jumped page is registered in the configuration file by the scenario and implemented by the routing manager. When jumping, only the identification information of the jumped page needs to be concerned, and no other business logic needs to be attached.

[0083] Optionally, the jump method further includes:

[0084] When it is detected that the user touches the fourth control, obtain the identification information of the replaced scenario corresponding to the fourth control and the identification information of the replacement scenario.

[0085] Exemplarily, the fourth control may be a button for performing a scenario replacement operation.

[0086] Among them, the replaced scenario refers to the scenario displayed before the scenario replacement operation, and the replacement scenario refers to the scenario displayed after the scenario replacement operation.

[0087] Specifically, when the APP detects that the user triggers the fourth control, that is, after a scenario replacement request is initiated, obtain the identification information of the replaced scenario corresponding to the fourth control and the identification information of the replacement scenario.

[0088] Determine the container to be closed according to the identification information of the replaced scenario.

[0089] Specifically, after obtaining the identification information of the replaced scenario corresponding to the fourth control and the identification information of the replacement scenario, search the configuration file according to the identification information of the replaced scenario to obtain the resource address of the replaced scenario, and determine the container to be closed.

[0090] After the container to be closed is in a closed state, search the configuration file according to the identification information of the replacement scenario to obtain the resource address of the replacement scenario.

[0091] Specifically, determine the container to be closed according to the identification information of the replaced scenario. After the container to be closed is in a closed state, search the configuration file according to the identification information of the replacement scenario to obtain the resource address of the replacement scenario.

[0092] Create a third container.

[0093] Exemplarily, in this embodiment, the third container may be a newly created tab page for loading the resources corresponding to the resource address of the replacement scenario.

[0094] Specifically, create a third container for loading the resources corresponding to the resource address of the replacement scenario.

[0095] Load the corresponding resources to the third container according to the resource address of the replacement scenario.

[0096] Specifically, the APP sends a resource loading request to the remote server according to the resource address of the replacement scenario, and the remote server sends the corresponding resource to the third container for downloading and displaying according to the resource address of the replacement scenario.

[0097] Optionally, determining the container to be closed according to the identification information of the replaced scenario includes:

[0098] Obtaining the identification information of the first routing stack corresponding to the identification information of the replaced scenario.

[0099] It should be noted that the first routing stack refers to the routing stack to be closed corresponding to the identification information of the replaced scenario.

[0100] Specifically, obtain the identification information of the replaced scenario corresponding to the fourth control, and obtain the identification information of the first routing stack corresponding to the identification information of the replaced scenario according to the identification information of the replaced scenario.

[0101] Determine the container to be closed according to the identification information of the first routing stack.

[0102] In the actual operation process, after obtaining the identification information of the replaced scenario corresponding to the fourth control and the identification information of the replacement scenario, search the configuration file according to the identification information of the replaced scenario to obtain the resource address of the replaced scenario, obtain the identification information of the first routing stack corresponding to the identification information of the replaced scenario, and determine the container to be closed according to the identification information of the first routing stack.

[0103] Optionally, determining the container to be closed according to the identification information of the first routing stack includes:

[0104] Obtain the first container corresponding to the identification information of the first routing stack.

[0105] Specifically, obtain the identification information of the first routing stack corresponding to the identification information of the replaced scenario, and obtain the first container corresponding to the identification information of the first routing stack according to the identification information of the first routing stack.

[0106] Obtain the location information of the first container.

[0107] It should be noted that the location information refers to the information of the location of the first container corresponding to the identification information of the first routing stack.

[0108] Specifically, after obtaining the first container corresponding to the identification information of the first routing stack, obtain the location information of the first container.

[0109] Determine the container to be closed according to the first container and the location information of the first container.

[0110] During the actual operation process, after obtaining the identification information of the replaced scenario corresponding to the fourth control and the identification information of the replacement scenario, obtain the identification information of the first routing stack corresponding to the identification information of the replaced scenario, obtain the first container corresponding to the identification information of the first routing stack, obtain the position information of the first container, and determine the container to be closed according to the first container and the position information of the first container.

[0111] During the actual operation process, the APP passes the identification information of the replaced scenario and the identification information of the replacement scenario to the routing manager. The routing manager first calculates the number of containers to be closed according to the identification information of the replaced scenario. After completing the operation of closing the routing stack, that is, when the container to be closed is in the closed state, it searches the configuration file according to the identification information of the replacement scenario to obtain the resource address of the replacement scenario, performs the operation of adding a new routing stack for the replacement scenario, completes the replacement of the routing stack, and thus completes the scenario replacement operation.

[0112] In the embodiment of the present invention, by detecting the touch operation of the user on the scenario jump button, the scenario identifier corresponding to the scenario jump button is obtained, the configuration file is searched according to the scenario identifier to obtain the target resource address, and the corresponding resource is loaded to the newly created target container according to the target resource address. Through the technical solution of the present invention, the routing stack can be managed by the routing manager, and the configuration file manages the unique identifier and resource address of the scenario, achieving the consistency of the routing jump method between different business scenarios, ensuring the smoothness of the jump, and improving the user's operation experience.

[0113] In addition, the methods supporting the jump method in this embodiment are as follows:

[0114] Binding the physical back key: The APP passes the implementation method of the physical back key of the current page to the routing manager, and the routing manager binds it to the container. The physical back key method can be a side-slip return or a return key in the touch button. When the user triggers the physical back key, the corresponding code of the physical back key is loaded to implement the corresponding function.

[0115] Method for obtaining jump parameters: The traditional communication between pages generally realizes through solutions such as url (Uniform Resource Locator) parameters and caches. Although these methods are convenient for accessing and storing page parameters, they also bring the risk of parameter exposure. Therefore, in this embodiment, the transfer of parameters between scenario pages is stored in the routing manager, and when the page calls the method for obtaining jump parameters, the routing manager returns the corresponding parameters.

[0116] Method for obtaining physical stack: When the user clicks a preset button, all or part of the physical stack information determined according to the identification information stored in the routing manager is returned to the APP, including the hash value of the stack, the unique identifier of the page in the stack, the type of the stack, the resource address of the page in the stack, and the container type, etc.

[0117] Method for obtaining the previous page link: In the case of creating a new container, the APP cannot return the previous page link. Therefore, in this embodiment, the routing manager records the current page link when creating a new container. When the APP calls the method for obtaining the previous page link, it first determines whether it can obtain the previous page of the APP. If it cannot be obtained, the current page link recorded during the jump is returned.

[0118] The technical solution of the present invention manages the routing stack through the routing manager, and configures the identification information, resource address, and authentication chain of the scenario, achieving the consistency of the routing jump method between different technology stacks and different business scenarios, and improving the fluency of operations.

[0119] Embodiment 2

[0120] Figure 2 It is a schematic structural diagram of a jump device provided in Embodiment 2 of the present invention. This embodiment is applicable to the situation of jumping. The device can be implemented in a software and / or hardware manner, and the device can be integrated in any device providing a jump function, such as Figure 2 As shown, the jump device specifically includes: a first acquisition module 210, a first search module 220, a first creation module 230, and a first loading module 240.

[0121] Among them, the first acquisition module 210 is configured to, when detecting a touch operation of the user on the inter-scenario jump button, acquire the scenario identifier corresponding to the inter-scenario jump button;

[0122] The first search module 220 is configured to search for a configuration file according to the scenario identifier corresponding to the inter-scenario jump button to obtain a target resource address;

[0123] The first creation module 230 is configured to create a target container;

[0124] The first loading module 240 is configured to load the corresponding resource to the target container according to the target resource address.

[0125] Further, the jump device further includes:

[0126] A second acquisition module, configured to, when detecting a touch operation of the user on the first control, acquire the routing stack to be closed corresponding to the first control;

[0127] A first determination module, configured to determine the container to be closed according to the routing stack to be closed.

[0128] Further, the jumping device further includes:

[0129] A third obtaining module, configured to obtain identification information of a newly added scene corresponding to the second control when detecting a touch operation of a user on the second control;

[0130] A second searching module, configured to search for a configuration file according to the identification information of the newly added scene to obtain a resource address of the newly added scene;

[0131] A second creating module, configured to create a first container;

[0132] A second loading module, configured to load corresponding resources to the first container according to the resource address of the newly added scene.

[0133] Further, the jumping device further includes:

[0134] A fourth obtaining module, configured to obtain identification information of a jumping scene corresponding to the third control when detecting a touch operation of a user on the third control;

[0135] A third searching module, configured to search for a configuration file according to the identification information of the jumping scene to obtain a resource address of the jumping scene;

[0136] A third creating module, configured to create a second container;

[0137] A third loading module, configured to load corresponding resources to the second container according to the resource address of the jumping scene.

[0138] Further, the jumping device further includes:

[0139] A fifth obtaining module, configured to obtain identification information of a scene to be replaced and identification information of a replacement scene corresponding to the fourth control when detecting a touch operation of a user on the fourth control;

[0140] A second determining module, configured to determine a container to be closed according to the identification information of the scene to be replaced;

[0141] A fourth searching module, configured to search for a configuration file according to the identification information of the replacement scene after the container to be closed is in a closed state, to obtain a resource address of the replacement scene;

[0142] A fourth creating module, configured to create a third container;

[0143] A fourth loading module, configured to load corresponding resources to the third container according to the resource address of the replacement scene.

[0144] Further, the third determining module includes:

[0145] An acquisition unit, configured to acquire the identification information of the first routing stack corresponding to the identification information of the replaced scenario;

[0146] A determination unit, configured to determine the container to be closed according to the identification information of the first routing stack.

[0147] Further, the determination unit is specifically configured to:

[0148] Acquire a first container corresponding to the identification information of the first routing stack;

[0149] Acquire the location information of the first container;

[0150] Determine the container to be closed according to the first container and the location information of the first container.

[0151] The above product can execute the method provided in any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.

[0152] In the embodiment of the present invention, by detecting the touch operation of the user on the scenario jump button, the scenario identifier corresponding to the scenario jump button is acquired, the configuration file is searched according to the scenario identifier, the target resource address is obtained, and the corresponding resource is loaded to the newly created target container according to the target resource address. Through the technical solution of the present invention, the routing stack can be managed by the routing manager, and the unique identifier and resource address of the scenario can be managed by the configuration file, so as to achieve the consistency of the routing jump method between different service scenarios, ensure the fluency of the jump, and improve the user's operation experience.

[0153] Embodiment III

[0154] Figure 3 It is a schematic structural diagram of an electronic device provided in Embodiment III of the present invention. Figure 3 It shows a block diagram of an electronic device 312 suitable for implementing the embodiments of the present invention. Figure 3 The shown electronic device 312 is only an example, and should not bring any limitation to the functions and usage scope of the embodiments of the present invention. The device 312 is a typical computing device with jump functions.

[0155] As Figure 3 shown, the electronic device 312 is presented in the form of a general-purpose computing device. The components of the electronic device 312 may include, but are not limited to: one or more processors 316, a storage device 328, and a bus 318 connecting different system components (including the storage device 328 and the processor 316).

[0156] The bus 318 represents one or more of several types of bus architectures, including a memory bus or memory controller, a peripheral bus, an Accelerated Graphics Port, a processor, or a local bus using any of the various bus architectures. By way of example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.

[0157] The electronic device 312 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 312, including volatile and nonvolatile media, removable and non-removable media.

[0158] The storage device 328 can include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 330 and / or cache memory 332. The electronic device 312 can further include other removable / non-removable, volatile / nonvolatile computer system storage media. By way of example only, the storage system 334 can be used for reading and writing on non-removable, nonvolatile magnetic media ( Figure 3 not shown, typically referred to as a "hard disk drive"). Although Figure 3 not shown in the figure, a disk drive for reading and writing on a removable nonvolatile disk (such as a "floppy disk") and an optical disk drive for reading and writing on a removable nonvolatile optical disk (such as a Compact Disc-Read Only Memory (CD-ROM), Digital Video Disc-Read Only Memory (DVD-ROM), or other optical media) can be provided. In these cases, each drive can be connected to the bus 318 through one or more data media interfaces. The storage device 328 can include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the embodiments of the present invention.

[0159] A program 336 having a set (at least one) of program modules 326 can be stored in, for example, a storage device 328. Such program modules 326 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment. The program modules 326 generally execute the functions and / or methods in the embodiments described in the present invention.

[0160] The electronic device 312 can also communicate with one or more external devices 314 (such as a keyboard, a pointing device, a camera, a display 324, etc.), and can also communicate with one or more devices that enable a user to interact with the electronic device 312, and / or communicate with any device that enables the electronic device 312 to communicate with one or more other computing devices (such as a network card, a modem, etc.). Such communication can be carried out through an input / output (I / O) interface 322. Moreover, the electronic device 312 can also communicate with one or more networks (such as a Local Area Network (LAN), a Wide Area Network (WAN), and / or a public network, such as the Internet) through a network adapter 320. As shown in the figure, the network adapter 320 communicates with other modules of the electronic device 312 through a bus 318. It should be understood that although Figure 3 not shown in the figure, other hardware and / or software modules can be used in combination with the electronic device 312, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, Redundant Arrays of Independent Disks (RAID) systems, tape drives, and data backup storage systems, etc.

[0161] The processor 316 executes various functional applications and data processing by running the programs stored in the storage device 328, for example, implementing the jump method provided in the above embodiments of the present invention:

[0162] When a touch operation of the user on the inter-scene jump button is detected, obtain the scene identifier corresponding to the inter-scene jump button;

[0163] Find the configuration file according to the scene identifier corresponding to the inter-scene jump button to obtain the target resource address;

[0164] Create a target container;

[0165] Load the corresponding resource to the target container according to the target resource address.

[0166] Embodiment 4

[0167] Embodiment 4 of the present invention further provides a storage medium containing computer-executable instructions, and the computer-executable instructions are used to execute a jump method when executed by a computer processor. The method includes:

[0168] When a touch operation on the inter-scene jump button by the user is detected, obtain the scene identifier corresponding to the inter-scene jump button;

[0169] Search for a configuration file according to the scene identifier corresponding to the inter-scene jump button to obtain the target resource address;

[0170] Create a target container;

[0171] Load the corresponding resource to the target container according to the target resource address.

[0172] Certainly, for the storage medium containing computer-executable instructions provided by the embodiments of the present invention, the computer-executable instructions are not limited to the method operations described above, and can also execute the related operations in the jump methods provided by any embodiments of the present invention.

[0173] From the above description of the embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software and necessary general-purpose hardware. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as a floppy disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (FLASH), a hard disk, or an optical disc of a computer, etc., including several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0174] It should be noted that in the embodiments of the above jump device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the present invention.

[0175] Note that the above is only the preferred embodiment of the present invention and the technical principles applied. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein. Various obvious changes, re-adjustments, and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments. Without departing from the concept of the present invention, more other equivalent embodiments can be included, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A jump method, characterized in that, The method includes: When the application detects a touch operation of the user on the button for jumping between scenarios, the routing manager obtains the scenario identifier corresponding to the button for jumping between scenarios; The routing manager looks up the configuration file according to the scenario identifier corresponding to the button for jumping between scenarios to obtain the target resource address; wherein, the configuration file is a file for recording scenario information, including a central warehouse table and a project routing information table. The central warehouse table is used to register the front-end projects accessing the route, and at least includes the English name of the front-end project, the Chinese name of the project, the address of the routing information table corresponding to the project, the jump domain name, and the routing version information; the project routing information table records the specific scenarios registered by the front-end project, and at least includes the scenario name, the loading container, the loading path, and the authentication information; The application creates a target container and loads the corresponding resources to the target container according to the target resource address; The routing manager implements the permission verification for the jumped scenario; Wherein, the method further includes: When the application detects a touch operation of the user on the first control, it obtains the routing stack to be closed corresponding to the first control, wherein the routing stack is jointly composed of the physical stack of the native end and the history stack of the browser end; The application transmits the identification information of the routing stack to be closed to the routing manager, and the routing manager automatically calculates the number of containers to be closed to complete the operation of closing the routing stack.

2. The method according to claim 1, characterized in that, It further includes: When detecting a touch operation of the user on the second control, it obtains the identification information of the new scenario corresponding to the second control; Looks up the configuration file according to the identification information of the new scenario to obtain the resource address of the new scenario; Creates a first container; Loads the corresponding resources to the first container according to the resource address of the new scenario.

3. The method according to claim 1, characterized in that, It further includes: When detecting a touch operation of the user on the third control, it obtains the identification information of the jumped scenario corresponding to the third control; Looks up the configuration file according to the identification information of the jumped scenario to obtain the resource address of the jumped scenario; Creates a second container; Loads the corresponding resources to the second container according to the resource address of the jumped scenario.

4. The method according to claim 1, characterized in that, It further includes: When detecting a touch operation of the user on the fourth control, it obtains the identification information of the replaced scenario and the identification information of the replacing scenario corresponding to the fourth control; Determines the container to be closed according to the identification information of the replaced scenario; After the container to be closed is in the closed state, looks up the configuration file according to the identification information of the replacing scenario to obtain the resource address of the replacing scenario; Creates a third container; Loads the corresponding resources to the third container according to the resource address of the replacing scenario.

5. The method according to claim 4, characterized in that, Determining the container to be closed according to the identification information of the replaced scenario includes: Obtaining the identification information of the first routing stack corresponding to the identification information of the replaced scenario; Determining the container to be closed according to the identification information of the first routing stack.

6. The method according to claim 5, characterized in that, Determining the container to be closed according to the identification information of the first routing stack includes: Obtaining the first container corresponding to the identification information of the first routing stack; Obtaining the location information of the first container; Determining the container to be closed according to the first container and the location information of the first container.

7. A jump device, characterized in that, It includes: A first acquisition module, configured to, when an application detects a touch operation of a user on an inter-scene jump button, the routing manager acquires a scene identifier corresponding to the inter-scene jump button; A first search module, configured to the routing manager searches a configuration file according to the scene identifier corresponding to the inter-scene jump button to obtain a target resource address; wherein, the configuration file is a file for recording scene information, including a central warehouse table and a project routing information table, the central warehouse table is used to register front-end projects accessing the route, and at least includes the English name of the front-end project, the Chinese name of the project, the address of the routing information table corresponding to the project, the jump domain name, and the routing version information; the project routing information table records the specific scenes registered by the front-end project, and at least includes the scene name, the loading container, the loading path, and the authentication information; A first creation module, configured to the application creates a target container; A first loading module, configured to the application loads corresponding resources to the target container according to the target resource address; The routing manager implements permission verification for the jumped scene; Wherein, the jump device further includes: A second acquisition module, configured to, when an application detects a touch operation of a user on a first control, acquire a routing stack to be closed corresponding to the first control, wherein the routing stack is jointly composed of a physical stack of the native side and a history stack of the browser side; A first determination module, configured to the application transfers the identification information of the routing stack to be closed to the routing manager, and the routing manager automatically calculates the number of containers to be closed to complete the operation of closing the routing stack.

8. An electronic device, characterized in that, Including: One or more processors; A memory, configured to store one or more programs; When the one or more programs are executed by the one or more processors, the processors implement the method according to any one of claims 1-6.

9. A computer-readable storage medium containing a computer program, on which a computer program is stored, characterized in that, When the program is executed by one or more processors, it implements the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Application program interface display method and device based on skip protocol and electronic device

    CN110795181A

  • Hybrid application multi-level page routing skip method based on React Native

    CN111258559A