Page jumping method and device

By extracting and processing the URL data of web page projects, querying the routing table to achieve accurate page positioning, and solving the problem of stuckness through routing depth comparison to ensure the correct presentation of title bar styles, solving the problems of inaccurate page jumps, stuckness and abnormal title bar styles on the web page.

CN119862335APending Publication Date: 2025-04-22BEIJING JINGDONG TUOXIAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311360053.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-19
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

When Flutter Boost involves web pages, it cannot process the path part data and parameter part data in the URL of the page that jumps across projects, resulting in inaccurate page jumps, and it is prone to get stuck when popping up to the homepage and receiving the return command, and the title bar style also has abnormalities.

Method used

By extracting the path part data and parameter part data in the network address of the web page project, query the target web page using the routing table, and add parameter part data to the network address of the target web page to achieve precise positioning. At the same time, based on the recording and comparison of routing depth, the page return logic is designed to solve the problem of stuckness, and the title bar style is set using style components compatible with native platforms and web-side platforms.

Benefits of technology

It realizes the accuracy of page jumps on the web page, solves the problem of stuckness, and ensures the correct rendering of title bar styles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862335A_ABST
    Figure CN119862335A_ABST
Patent Text Reader

Abstract

The invention discloses a page jumping method and device, and relates to the technical field of mobile terminal application development. A specific embodiment of the method comprises the following steps: in response to detection of starting of a webpage end project, acquiring a network address of the webpage end project, extracting path part data and parameter part data in the network address, and executing initialization of a page jump plug-in in a mobile end application development framework; in the initialization process of the page jump plug-in, using the extracted path part data to query a pre-established routing table representing the corresponding relationship between the path part data and the webpage in the webpage end project, and obtaining a target webpage pointed by the extracted path part data; and adding the extracted parameter part data into the network address of the target webpage and loading the target webpage. According to the implementation mode, the initial page positioning logic of an existing page jump plug-in can be optimized, and the accuracy of page jump related to webpage end engineering is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of mobile application development, and in particular to a page jump method and device. Background Art

[0002] Flutter is a cross-platform mobile development framework that is being used by more and more developers. Flutter's page jump solution is mainly implemented through the page jump plug-in Flutter Boost, which includes page jump, page life cycle management, bridge channel and other functions. However, when it comes to the WEB side (i.e., the web page side), it cannot process the path part data and parameter part data in the cross-project jump page URL (Uniform Resource Locator), so it can only jump the page to the home page but cannot accurately locate the target page. In addition, FlutterBoost is prone to jamming when it pops up to the home page and receives a return instruction, and when the page jumps, the different title bar style presentation methods between the native platform and the WEB platform are prone to title bar style abnormalities. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a page jump method and device, which can optimize the initial page positioning logic of the existing page jump plug-in and improve the accuracy of page jump involving web page end projects.

[0004] To achieve the above objective, according to one aspect of the present invention, a page jump method is provided.

[0005] The page jump method of the embodiment of the present invention is executed by a terminal that pre-deploys a mobile application development framework; the method includes: in response to detecting that a web page project is started, obtaining the network address of the web page project, extracting the path part data and the parameter part data in the network address, and executing the initialization of the page jump plug-in in the mobile application development framework; during the initialization process of the page jump plug-in, using the extracted path part data to query a pre-established routing table that represents the correspondence between the path part data and the web pages in the web page project, and obtaining the target web page pointed to by the extracted path part data; adding the extracted parameter part data to the network address of the target web page and loading the target web page.

[0006] Optionally, in response to detecting the startup of a web-side project, obtaining the network address of the web-side project includes: in response to detecting the startup of any project, determining whether the operating environment of the project is a web-side environment; if so, determining the project as a web-side project, and calling a preset JS bridging method to obtain the network address of the web-side project.

[0007] Optionally, the web-side project is a browser-based project; and the method further includes: during the operation of the web-side project, in response to receiving a return instruction for the web-side project, determining the current routing depth of the browser; wherein the current routing depth represents the number of pages visited by the browser in the current life cycle and at the current moment; comparing the current routing depth with the pre-recorded historical routing depth of the browser; wherein the historical routing depth is the routing depth recorded when the web-side project is started; and when the current routing depth is equal to the historical routing depth and equal to 1, executing the exit of the browser.

