Interface jumping method and device, electronic equipment and readable storage medium
By introducing the Fair framework into Flutter's developer toolkit SDK, and utilizing routing design and remote loading mechanisms, the problem of Flutter and the Fair framework being unable to dynamically update and jump to non-native interfaces is solved, achieving cross-platform interface jump flexibility and efficient development.
Patent Information
- Application Number
- CN202210689705.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-17
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2042-06-17
AI Technical Summary
The Flutter framework does not support dynamic updates to the application, which means that the completed interface cannot be changed, and the Fair framework cannot jump to the dynamically updated non-native interface.
The application's developer toolkit (SDK) incorporates Fair, a dynamic open-source framework based on Flutter. By using the SDK's routing design, the target interface parameters are obtained. When the target interface is a non-native interface or a native interface that has been remotely updated, the target interface file is loaded remotely from the server or from the SDK, and Fair is used to convert it into the target interface.
It enables seamless transitions from the initial interface to a dynamically updated non-native interface, overcoming the limitations of Flutter and Fair frameworks in interface transitions and improving development efficiency and flexibility in interface updates.
Smart Images

Figure CN115113962B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of Internet technology, and in particular to an interface switching method, an interface switching device, an electronic device, and a computer-readable storage medium. Background Technology
[0002] Flutter is an open-source toolkit for building graphical user interfaces (UIs), helping developers efficiently build applications (Apps) for multiple operating systems such as iOS and Android using a single codebase. By incorporating the Flutter framework into project development, cross-platform operation of applications can be achieved, greatly improving application development efficiency.
[0003] Dynamic updates refer to the technology that allows for real-time updates of an application's interface without relying on the application's installation package. However, Flutter does not support dynamic updates, meaning that interfaces built with Flutter cannot be changed once released.
[0004] Therefore, Fair was created. Fair is an open-source framework designed for Flutter that dynamically updates the interface and logic of applications built on the Flutter framework. However, while Fair can currently achieve dynamic updates of the application's interface, the application cannot jump to the dynamically updated interface (non-native interface). Summary of the Invention
[0005] The present invention provides a method, apparatus, electronic device, and computer-readable storage medium for interface navigation to solve the problem of navigation to non-native interfaces of applications.
[0006] This invention discloses a developer toolkit (SDK) for applications, wherein the SDK includes Fair, a dynamic open-source framework based on the Flutter user interface framework, which is used to convert interface files into the interface of the corresponding application. The method includes:
[0007] When the user is about to be redirected to the target interface, the target interface parameters corresponding to the target interface are obtained.
[0008] The target input parameters corresponding to the target interface parameters are determined through the routing design of the SDK;
[0009] When the target interface is a non-native interface or a native interface that has been remotely updated, the target interface file corresponding to the target input parameters is loaded remotely from the server or from the SDK, and the target interface file is converted into the target interface through Fair to jump to the target interface.
[0010] Optionally, after determining the target input parameters corresponding to the target interface parameters through the routing design of the SDK, the method further includes:
[0011] When the target interface is a native interface and has not been updated remotely, if the target input parameter is the target interface file corresponding to the target interface, then Fair will convert the target interface file into the target interface to jump to the target interface.
[0012] Optionally, after determining the target input parameters corresponding to the target interface parameters through the routing design of the SDK, the method further includes:
[0013] When the target interface is a native interface and has not been updated remotely, if the target input parameter is the target interface identifier corresponding to the target interface, then the target interface file corresponding to the target interface is loaded from the resource directory of the application according to the target interface identifier, so as to convert the target interface file into the target interface through Fair.
[0014] Optionally, the application includes multiple modules, each module having a corresponding module identifier, and each module includes multiple interfaces. The method further includes:
[0015] Obtain the identifier of the module to be updated and the version information of the module to be updated;
[0016] Send the identifier of the module to be updated and the version information to the server;
[0017] If the server determines, based on the version information, that the module to be updated corresponding to the module identifier is not the latest module, then the server sends the module download address.
[0018] Download the latest interface file corresponding to the module to be updated from the server according to the module download address;
[0019] The interface file is saved in the SDK cache, and a corresponding path is generated based on the location of the interface file in the SDK cache.
[0020] Optionally, the target input parameter includes a target interface identifier, and the step of remotely loading the target interface file corresponding to the target input parameter from the server or from the SDK includes:
[0021] If the target interface file corresponding to the target interface identifier is stored in the cache of the SDK, then the target path corresponding to the target interface identifier is obtained from the SDK, so as to load the target interface file corresponding to the target interface identifier from the cache of the SDK according to the target path;
[0022] If the target interface file corresponding to the target interface identifier is not stored in the SDK cache, the target interface file corresponding to the target interface identifier is remotely loaded from the server.
[0023] Optionally, the interface parameters include module identifier and interface identifier.
[0024] This invention also discloses a UI transition device applied to an application's developer toolkit (SDK). The SDK includes Fair, a dynamic open-source framework based on the Flutter user interface framework. Fair is used to convert UI files into the corresponding application's UI. The device includes:
[0025] The target interface parameter acquisition module is used to acquire the target interface parameters corresponding to the target interface when the user is about to be redirected to the target interface.
[0026] The target input parameter determination module is used to determine the target input parameters corresponding to the target interface parameters through the routing design of the SDK;
[0027] The first target interface jump module is used to load the target interface file corresponding to the target input parameters remotely from the server or from the SDK when the target interface is a non-native interface or a native interface that has been remotely updated, and to convert the target interface file into the target interface through Fair so as to jump to the target interface.
[0028] Optionally, the device further includes: a second target interface redirection module, used for:
[0029] When the target interface is a native interface and has not been updated remotely, if the target input parameter is the target interface file corresponding to the target interface, then Fair will convert the target interface file into the target interface to jump to the target interface.
[0030] Optionally, the device further includes: a third target interface jump module, used for:
[0031] When the target interface is a native interface and has not been updated remotely, if the target input parameter is the target interface identifier corresponding to the target interface, then the target interface file corresponding to the target interface is loaded from the resource directory of the application according to the target interface identifier, so as to convert the target interface file into the target interface through Fair.
[0032] Optionally, the application includes multiple modules, each module having a corresponding module identifier, and each module includes multiple interfaces. The device further includes an interface file download module, used for:
[0033] Obtain the identifier of the module to be updated and the version information of the module to be updated;
[0034] Send the identifier of the module to be updated and the version information to the server;
[0035] If the server determines, based on the version information, that the module to be updated corresponding to the module identifier is not the latest module, then the server sends the module download address.
[0036] Download the latest interface file corresponding to the module to be updated from the server according to the module download address;
[0037] The interface file is saved in the SDK cache, and a corresponding path is generated based on the location of the interface file in the SDK cache.
[0038] Optionally, the target input parameter includes a target interface identifier, and the first target interface jump module is specifically used for:
[0039] If the target interface file corresponding to the target interface identifier is stored in the cache of the SDK, then the target path corresponding to the target interface identifier is obtained from the SDK, so as to load the target interface file corresponding to the target interface identifier from the cache of the SDK according to the target path;
[0040] If the target interface file corresponding to the target interface identifier is not stored in the SDK cache, the target interface file corresponding to the target interface identifier is remotely loaded from the server.
[0041] Optionally, the interface parameters include module identifier and interface identifier.
[0042] This invention also discloses an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0043] The memory is used to store computer programs;
[0044] When the processor executes a program stored in the memory, it implements the method described in the embodiments of the present invention.
[0045] This invention also discloses a computer program product stored in a storage medium, which is executed by at least one processor to implement the method described in this invention.
[0046] This invention also discloses a computer-readable storage medium storing instructions that, when executed by one or more processors, cause the processors to perform the methods described in this invention.
[0047] The embodiments of the present invention have the following advantages:
[0048] In this embodiment of the invention, the application's developer toolkit (SDK) includes Fair, a dynamic open-source framework based on the Flutter user interface framework. Fair is used to convert interface files into the corresponding application interface. When the application is about to jump to the target interface, it obtains the target interface parameters corresponding to the target interface. The target input parameters corresponding to the target interface parameters are determined through the SDK's routing design. Specifically, when the target interface is a non-native interface or a native interface that has been remotely updated, the target interface file corresponding to the target input parameters is loaded remotely from the server or from the SDK. Fair then converts the target interface file into the target interface, thereby achieving the jump from the initial interface to the target interface. This embodiment of the invention considers that the SDK can remotely load interface files from the server. Although Fair can convert interface files into interfaces, it cannot remotely load interface files from the server. Therefore, this embodiment of the invention sets Fair in the SDK. This allows the functionality of the SDK and Fair to be combined. When the target interface to be jumped to is a non-native interface or a native interface that has been remotely updated, the SDK remotely loads the corresponding target interface file from the server, and Fair then converts the target interface file into the target interface, thereby achieving the jump to the target interface. Attached Figure Description
[0049] Figure 1 This is a schematic diagram of an application environment provided in an embodiment of the present invention;
[0050] Figure 2 This is a flowchart of the steps of an interface jump method provided in an embodiment of the present invention;
[0051] Figure 3 This is a schematic diagram of the processing of a target interface provided in an embodiment of the present invention;
[0052] Figure 4This is a schematic diagram of interface file loading provided in an embodiment of the present invention;
[0053] Figure 5 This is a schematic diagram of a module dynamic update provided in an embodiment of the present invention;
[0054] Figure 6 This is a schematic diagram of a routing design for an SDK for multiple scenarios provided in an embodiment of the present invention;
[0055] Figure 7 This is a timing diagram of the overall architecture of a routing design provided in an embodiment of the present invention;
[0056] Figure 8 This is a timing diagram of a dynamically updated overall architecture provided in an embodiment of the present invention;
[0057] Figure 9 This is a structural block diagram of an interface jump device provided in an embodiment of the present invention;
[0058] Figure 10 This is a schematic diagram of the hardware structure of an electronic device that implements various embodiments of the present invention. Detailed Implementation
[0059] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0060] First, the terminology used in the embodiments of this invention will be introduced:
[0061] Fair: Enterprise-developed software can parse FlutterWidgets into JSON, meta, and other format files, retaining most of the interface and dynamic logic.
[0062] Router: A relay tool for communication between various interfaces, system components, and modules in a project (application). It can perform interface navigation and loading, and cross-module thread and process communication.
[0063] Module: The division of a project into modules. For example, a project can be divided into modules such as "Account Management," "Homepage," "Image Selection," and "Permission Management." Different modules can be developed and run independently, but they can also be combined to enrich the overall functionality; mutual loading and communication can be achieved through a router.
[0064] Widget: In Flutter applications, UI elements can be understood as individual widgets. A screen, a button, an icon, etc., can all be considered a widget. A module contains multiple widgets. For ease of understanding, in this embodiment of the invention, "widget" can refer to the application's UI.
[0065] SDK (Software Development Kit): A collection of development tools used by software engineers to build applications for specific software packages, software frameworks, hardware platforms, operating systems, etc.
[0066] In practice, dynamic updates refer to a technology that allows for real-time updates of the application's interface without relying on the application's installation package (i.e., without depending on the UI files in the application's resource directory). However, Flutter does not support dynamic updates; that is, once an application built with Flutter is released, its interface cannot be changed and can only be modified by waiting for a new version of the installation package.
[0067] To address the issue of Flutter applications' inability to dynamically update their interfaces, the following solutions have been proposed:
[0068] 1) Nesting React Native (RN) and HTML5 (Html5) within Flutter allows for dynamic updates of the interface through RN and HTML5;
[0069] 2) Dynamic updates of each interface are achieved through multidex plugin architecture;
[0070] However, the above-mentioned dynamic update solutions have the following drawbacks: 1) The main advantage of RN and H5 is cross-platform compatibility, but their dynamic update capabilities are insufficient, while Flutter has better cross-platform capabilities; 2) RN and H5 have strong limitations and are complex to maintain; 3) They have serious performance issues; 4) Many underlying functions heavily rely on Native; 5) Version maintenance issues. Taking RN as an example, different versions of RN have different APIs (Application Programming Interfaces), which means that once RN is updated, a new set of maintenance costs is required.
[0071] Therefore, Fair was created. Fair is an open-source framework for dynamic UI and logic design based on Flutter. It can realize the dynamic updating of the interface of applications built on the Flutter framework. Moreover, Fair has the advantages of simplicity, no performance issues, and low integration cost, making it the choice of many developers. Dynamic UI updates based on Fair do not have the problems of the aforementioned dynamic update solutions.
[0072] However, Fair loads UI files through a loading component (FairWidget) provided by Fair. Specifically, Fair pre-parses FlutterWidget into JSON format UI files according to certain rules and saves them to the application's resource directory (local) on the electronic device. When needed, Fair uses this loading component to extract the UI files from the application's resource directory, compile them, and then convert them into UIs to enable UI navigation. However, Fair lacks the ability to navigate to non-native UIs (it cannot retrieve UI files from outside the application's resource directory), and FairWidget does not have remote loading capabilities (it cannot remotely load UI files from a server). Understandably, if Fair needs to navigate to a non-native UI, it needs to add the non-native UI file to the application's resource directory. However, since adding a non-native UI file to the application's resource directory requires including that non-native UI file in the application's installation package beforehand, it still depends on the application's installation package, thus preventing dynamic updates of the application.
[0073] In addition, another dynamic update solution involves using third-party SDKs such as Flap and NEJFlutter to dynamically update the interface. These third-party SDKs have remote loading capabilities. In practical applications, Fair can replace FlutterWidget in the Flutter framework. The loading method of Widgets (interface files) compiled based on Fair must be compatible with Fair's DSL (domain specific language) parsing rules. However, currently available third-party SDKs are not compatible with Fair's DLS parsing rules. Therefore, third-party SDKs cannot support dynamic updates of Fair applications, and naturally, they cannot solve the problem of transitioning to non-native interfaces after dynamic updates.
[0074] To address the aforementioned issues, this invention provides a method for interface navigation. In this method, the application's SDK includes Fair, which has remote loading capabilities and can support dynamic updates to the application via Fair, thereby enabling navigation to non-native interfaces after dynamic updates.
[0075] The interface navigation method provided in this embodiment of the invention can be applied to, for example... Figure 1 In the application environment shown, terminal devices 101 communicate with server 102 via a network. Each terminal device 101 has an application installed, which includes a developer toolkit (SDK). The SDK includes Fair, a dynamic open-source framework based on the Flutter user interface framework. Fair is used to convert interface files into the corresponding application interface. Specifically, when the application in terminal device 101 is about to jump from the initial interface to the target interface, it obtains the target interface parameters corresponding to the target interface; determines the target input parameters corresponding to the target interface parameters through the SDK's routing design; when the target interface is a non-native interface or a native interface that has been remotely updated, it remotely loads the target interface file corresponding to the target input parameters from server 102 or from the SDK, and uses Fair to convert the target interface file into the target interface for jumping to the target interface.
[0076] In practical applications, terminal device 101 may include, but is not limited to, mobile phones, tablets, wearable devices, in-vehicle devices, augmented reality (AR) devices, virtual reality (VR) devices, laptops, personal computers (PCs), personal digital assistants (PDAs), and other electronic devices. Server 102 may be a standalone server or a server cluster consisting of multiple servers, wherein the servers may be cloud servers.
[0077] Reference Figure 2 This diagram illustrates a flowchart of a UI transition method provided in an embodiment of the present invention, applied to an application's developer toolkit (SDK). The SDK includes Fair, a dynamic open-source framework based on the Flutter user interface framework. Fair is used to convert UI files into the corresponding application's UI, and specifically includes the following steps:
[0078] Step 201: When about to jump to the target interface, obtain the target interface parameters corresponding to the target interface.
[0079] In a specific implementation, after opening a certain interface in the application, one can jump from that interface to another. In this embodiment of the invention, the interface to which one is about to jump is called the target interface, and the interface before the jump is called the initial interface. The initial interface and the target interface can be native interfaces, non-native interfaces, or native interfaces that are being updated remotely.
[0080] Specifically, a native interface refers to an interface whose corresponding JSON, meta, or other format files (interface files) are located in the application's resource directory, while a non-native interface refers to an interface whose corresponding JSON, meta, or other format files (interface files) are not located in the application's resource directory, but are located on a remote server or in the application's SDK cache.
[0081] Each interface has its corresponding interface parameters. Specifically, the interface parameters can include at least the module identifier (bundleId) and interface identifier (pagename) of the application module in which the interface is located.
[0082] Step 202: Determine the target input parameters corresponding to the target interface parameters through the routing design of the SDK.
[0083] In this embodiment of the invention, a routing design is set in the SDK. The routing design is used to indicate how to load the interface, transfer data, etc., to complete the interface navigation. Specifically, based on the routing design in the SDK, the target input parameters can be determined according to the target interface parameters, and then corresponding operations can be performed according to the target input parameters. The SDK can perform different operations based on different input parameters. For example, based on different input parameters, it can directly navigate to the target interface, retrieve the corresponding interface file from a specified storage location (including the application's resource directory, a remote server, or the SDK), or return an empty value, etc.
[0084] Step 203: When the target interface is a non-native interface or a native interface that has been remotely updated, load the target interface file corresponding to the target input parameters remotely from the server or from the SDK, and convert the target interface file into the target interface through Fair to jump to the target interface.
[0085] In this embodiment of the invention, if the target interface is a non-native interface, or if the target interface is a native interface but has been remotely updated (a native interface that has been remotely updated can also be considered a non-native interface), then the target interface needs to be updated through Fair. Specifically, the target interface file corresponding to the target input parameters can be remotely loaded from the server through the SDK or the target interface file corresponding to the target input parameters can be loaded from the SDK. Then, the target interface file is converted into the target interface through Fair in the SDK, realizing the dynamic update of the target interface that is a non-native interface, and completing the jump from the initial interface to the target interface.
[0086] As can be seen, this embodiment of the invention addresses the issue of Fair's inability to navigate to non-native interfaces by implementing routing design in the SDK, enabling navigation between the native interface and dynamic interfaces (non-native interfaces). Furthermore, it also applies to navigation between native interfaces and between non-native interfaces. Moreover, adding routing design to the SDK in this embodiment of the invention does not affect the routing between the application's native modules and native interfaces.
[0087] In the above-described interface redirection method, this embodiment of the invention considers that the SDK can remotely load interface files from the server, while Fair can convert interface files into interfaces but cannot remotely load interface files from the server. Therefore, this embodiment of the invention sets Fair in the SDK, and then combines the functions of the SDK and Fair. When the target interface to be redirected is a non-native interface or a native interface that has been remotely updated, the SDK remotely loads the corresponding target interface file from the server, and then Fair converts the target interface file into the target interface to achieve the redirection of the target interface.
[0088] In an exemplary embodiment, after step 202, which determines the target input parameters corresponding to the target interface parameters through the routing design of the SDK, the method may further include the following steps:
[0089] When the target interface is a native interface and has not been updated remotely, if the target input parameter is the target interface identifier corresponding to the target interface, then the target interface file corresponding to the target interface is loaded from the resource directory of the application according to the target interface identifier, so as to convert the target interface file into the target interface through Fair;
[0090] When the target interface is a native interface and has not been updated remotely, if the target input parameter is the target interface file corresponding to the target interface, then Fair will convert the target interface file into the target interface to jump to the target interface.
[0091] In this embodiment of the invention, if the target interface is a native interface and it is not remotely updated, it can be updated via Fair. Specifically, an interface can be set in the SDK to allow navigation to the target interface using the routing design of the Flutter native interface, i.e., the jump method of the Flutter native interface.
[0092] Specifically, Flutter's native UI navigation methods include: PushNamed: The target UI is a native UI. By registering the path of the UI file, when navigating to the target UI, the corresponding UI file is found by searching the path. After loading the UI file, the user can navigate to the native UI, similar to Java's Class.forName() method; Push: The target UI is a native UI. The UI file is loaded directly through a class instance, similar to Java's new Class() method.
[0093] In this embodiment of the invention, if the target interface is accessed via PushNamed in the SDK, the target interface needs to be registered in the SDK. For example, `FairPushy.registerRoutes({"home":(context,params)=>WBHomePage(context,params)})`. The SDK, through an interface call to PushNamed, can determine that the target input parameter is a target interface identifier based on the target interface parameters. It can then determine the path based on the target interface identifier, locate the corresponding application resource directory through that path, load the target interface file, and then use `Fair` to convert the target interface file into the target interface. If the target interface is accessed via Push in the SDK, registration in the SDK is not required. The SDK only needs to call the Push method through an interface, which can determine that the target input parameter is a target interface file based on the target interface parameters, and then use `Fair` to convert the target interface file into the target interface.
[0094] In the above exemplary embodiment, if the target interface to which the application jumps is a native interface and has not been updated remotely, the SDK can use the interface to call the jump method of the Flutter native interface to achieve the jump of the target interface.
[0095] In one exemplary embodiment, the application includes multiple modules, each module having a corresponding module identifier, and each module includes multiple interfaces. The method may further include the following steps:
[0096] Obtain the identifier of the module to be updated and the version information of the module to be updated;
[0097] Send the identifier of the module to be updated and the version information to the server;
[0098] If the server determines, based on the version information, that the module to be updated corresponding to the module identifier is not the latest module, then the server sends the module download address.
[0099] Download the latest interface file corresponding to the module to be updated from the server according to the module download address;
[0100] The interface file is saved in the SDK cache, and a corresponding path is generated based on the location of the interface file in the SDK cache.
[0101] The module to be updated can be the module containing the target interface when navigating to a non-native interface, or it can be multiple modules specified in the application, or all modules in the application. This embodiment of the invention does not impose any restrictions on this. In specific implementations, an application is divided into multiple modules, and each module includes multiple interfaces. Developers typically update the application by module; therefore, this embodiment of the invention can remotely download interface files from the server by module. Of course, in practice, updates can also be made by interface, and this embodiment of the invention also does not impose any restrictions on this.
[0102] In this embodiment of the invention, the SDK obtains the module identifier (bundleId) and version information of the module to be updated, and sends them to the server. If the server determines that the module to be updated is not the latest module based on the version information, the SDK receives the module download address sent by the server. The SDK downloads the latest interface file corresponding to the module to be updated from the server according to the module download address and saves it in the SDK's cache. At the same time, it can generate the corresponding path based on the location of the interface file in the SDK's cache. If the server determines that the module to be updated is the latest module based on the version information, it can either not process the update or report to the SDK that the module to be updated is already the latest module.
[0103] In the exemplary embodiments described above, the SDK can obtain the latest interface file of the module from the server, and then the SDK can dynamically update the interface based on the latest interface file.
[0104] In an exemplary embodiment, the target input parameter includes a target interface identifier. Step 203, loading the target interface file corresponding to the target input parameter remotely from the server or from the SDK, may include the following steps:
[0105] If the target interface file corresponding to the target interface identifier is stored in the cache of the SDK, then the target path corresponding to the target interface identifier is obtained from the SDK, so as to load the target interface file corresponding to the target interface identifier from the cache of the SDK according to the target path;
[0106] If the target interface file corresponding to the target interface identifier is not stored in the SDK cache, the target interface file corresponding to the target interface identifier is remotely loaded from the server.
[0107] In this embodiment of the invention, the interface file can be stored in the SDK cache. Therefore, after determining that the target interface is a native interface, it can first be determined whether the target interface file corresponding to the target interface identifier already exists in the SDK cache. If the target interface file corresponding to the target interface identifier already exists in the SDK cache, the target path can be determined according to the target interface identifier, and then the target interface file corresponding to the target interface identifier can be loaded from the SDK cache according to the target path. If the target interface file corresponding to the target interface identifier does not exist in the SDK cache, the target interface file corresponding to the target interface identifier can be remotely loaded from the server according to the target interface identifier.
[0108] In the above exemplary embodiments, if the target interface file corresponding to the target interface is stored in the SDK cache, it is not necessary to download it remotely from the server, which can improve the jump speed of the target interface. In addition, even if the target interface file corresponding to the target interface is not stored in the SDK cache, it can be loaded remotely from the server to ensure the normal jump of the target interface.
[0109] To enable those skilled in the art to better understand the technical solutions of the embodiments of the present invention, specific examples are provided below for illustrative purposes:
[0110] Reference Figure 3 This is a schematic diagram of a target interface processing provided in an embodiment of the present invention. When the target interface is about to be redirected, it is determined whether the target interface is a native interface. If the target interface is not a native interface, the target interface can be dynamically updated. If the target interface is a native interface, the target interface file corresponding to the target interface can be directly loaded.
[0111] Reference Figure 4This is a schematic diagram of interface file loading provided in an embodiment of the present invention. Specifically, it is determined whether the target interface is a native interface. If the target interface is not a native interface, the target interface can be dynamically updated. Then, it is determined whether the target interface file corresponding to the target interface exists in the SDK cache. If so, the corresponding target interface file is directly loaded from the SDK cache. If not, the corresponding target interface file can be remotely loaded from the server and stored in the SDK cache.
[0112] Reference Figure 5 This is a schematic diagram of a module dynamic update provided in an embodiment of the present invention. Assuming that multiple modules of the application, Module_1, Module_2, Module_3, ... Module_i, have been remotely updated, the SDK remotely loads the interface files corresponding to the interfaces of the multiple remotely updated modules from the server, and then the interface can be dynamically updated based on the interface files.
[0113] In practical applications, it is necessary to handle target interface navigation in various scenarios, specifically: Scenario 1: Navigating to the application's native interface; Scenario 2: Navigating to a non-native interface of the application; Scenario 3: Navigating to the application's native interface, but which is already being updated remotely. Therefore, in order to achieve target interface navigation in various scenarios, the routing design of the SDK in this embodiment of the invention can refer to... Figure 6 As shown, specifically:
[0114] When navigating to the target interface, it is determined whether the target interface is a native interface. If the target interface is not a native interface, the target interface file is loaded from the server or SDK cache to achieve dynamic updates of the target interface. If the target interface is a native interface and has not been updated remotely, the template interface file is loaded from the resource directory. If the target interface is a native interface but has been updated remotely, the target interface file is loaded from the server or SDK cache to achieve dynamic updates of the target interface. After the dynamic update of the target interface is completed, you can navigate to the target interface for display in the application.
[0115] Reference Figure 7 This is a sequence diagram of the overall architecture of a routing design provided in this embodiment of the invention, including ModuleA.page (the interface of module A), FairPushyWidget (middleware of the SDK, with remote loading capability), server (server), and ModuleB.page (the interface of module B). The specific sequence process is as follows:
[0116] 1. Before jumping from ModuleA.page to ModuleB.page, FairPushyWidget obtains the bundleId and pagename of ModuleB.page;
[0117] 2. FairPushyWidget requests the corresponding UI file from the server based on the bundleId and pagename;
[0118] 3. If the interface file corresponding to bundleId and pagename does not exist in the server, return a failure callback (code != 0) to FairPushyWidget. The callback includes code_msg (callback description).
[0119] 4. If the server contains a UI file corresponding to bundleId and pagename, then return a success CALLBACK (code=0) to FairPushyWidget. The CALLBACK includes code_msg (callback description).
[0120] 5. FairPushyWidget determines the corresponding input parameters based on the bundleId and pagename of ModuleB.page, and performs corresponding UI processing based on the input parameters;
[0121] 6. If the passed parameter is the interface file corresponding to ModuleB.page, you can directly jump to ModuleB.page;
[0122] 7. If the passed parameter is the pagename corresponding to ModuleB.page, then determine whether ModuleB.page is a native interface or a non-native interface;
[0123] 8. If it is a native interface, find the corresponding interface file (Widget) in the resource directory based on the pagename, and directly jump to ModuleB.page;
[0124] 9. If it is not a native interface, the corresponding interface file is retrieved from the SDK cache based on the bundleId and pagename, and ModuleB.page is dynamically updated based on the interface file to achieve navigation to ModuleB.page.
[0125] The descriptions corresponding to the input parameters are as follows:
[0126]
[0127] Description of callback:
[0128]
[0129] Reference Figure 8 This is a sequence diagram of the overall architecture for dynamic updates (hot updates) provided in this embodiment of the invention, which is equivalent to... Figure 7 Parts 1-4 include FairPushyWidget, Delegate (the encapsulated entry point for downloading, mainly to facilitate interaction between the middleware and the download process), file (for file management operations, since downloading, saving, and decompressing are all file behaviors), http (the network request part), and server (the server). Specifically:
[0130] 1. FairPushyWidget requests an update module (bundleId);
[0131] 2. The process proceeds through the delegate's internal process (internal call);
[0132] 3. Determine if the corresponding UI file exists in the SDK cache using the bundleId;
[0133] 4. If the corresponding interface file exists in the cache, return the cache path and version information.
[0134] 5. If the cache does not contain the corresponding interface file, proceed to the next step;
[0135] 6. Determine if a module is up-to-date based on its version number;
[0136] 7. Request the server and determine if the module is up-to-date based on its version number;
[0137] 8. The server returns the judgment result;
[0138] 9. The judgment result is that the module is up-to-date;
[0139] 10. If the result indicates that the module is not the latest version, return the module download address (or you can directly perform the download operation).
[0140] 11. Download the corresponding interface file from the module download address;
[0141] 12. Request the server to return the download address and download the corresponding interface file;
[0142] 13. The server returns the interface file;
[0143] 14. Return to the interface file;
[0144] 15. Save according to bundleId and version;
[0145] 16. Saved successfully, the path corresponding to this interface file can be generated;
[0146] 17. Save failed;
[0147] 18. The server did not return a user interface file;
[0148] 19. Failure.
[0149] In summary, by applying the embodiments of the present invention, the problem of the lack of a Fair dynamic update SDK in the market is solved, which can accelerate the popularization of Fair dynamic development. Furthermore, since Fair has advantages such as low access cost and stable performance, it can greatly improve the development efficiency of developers and the efficiency of product development and iteration.
[0150] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0151] Reference Figure 9 This diagram illustrates a structural block diagram of an interface transition device provided in an embodiment of the present invention, applied to an application's developer toolkit (SDK). The SDK includes Fair, a dynamic open-source framework designed based on the Flutter user interface framework. Fair is used to convert interface files into the interface of the corresponding application, and specifically may include the following modules:
[0152] The target interface parameter acquisition module 901 is used to acquire the target interface parameters corresponding to the target interface when the user is about to jump to the target interface.
[0153] The target input parameter determination module 902 is used to determine the target input parameters corresponding to the target interface parameters through the routing design of the SDK;
[0154] The first target interface jump module 903 is used to load the target interface file corresponding to the target input parameters remotely from the server or from the SDK when the target interface is a non-native interface or a native interface that has been remotely updated, and to convert the target interface file into the target interface through Fair so as to jump to the target interface.
[0155] In one exemplary embodiment, the apparatus may further include:
[0156] The second target interface jump module is used to convert the target interface file into the target interface through Fair when the target interface is a native interface and has not been remotely updated, so as to jump to the target interface.
[0157] In one exemplary embodiment, the apparatus further includes: a third target interface jump module, configured to:
[0158] When the target interface is a native interface and has not been updated remotely, if the target input parameter is the target interface identifier corresponding to the target interface, then the target interface file corresponding to the target interface is loaded from the resource directory of the application according to the target interface identifier, so as to convert the target interface file into the target interface through Fair.
[0159] In one exemplary embodiment, the application includes multiple modules, each module having a corresponding module identifier, and each module includes multiple interfaces. The device further includes an interface file download module, used for:
[0160] Obtain the identifier of the module to be updated and the version information of the module to be updated;
[0161] Send the identifier of the module to be updated and the version information to the server;
[0162] If the server determines, based on the version information, that the module to be updated corresponding to the module identifier is not the latest module, then the server sends the module download address.
[0163] Download the latest interface file corresponding to the module to be updated from the server according to the module download address;
[0164] The interface file is saved in the SDK cache, and a corresponding path is generated based on the location of the interface file in the SDK cache.
[0165] In an exemplary embodiment, the target input parameter includes a target interface identifier, and the first target interface jump module 903 is specifically used for:
[0166] If the target interface file corresponding to the target interface identifier is stored in the cache of the SDK, then the target path corresponding to the target interface identifier is obtained from the SDK, so as to load the target interface file corresponding to the target interface identifier from the cache of the SDK according to the target path;
[0167] If the target interface file corresponding to the target interface identifier is not stored in the SDK cache, the target interface file corresponding to the target interface identifier is remotely loaded from the server.
[0168] In one exemplary embodiment, the interface parameters include module identifier and interface identifier.
[0169] In the above manner, this embodiment of the invention takes into account that the SDK can remotely load interface files from the server, while Fair can convert interface files into interfaces but cannot remotely load interface files from the server. Therefore, this embodiment of the invention sets Fair in the SDK, so that when the target interface to be jumped to is a non-native interface or a native interface but has been remotely updated, the SDK can remotely load the corresponding target interface file from the server, and then Fair can convert the target interface file into the target interface to achieve the jump to the target interface.
[0170] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0171] In addition, this invention also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described interface jump method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0172] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described interface jump method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0173] This invention also provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the interface jump method embodiments described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0174] Figure 10 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.
[0175] The electronic device 1000 includes, but is not limited to, components such as: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, a processor 1010, and a power supply 1011. Those skilled in the art will understand that... Figure 10 The electronic device structures shown are not intended to limit the electronic device. An electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements. In embodiments of the present invention, the electronic device includes, but is not limited to, mobile phones, tablet computers, laptops, PDAs, in-vehicle terminals, wearable devices, and pedometers.
[0176] It should be understood that, in this embodiment of the invention, the radio frequency unit 1001 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink data from the base station and processes it with the processor 1010; additionally, it transmits uplink data to the base station. Typically, the radio frequency unit 1001 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, etc. Furthermore, the radio frequency unit 1001 can also communicate with networks and other devices through a wireless communication system.
[0177] The electronic device provides users with wireless broadband internet access through the network module 1002, such as helping users send and receive emails, browse web pages, and access streaming media.
[0178] The audio output unit 1003 can convert audio data received by the radio frequency unit 1001 or the network module 1002 or stored in the memory 1009 into audio signals and output them as sound. Furthermore, the audio output unit 1003 can also provide audio output related to specific functions performed by the electronic device 1000 (e.g., call signal reception sound, message reception sound, etc.). The audio output unit 1003 includes a speaker, a buzzer, and a receiver, etc.
[0179] Input unit 1004 is used to receive audio or video signals. Input unit 1004 may include a graphics processing unit (GPU) 10041 and a microphone 10042. GPU 10041 processes image data of still images or videos acquired by an image capture device (such as a camera) in video capture mode or image capture mode. The processed image frames can be displayed on display unit 1006. The image frames processed by GPU 10041 can be stored in memory 1009 (or other storage medium) or transmitted via radio frequency unit 1001 or network module 1002. Microphone 10042 can receive sound and process such sound into audio data. The processed audio data can be converted into a format that can be transmitted to a mobile communication base station via radio frequency unit 1001 in telephone call mode.
[0180] The electronic device 1000 also includes at least one sensor 1005, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 10061 according to the ambient light level, and the proximity sensor can turn off the display panel 10061 and / or backlight when the electronic device 1000 is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used to identify the posture of the electronic device (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. The sensor 1005 may also include a fingerprint sensor, pressure sensor, iris sensor, molecular sensor, gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc., which will not be described in detail here.
[0181] The display unit 1006 is used to display information input by the user or information provided to the user. The display unit 1006 may include a display panel 10061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0182] User input unit 1007 can be used to receive input numerical or character information, and generate key signal inputs related to user settings and function control of electronic devices. Specifically, user input unit 1007 includes touch panel 10071 and other input devices 10072. Touch panel 10071, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near touch panel 10071). Touch panel 10071 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to processor 1010, which receives and executes commands from processor 1010. In addition, touch panel 10071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 10071, the user input unit 1007 may also include other input devices 10072. Specifically, other input devices 10072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, joysticks, etc., which will not be described in detail here.
[0183] Furthermore, the touch panel 10071 can cover the display panel 10061. When the touch panel 10071 detects a touch operation on or near it, it transmits the information to the processor 1010 to determine the type of touch event. Subsequently, the processor 1010 provides corresponding visual output on the display panel 10061 based on the type of touch event. Although in Figure 10 In this embodiment, the touch panel 10071 and the display panel 10061 are two independent components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 10071 and the display panel 10061 can be integrated to realize the input and output functions of the electronic device. The specific implementation is not limited here.
[0184] Interface unit 1008 serves as an interface for connecting external devices to electronic device 1000. For example, external devices may include a wired or wireless headphone port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, and so on. Interface unit 1008 can be used to receive input from external devices (e.g., data, power, etc.) and transmit the received input to one or more components within electronic device 1000, or it can be used to transmit data between electronic device 1000 and external devices.
[0185] The memory 1009 can be used to store software programs and various data. The memory 1009 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory 1009 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0186] The processor 1010 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 1009, and by calling data stored in the memory 1009, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. The processor 1010 may include one or more processing units; preferably, the processor 1010 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 1010.
[0187] The electronic device 1000 may also include a power supply 1011 (such as a battery) for supplying power to various components. Preferably, the power supply 1011 can be logically connected to the processor 1010 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system.
[0188] In addition, the electronic device 1000 includes some functional modules not shown, which will not be described in detail here.
[0189] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0190] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this 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. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0191] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.
[0192] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0193] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0194] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0195] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0196] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0197] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0198] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for interface navigation, characterized in that, A developer toolkit (SDK) for an application, the SDK having remote loading capabilities, the SDK including Fair, a dynamic open-source framework based on the Flutter user interface framework, the Fair used to convert interface files into the corresponding application interface, the application including multiple modules, each module having a corresponding module identifier, and each module including multiple interfaces, the method including: Obtain the identifier of the module to be updated and the version information of the module to be updated; Send the identifier of the module to be updated and the version information to the server; If the server determines, based on the version information, that the module to be updated corresponding to the module identifier is not the latest module, then the server sends the module download address. Download the latest interface file corresponding to the module to be updated from the server according to the module download address; The interface file is stored in the SDK cache, and a corresponding path is generated based on the location of the interface file in the SDK cache; When the user is about to be redirected to the target interface, the target interface parameters corresponding to the target interface are obtained. The SDK determines the target input parameters corresponding to the target interface parameters through its routing design; the routing design is used to indicate how to load the interface and transfer data to complete the interface jump; the SDK is used to perform operations such as directly jumping to the target interface, retrieving the corresponding interface file from the specified storage location, or returning an empty value based on different input parameters; When the target interface is a non-native interface or a native interface that has been remotely updated, the target interface file corresponding to the target input parameters is loaded remotely from the server or from the SDK, and the target interface file is converted into the target interface through Fair to jump to the target interface; When the target interface is a native interface and is not remotely updated, an interface is set up in the SDK to redirect to the target page using the routing design of the Flutter native interface. This includes: registering the target interface in the SDK; the SDK calling the PushNamed method through the interface; determining that the target input parameter is a target interface identifier based on the target interface parameters; determining the path based on the target interface identifier; finding the resource directory of the corresponding application through the path; loading the target interface file corresponding to the target interface; and converting the target interface file into the target interface; or calling the Push method through the interface in the SDK; determining that the target input parameter is a target interface file based on the target interface parameters; and converting the target interface file into the target interface.
2. The method according to claim 1, characterized in that, After determining the target input parameters corresponding to the target interface parameters through the routing design of the SDK, the method further includes: When the target interface is a native interface and has not been updated remotely, if the target input parameter is the target interface file corresponding to the target interface, then Fair will convert the target interface file into the target interface to jump to the target interface.
3. The method according to claim 1, characterized in that, After determining the target input parameters corresponding to the target interface parameters through the routing design of the SDK, the method further includes: When the target interface is a native interface and has not been updated remotely, if the target input parameter is the target interface identifier corresponding to the target interface, then the target interface file corresponding to the target interface is loaded from the resource directory of the application according to the target interface identifier, so as to convert the target interface file into the target interface through Fair.
4. The method according to claim 1, characterized in that, The target input parameter includes a target interface identifier, and the loading of the target interface file corresponding to the target input parameter remotely from the server or from the SDK includes: If the target interface file corresponding to the target interface identifier is stored in the cache of the SDK, then the target path corresponding to the target interface identifier is obtained from the SDK, so as to load the target interface file corresponding to the target interface identifier from the cache of the SDK according to the target path; If the target interface file corresponding to the target interface identifier is not stored in the SDK cache, the target interface file corresponding to the target interface identifier is remotely loaded from the server.
5. The method according to claim 1, characterized in that, Interface parameters include module identifier and interface identifier.
6. A user interface transition device, characterized in that, A developer toolkit (SDK) for an application, the SDK having remote loading capabilities, the SDK including Fair, a dynamic open-source framework based on the Flutter user interface framework, Fair being used to convert interface files into the corresponding application interface, the application including multiple modules, each module having a corresponding module identifier, and each module including multiple interfaces, the device comprising: The interface file download module is used to obtain the identifier of the module to be updated and the version information of the identifier; send the identifier and the version information to the server; if the server determines that the module to be updated corresponding to the identifier is not the latest module based on the version information, the module download module is received from the server; the latest interface file corresponding to the module to be updated is downloaded from the server according to the module download address; the interface file is saved in the cache of the SDK, and a corresponding path is generated according to the position of the interface file in the cache of the SDK; The target interface parameter acquisition module is used to acquire the target interface parameters corresponding to the target interface when the user is about to be redirected to the target interface. The target input parameter determination module is used to determine the target input parameters corresponding to the target interface parameters through the routing design of the SDK; the routing design is used to indicate how to load the interface and transfer data to complete the interface jump; the SDK is used to perform operations such as directly jumping to the target interface, retrieving the corresponding interface file from the specified storage location, or returning an empty value based on different input parameters; The first target interface jump module is used to load the target interface file corresponding to the target input parameters remotely from the server or from the SDK when the target interface is a non-native interface or a native interface but has been remotely updated, and convert the target interface file into the target interface through Fair to jump to the target interface; When the target interface is a native interface and is not remotely updated, an interface is set up in the SDK to redirect to the target page using the routing design of the Flutter native interface. This includes: registering the target interface in the SDK; the SDK calling the PushNamed method through the interface; determining that the target input parameter is a target interface identifier based on the target interface parameters; determining the path based on the target interface identifier; finding the resource directory of the corresponding application through the path; loading the target interface file corresponding to the target interface; and converting the target interface file into the target interface; or calling the Push method through the interface in the SDK; determining that the target input parameter is a target interface file based on the target interface parameters; and converting the target interface file into the target interface.
7. The apparatus according to claim 6, characterized in that, The device further includes: The second target interface jump module is used to convert the target interface file into the target interface through Fair when the target interface is a native interface and has not been remotely updated, so as to jump to the target interface.
8. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; The memory is used to store computer programs; When the processor executes a program stored in the memory, it implements the method as described in any one of claims 1-5.
9. A computer-readable storage medium having instructions stored thereon that, when executed by one or more processors, cause the processors to perform the method as described in any one of claims 1-5.
Citation Information
Patent Citations
Page skip implementation method and device, electronic equipment and storage medium
CN112417337A
Dynamic updating method and device of Flutter component, electronic equipment and storage medium
CN112667263A
User interface rendering method and device, storage medium and electronic device
CN114253586A