[0008] Optionally, the method further comprises: when the current routing depth is equal to the historical routing depth and is greater than 1, determining the last visited page of the historical project before running the web page project and loading the last visited page.

[0009] Optionally, the method further includes: when the current routing depth is greater than the historical routing depth, returning to the previously visited page of the web page project.

[0010] Optionally, the method further includes: pre-setting the title bar style of the web page in the web project using a style component that is compatible with the native platform and the web platform; before displaying any web page of the web project, hiding the title bar of the web page, retaining the built-in title bar of the platform to which the web project belongs, and synchronizing the title bar style of the web page to the built-in title bar.

[0011] Optionally, the mobile application development framework is Flutter, and the page jump plug-in is FlutterBoost; the title bar style includes at least one of the following: title text, title image, title bar background color, title bar background image, left button list, and right button list.

[0012] To achieve the above objective, according to another aspect of the present invention, a page jump device is provided.

[0013] The page jump device of the embodiment of the present invention is set in a terminal that pre-deploys a mobile application development framework; the device may include: a URL extraction unit, which is used to: in response to detecting that a web page project is started, obtain the network address of the web page project, extract the path part data and the parameter part data in the network address, and execute the initialization of the page jump plug-in in the mobile application development framework; the page jump unit is used to: during the initialization process of the page jump plug-in, use the extracted path part data to query a pre-established routing table that represents the correspondence between the path part data and the web pages in the web page project, and obtain the target web page pointed to by the extracted path part data; add the extracted parameter part data to the network address of the target web page and load the target web page.

[0014] To achieve the above objective, according to another aspect of the present invention, an electronic device is provided.

[0015] An electronic device of the present invention comprises: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the page jump method provided by the present invention.

[0016] To achieve the above objective, according to yet another aspect of the present invention, a computer-readable storage medium is provided.

[0017] A computer-readable storage medium of the present invention stores a computer program, and when the program is executed by a processor, the page jump method provided by the present invention is implemented.

[0018] According to the technical solution of the present invention, the embodiments of the above invention have the following advantages or beneficial effects:

[0019] In response to the problem of inaccurate initial page jump of the page jump plug-in, the present invention establishes a special processing logic for the path part data and the parameter part data in the URL, that is, after obtaining the network address of the web page project, the path part data and the parameter part data in the network address are extracted, the extracted path part data is used to query the routing table to determine the corresponding target web page, and the extracted parameter part data is added to the network address of the target web page, thereby realizing accurate positioning and loading of the target page.

[0020] In response to the problem that the page jump plug-in is stuck when it pops up to the homepage and receives a return instruction, this application designs an independent page return logic based on the recording and comparison of routing depth. When the web page project is started, the system records the routing depth of the browser, that is, the historical routing depth. After that, when the web page project receives a return instruction during operation, the system compares the current routing depth with the historical routing depth: if the current routing depth is equal to the historical routing depth and equal to 1, it means that the web page project is currently in the initial page (that is, the aforementioned target page to jump to) and the browser has not run other projects before the web page project is run, so the browser can be executed to exit; if the current routing depth is equal to the historical routing depth and greater than 1, it means that the web page project is currently in the initial page but the browser has run other projects before the web page project is run. At this time, the last visited page of the historical project before the web page project can be determined and returned to the above last visited page; if the current routing depth is greater than the historical routing depth, it means that the web page project has made one or more page jumps based on the initial page, and at this time it can return to the previous visited page of the web page project. In this way, the aforementioned stuck problem is solved.

[0021] To address the problem of abnormal title bar style, the present invention uses style components that are compatible with the native platform and the web platform to set the title bar style of the web pages in the web project. Before displaying any web page of the web project, the system hides the title bar of the web page, retains the built-in title bar of the platform to which the web project belongs, and synchronizes the title bar style of the web page to the built-in title bar, thereby achieving the correct presentation of the title bar style of the web page.

[0022] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0024] Figure 1 Schematic diagram of the main steps of the page jump method in an embodiment of the present invention;

[0025] Figure 2 is a schematic diagram of specific execution steps of the page jump method in an embodiment of the present invention;

[0026] Figure 3 It is a schematic diagram of components of a page jump device in an embodiment of the present invention;

[0027] Figure 4 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;

[0028] Figure 5It is a schematic diagram of the structure of an electronic device used to implement the page jump method in the embodiment of the present invention. DETAILED DESCRIPTION

[0029] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0030] It should be pointed out that the embodiments of the present invention and the technical features therein may be combined with each other without conflict.

[0031] Figure 1 Schematic diagram of main steps of a page jump method according to an embodiment of the present invention.

[0032] like Figure 1 As shown, the page jump method of the embodiment of the present invention is executed by a terminal that pre-deploys a mobile application development framework, that is, it is executed by the operating system of the terminal (hereinafter referred to as the system). The above mobile application development framework can be a cross-platform development framework Flutter, in which the page jump plug-in Flutter Boost is used to perform mapping and jumping between pages. The present invention is optimized based on the page jump plug-in. The page jump method of the embodiment of the present invention can be specifically executed according to the following steps:

[0033] Step S101: In response to detecting that a web page project is started, the network address of the web page project is obtained, the path portion data and the parameter portion data in the network address are extracted, and the page jump plug-in in the mobile application development framework is initialized.

[0034] In the prior art, the page jump plug-in cannot process the path part data (i.e., the path part) and the parameter part data (i.e., the parameter part) in the cross-project jump page URL when it involves the WEB side, so it can only jump the page to the homepage pointed to by the protocol part, host part, and port part in the URL, but cannot accurately locate the target page. The above projects can include applications on native platforms (such as Android and iOS), WEB-side applications, WEB-side websites, etc., and web-side projects can include browser-side projects, WEB pages in native platform applications, WEB pages embedded in mini-programs, etc.

[0035] In view of the above defects, in an embodiment of the present invention, when the system detects the startup of any project, it first determines whether the operating environment of the project is a web-side environment; if so, the project is determined to be a web-side project, and the preset JS (i.e. JavaScript) bridging method is called to obtain the network address of the web-side project, i.e., the URL. It can be understood that the above startup of the web-side project can be the self-start of the web-side project, or it can be a jump from other projects to the web-side project. The above other projects can be native platform projects or WEB-side projects. The JS bridging method is used to realize the interaction between Flutter and the WEB platform. After that, the system extracts the path part data and the parameter part data in the network address, and performs the initialization of FlutterBoost.

[0036] As a preferred solution, if the web page project is a browser-based project, the system can also determine the routing depth of the browser after the page jumps and store it in a preset cache. The stored routing depth can be called the historical routing depth after being read later. The above routing depth is used to characterize the number of pages visited by the browser in the current life cycle and at the current moment. It can be understood that the life cycle of the browser refers to the time interval from opening to closing. For example, if the browser first loads pages 1, 2, and 3 of project 1 in sequence, then jumps to project 2, and loads the initial page 4 of project 2, the current routing depth is 1+3=4; if page 5 of project 2 continues to be loaded, the routing depth becomes 5; if you return from page 5 to page 4, the routing depth returns to 4.

[0037] Step S102: During the initialization of the page jump plug-in, the extracted path portion data is used to query a pre-established routing table representing the correspondence between the path portion data and web pages in the web page end project, and the target web page pointed to by the extracted path portion data is obtained.

[0038] In this step, the preset routing table is used to represent the correspondence between the path part data in the URL and the web page in the web project. In actual applications, during the initialization process of Flutter Boost, the system uses the extracted path part data as a query term to query the routing table, thereby obtaining the target web page pointed to by the extracted path part data. It can be understood that the target web page is the initial page of the web project in this jump.

[0039] Step S103: adding the extracted parameter part data to the network address of the target webpage and loading the target webpage.

[0040] In this step, the system adds the parameter part data extracted in step S101 to the obtained target web page URL to realize the corresponding function of the target web page. After that, the target web page is loaded to realize the accurate positioning of the initial page of the web project, thereby solving the problem of inaccurate positioning caused by Flutter Boost's inability to process the path part data and parameter part data in the URL in the prior art.

[0041] In the existing Flutter Boost framework, when loading a browser-based web project, the system needs to first start a host Html (Hypertext markup language) file representing the homepage of the web project, start the Flutter Web engine through JS code in the host page, and wait for the engine to start successfully before loading the default page of the web project. There is a problem in this way, that is, if the initial page of the web project contains path data and parameter data, the browser will first jump to the initial page, and then redirect to the host page to start the Flutter Web engine, that is, the page URL at this time has become the URL of the host page. Therefore, when the user issues a return instruction, because the current URL of the page is different from the user output URL, it does not meet the existing return operation conditions, so the browser will refuse the return operation and always stay on the initial page, resulting in a stuck phenomenon where it cannot return.

[0042] In order to solve this problem, the embodiment of the present invention redesigns the page return logic based on the comparison of routing depth. Specifically, when the web page project is a browser-based project, during the operation of the web page project, if the system receives a return instruction for the web page project, the current routing depth of the browser is first determined, and the current routing depth of the browser is compared with the pre-recorded historical routing depth of the same browser.

[0043] Specifically, if the current routing depth is equal to the historical routing depth and equal to 1, it means that the web page project is currently in the initial page (i.e. the aforementioned target page to jump to) and the browser has not run other projects before the web page project is run, so the browser can exit; if the current routing depth is equal to the historical routing depth and greater than 1, it means that the web page project is currently in the initial page but the browser has run other projects before the web page project is run. At this time, the last visited page of the historical project before the web page project can be determined and returned to the above last visited page; if the current routing depth is greater than the historical routing depth, it means that the web page project has made one or more page jumps based on the initial page, and at this time, it can return to the previous visited page of the web page project. In this way, the aforementioned stuck problem is solved.

[0044] In addition, in the existing Flutter Boost framework, due to the difference in the way the title bar style is set between the native platform and the WEB platform, that is, the native platform performs the presentation of the style through the corresponding style configuration component, while the WEB platform mainly relies on JS code to implement it. This incompatibility causes the page title bar style to be displayed abnormally when the web page project jumps to a page. In order to solve this problem, the embodiment of the present invention pre-uses style components compatible with the native platform and the web page platform to set the title bar style of the web page in the web page project. During the operation of the web page project, before displaying any web page of the web page project, the system hides the title bar of the web page, retains the built-in title bar of the platform to which the web page project belongs (which can be a native platform, a browser platform, a mini program platform, etc.), and synchronizes the title bar style of the web page to the built-in title bar for page rendering, thereby achieving the correct presentation of the page title bar style. The above title bar style may include at least one of the following: title text, title picture, title bar background color, title bar background picture, left button list, right button list.

[0045] In the technical solution of the embodiment of the present invention, in order to solve the problem of inaccurate initial page jump of the page jump plug-in, the present invention establishes a special processing logic for the path part data and parameter part data in the URL, that is, after obtaining the network address of the web page project, the path part data and parameter part data in the network address are extracted, and the extracted path part data is used to query the routing table to determine the corresponding target web page, and the extracted parameter part data is added to the network address of the target web page, thereby realizing the accurate positioning and loading of the target page. In order to solve the problem that the page jump plug-in is stuck when it pops up to the home page and receives a return instruction, the present application designs an independent page return logic based on the recording and comparison of the routing depth. When the web project is started, the system records the browser's routing depth, i.e., the historical routing depth. After that, when the web project receives a return instruction during operation, the system compares the current routing depth with the historical routing depth: if the current routing depth is equal to the historical routing depth and equal to 1, it means that the web project is currently on the initial page (i.e., the aforementioned target page to jump to) and the browser has not run other projects before the web project is run, so the browser can exit; if the current routing depth is equal to the historical routing depth and greater than 1, it means that the web project is currently on the initial page but the browser has run other projects before the web project is run, and at this time, the last visited page of the historical project before the web project can be determined and returned to the above last visited page; if the current routing depth is greater than the historical routing depth, it means that the web project has made one or more page jumps based on the initial page, and at this time, it can return to the previous visited page of the web project. In this way, the aforementioned stuck problem is solved. To address the problem of abnormal title bar style, the present invention uses style components that are compatible with the native platform and the web platform to set the title bar style of the web pages in the web project. Before displaying any web page of the web project, the system hides the title bar of the web page, retains the built-in title bar of the platform to which the web project belongs, and synchronizes the title bar style of the web page to the built-in title bar, thereby achieving the correct presentation of the title bar style of the web page.

[0046] A specific embodiment of the present invention is described below.

[0047] Flutter cross-platform development technology currently supports running on devices such as Android, iOS, and Web. However, due to the feature of loading pages through URLs on the Web, the initial page parameters on the Web are not fixed, so the routing processing method is different from that on the native side, and there is currently no solution in the industry that can support Flutter projects to process the routing logic of Android, iOS, and Web at the same time. The purpose of this embodiment is to expand on the routing solution BoostNavigator of the Flutter Boost framework so that it can be compatible with the path data, parameter data, homepage return logic, etc. under the Web platform, thereby achieving the unification of routing on Android, iOS, and Web, and achieving a set of code running simultaneously in multiple environments such as Android native applications, iOS native applications, native application WebView, and mini-program embedded WebView, saving development costs and eradicating the phenomenon of multi-terminal inconsistency.

[0048] like Figure 2 As shown, the present invention operates in three stages: initialization, operation and exit of the project, and covers three layers: Flutter, JS and Native (i.e., native platform).

[0049] During the project initialization phase, the system first determines whether it is currently running in a Web environment. If so, it calls the JS bridging method to obtain the currently loaded URL, and parses the path (path data) and params (parameter data) from the URL as the initial route initialPath and the initial route parameters initialParams (step S201). At the same time, the current routing depth is obtained through the JS bridging method and stored as a global variable initialDepth for later use (i.e., the historical routing depth, step S202). Thereafter, the system initializes Flutter Boost (step S203, if it is determined to be a native platform, directly execute step S203).

[0050] During the initialization of Flutter Boost, the system loads the initial page of the web project. In the prior art, Flutter Boost only supports loading the initial page of Android and iOS platforms, that is, when the native platform opens the Flutter page through the bridging method, it carries parameters in the bridging method to distinguish which page is initially loaded. Since the Web platform needs to load the initial page by entering the URL in the browser address bar, it is impossible to call the bridging method of the native platform, and thus the initial page cannot be loaded, and only a fixed default page can be loaded. In order to solve this problem, this embodiment directly uses the initialPath obtained from step S201 to query the routing table to obtain the initial page when registering the Flutter Boost routing table under the Web platform, and intercepts the method of creating a routing node in the routing table. When it is determined that the page to be loaded is the same as the initial page, initialParams is added to the URL of the initial page, and then the rendering of the initial page is executed.

[0051] When jumping pages in the same project on the Web platform, you can use the API in the Boost Navigator routing solution provided by the Flutter Boost framework (step S204), including the jump operation push, the replacement operation pushReplacement, the fallback operation pop, the fallback operation popUntil, etc. However, since part of the project on the Web platform is running in the WebView component of the native platform or the mini-program platform, the title bar of the WebView component is used, and its style presentation method is different from the JS method of the Web platform. Therefore, there is a situation where the same page runs normally on the native platform, but the title bar style is abnormal when running on the Web platform. In order to solve this problem, the present invention provides an AppBar component that is compatible with native platforms and Web platforms. This component supports setting attributes such as title text, title image, title bar background color, title bar background image, left button list, right button list, etc., and makes the following distinction processing on different platforms: on the two native platforms of Android / iOS, it is displayed directly according to Flutter's built-in logic; on the mini-program or browser platform, the page title bar is hidden, the built-in title bar of the mini-program or browser platform is retained, and the title bar style on the page title bar is synchronized to the built-in title bar (the synchronization method can be setting the window.title attribute through the JS bridging method, and the WebView component of the mini-program platform will automatically synchronize to the title bar, step S205); in the WebView component of the native platform, the page title bar is also hidden, the platform's built-in title bar is retained, and the title bar style on the page title bar is synchronized to the built-in title bar through the native bridging method (step S206).

[0052] At present, the process of loading a web project in Flutter is to first start a host html file, start the Flutter web engine through JavaScript code in the html file, and then load the default page of the web project after the engine is successfully started. One disadvantage of this is that if the URL to be loaded contains path data and parameter data, the browser will first jump to the target URL. After that, it will find that this is a Flutter web page. At this time, it will route to the host html page to start the Flutter web engine. After the startup is successful, the initial page will be loaded according to the path data and parameter data. At this time, the URL of the page becomes the host URL, which is different from the URL originally entered by the user. In this case, if the user clicks the back button from the initial page to try to exit, the browser will be unable to exit because the current URL is different from the URL originally entered by the user, resulting in the page always staying on the initial page no matter how many times the user clicks the back button. In order to solve this problem, this embodiment uses the WillPopScope component to intercept and monitor the exit logic of the project. Whenever the user clicks the back button, the JS bridge method is called to obtain the current route depth of the browser and compare it with the initialDepth attribute stored in step 2 (step S207). If the current route depth is determined to be the same as the initialDepth, it means that the initial page has been returned to the initial page, that is, the user clicks the back button this time to exit the Web project. At this time, the following project exit logic will be executed: First determine whether initialDepth is greater than 1. If it is greater than 1, it means that other Web pages have been loaded before loading this Flutter Web project, that is, the user has jumped from other Web pages to the page of this Flutter Web project, and it is necessary to return to the previous Web page. In this embodiment, by calling the window.history.go method in the JS bridge, the host page is directly bypassed and the previous Web page is returned (step S208); if initialDepth is equal to 1, it means that the user wants to exit the current Web container directly by clicking the back button. At this time, the system can call the bridge method on WebView to exit the WebView page (step S209). If the current route depth is greater than initialDepth, it means that the web project has made one or more page jumps based on the initial page. At this time, you can return to the previous visited page of the web project. It can be understood that the current route depth during the operation of the web project will not be less than initialDepth.

[0053] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of the present invention are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.

[0054] For the above-mentioned method embodiments, for the convenience of description, they are expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the order of the actions described, and some steps can actually be performed in other orders or simultaneously. In addition, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily necessary to implement the present invention.

[0055] In order to better implement the above-mentioned solution of the embodiment of the present invention, relevant devices for implementing the above-mentioned solution are also provided below.

[0056] See also Figure 3 As shown, the page jump device 300 provided by the embodiment of the present invention is set in a terminal where a mobile application development framework is pre-deployed, and may include: a website extraction unit 301 and a page jump unit 302 .

[0057] Among them, the URL extraction unit 301 can be used for: in response to detecting the startup of the web page project, obtaining the network address of the web page project, extracting the path part data and the parameter part data in the network address, and executing the initialization of the page jump plug-in in the mobile application development framework; the page jump unit 302 can be used for: during the initialization process of the page jump plug-in, using the extracted path part data to query a pre-established routing table that represents the correspondence between the path part data and the web pages in the web page project, and obtaining the target web page pointed to by the extracted path part data; adding the extracted parameter part data to the network address of the target web page and loading the target web page.

[0058] In an embodiment of the present invention, the URL extraction unit 301 can be further used to: in response to detecting the start of any project, determine whether the operating environment of the project is a web page environment; if so, determine the project as a web page project, and call a preset JS bridging method to obtain the network address of the web page project.

[0059] In a specific application, the web page project is a browser-based project; and the device 300 may further include a fallback unit, which is used to: during the operation of the web page project, in response to receiving a return instruction for the web page project, determine the current routing depth of the browser; wherein the current routing depth represents the number of pages visited by the browser in the current life cycle and at the current moment; compare the current routing depth with the pre-recorded historical routing depth of the browser; wherein the historical routing depth is the routing depth recorded when the web page project is started; when the current routing depth is equal to the historical routing depth and equal to 1, execute the exit of the browser.

[0060] In practical applications, the fallback unit may be further used to: when the current routing depth is equal to the historical routing depth and is greater than 1, determine the last visited page of the historical project running before the web page project and load the last visited page.

[0061] Preferably, the fallback unit may be further used to: when the current routing depth is greater than the historical routing depth, return to the previously visited page of the web page project.

[0062] As a preferred solution, the device may further include: a style adjustment unit, used to: pre-set the title bar style of the web page in the web project using a style component that is compatible with the native platform and the web platform; before displaying any web page of the web project, hide the title bar of the web page, retain the built-in title bar of the platform to which the web project belongs, and synchronize the title bar style of the web page to the built-in title bar.

[0063] In addition, in an embodiment of the present invention, the mobile application development framework is Flutter, the page jump plug-in is Flutter Boost; the title bar style includes at least one of the following: title text, title image, title bar background color, title bar background image, left button list, and right button list.

[0064] The embodiment of the present invention provides a Flutter page solution that is fully compatible with the three platforms of Android, iOS, and Web. It is extended on the basis of the Flutter Boost framework, and processes different platforms through JS or Native bridging methods at key nodes such as program initialization, running process, and exit. At the same time, the characteristics of the Flutter Boost framework are retained, so that the access party can achieve compatibility of the three ends with minimal changes.

[0065] Figure 4 An exemplary system architecture 400 to which the page jump method or page jump apparatus according to the embodiment of the present invention can be applied is shown.

[0066] like Figure 4 As shown, the system architecture 400 may include terminal devices 401, 402, 403, a network 404 and a server 405 (this architecture is only an example, and the components included in the specific architecture may be adjusted according to the specific circumstances of the invention). The network 404 is used to provide a medium for a communication link between the terminal devices 401, 402, 403 and the server 405. The network 404 may include various connection types, such as wired, wireless communication links or optical fiber cables.

[0067] The user can use the terminal devices 401, 402, 403 to interact with the server 405 through the network 404 to receive or send messages, etc. Various client applications, such as e-commerce applications (only as an example), can be installed on the terminal devices 401, 402, 403.

[0068] The terminal devices 401 , 402 , and 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0069] The server 405 may be a server that provides various services, such as a backend server (only an example) that supports e-commerce applications operated by users using the terminal devices 401, 402, and 403. The backend server may process the received service request and feed back the processing result (such as the service result - only an example) to the terminal devices 401, 402, and 403.

[0070] It should be noted that the page jump method provided in the embodiment of the present invention is generally executed by the terminal devices 401 , 402 , 403 , and accordingly, the page jump apparatus is generally disposed in the terminal devices 401 , 402 , 403 .

[0071] It should be understood that Figure 4 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0072] The present invention also provides an electronic device. The electronic device of an embodiment of the present invention comprises: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the page jump method provided by the present invention.

[0073] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 of an electronic device suitable for implementing an embodiment of the present invention. Figure 5The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0074] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the computer system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0075] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 505 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed so that a computer program read therefrom is installed into the storage section 508 as needed.

[0076] In particular, according to the embodiments disclosed in the present invention, the process described in the main step diagram above can be implemented as a computer software program. For example, the embodiments of the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the main step diagram. In the above embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit 501, the above functions defined in the system of the present invention are executed.

[0077] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0078] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0079] The units involved in the embodiments of the present invention may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes a URL extraction unit and a page jump unit. The names of these units do not constitute a limitation on the units themselves in some cases, for example, the URL extraction unit may also be described as "a unit that provides path part data and parameter part data to the page jump unit".

[0080] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by the device, the steps executed by the device include: in response to detecting the startup of the web page project, obtaining the network address of the web page project, extracting the path part data and parameter part data in the network address, and executing the initialization of the page jump plug-in in the mobile application development framework; during the initialization of the page jump plug-in, using the extracted path part data to query the pre-established routing table that represents the corresponding relationship between the path part data and the web page in the web page project, and obtaining the target web page pointed to by the extracted path part data; adding the extracted parameter part data to the network address of the target web page and loading the target web page.

[0081] In the technical solution of the embodiment of the present invention, in order to solve the problem of inaccurate initial page jump of the page jump plug-in, the present invention establishes a special processing logic for the path part data and parameter part data in the URL, that is, after obtaining the network address of the web page project, the path part data and parameter part data in the network address are extracted, and the extracted path part data is used to query the routing table to determine the corresponding target web page, and the extracted parameter part data is added to the network address of the target web page, thereby realizing the accurate positioning and loading of the target page. In order to solve the problem that the page jump plug-in is stuck when it pops up to the home page and receives a return instruction, the present application designs an independent page return logic based on the recording and comparison of the routing depth. When the web project is started, the system records the browser's routing depth, i.e., the historical routing depth. After that, when the web project receives a return instruction during operation, the system compares the current routing depth with the historical routing depth: if the current routing depth is equal to the historical routing depth and equal to 1, it means that the web project is currently on the initial page (i.e., the aforementioned target page to jump to) and the browser has not run other projects before the web project is run, so the browser can exit; if the current routing depth is equal to the historical routing depth and greater than 1, it means that the web project is currently on the initial page but the browser has run other projects before the web project is run, and at this time, the last visited page of the historical project before the web project can be determined and returned to the above last visited page; if the current routing depth is greater than the historical routing depth, it means that the web project has made one or more page jumps based on the initial page, and at this time, it can return to the previous visited page of the web project. In this way, the aforementioned stuck problem is solved. To address the problem of abnormal title bar style, the present invention uses style components that are compatible with the native platform and the web platform to set the title bar style of the web pages in the web project. Before displaying any web page of the web project, the system hides the title bar of the web page, retains the built-in title bar of the platform to which the web project belongs, and synchronizes the title bar style of the web page to the built-in title bar, thereby achieving the correct presentation of the title bar style of the web page.

[0082] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A page jump method, characterized in that: The method is executed by a terminal that pre-deploys a mobile application development framework; the method includes: In response to detecting that the web page project is started, obtaining the network address of the web page project, extracting the path part data and the parameter part data in the network address, and executing the initialization of the page jump plug-in in the mobile application development framework; During the initialization process of the page jump plug-in, the extracted path portion data is used to query a pre-established routing table representing the correspondence between the path portion data and the web pages in the web page end project, and the target web page pointed to by the extracted path portion data is obtained; The extracted parameter portion data is added to the network address of the target web page and the target web page is loaded.

2. The method according to claim 1, characterized in that In response to detecting that the web page project is started, obtaining the network address of the web page project includes: In response to detecting that any project is started, it is determined whether the operating environment of the project is a web page environment; if so, the project is determined to be a web page project, and a preset JS bridging method is called to obtain the network address of the web page project.

3. The method according to claim 1, characterized in that: The web page project is a browser-based project; And, the method further comprises: During the operation of the web page project, in response to receiving a return instruction for the web page project, determining the current routing depth of the browser; wherein the current routing depth represents the number of pages visited by the browser in the current life cycle and at the current moment; Comparing the current routing depth with the pre-recorded historical routing depth of the browser; wherein the historical routing depth is the routing depth recorded when the web page project is started; When the current routing depth is equal to the historical routing depth and equal to 1, the browser is exited.

4. The method according to claim 3, characterized in that The method further comprises: When the current routing depth is equal to the historical routing depth and is greater than 1, the last visited page of the historical project that was run before the web page project is determined and the last visited page is loaded.

5. The method according to claim 3, characterized in that: The method further comprises: When the current routing depth is greater than the historical routing depth, return to the last visited page of the web page project.

6. The method according to claim 1, characterized in that The method further comprises: Pre-setting the title bar style of the web page in the web page project using a style component that is compatible with the native platform and the web page platform; Before displaying any web page of the web-side project, hide the title bar of the web page, retain the native title bar of the platform to which the web-side project belongs, and synchronize the title bar style of the web page to the native title bar.

7. The method according to claim 6, characterized in that The mobile application development framework is Flutter, and the page jump plug-in is Flutter Boost; The title bar style includes at least one of the following: title text, title image, title bar background color, title bar background image, left button list, and right button list.

8. A page jump device, characterized in that: The device is arranged at a terminal where a mobile application development framework is pre-deployed; the device comprises: A website address extraction unit is used to: in response to detecting that a web page project is started, obtain the network address of the web page project, extract the path part data and the parameter part data in the network address, and execute the initialization of the page jump plug-in in the mobile application development framework; The page jump unit is used to: during the initialization process of the page jump plug-in, use the extracted path part data to query a pre-established routing table that represents the correspondence between the path part data and the web pages in the web page end project, and obtain the target web page pointed to by the extracted path part data; add the extracted parameter part data to the network address of the target web page and load the target web page.

9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.