Route jump method, device, equipment and system based on multi-UI framework

By defining route identification information and route metadata sets, the module coupling and compatibility issues of traditional route navigation methods under multi-platform UI frameworks are resolved, achieving seamless route navigation across UI frameworks and improving the flexibility and compatibility of applications.

CN121940352APending Publication Date: 2026-04-28SHENZHEN GREEN CONNECTION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN GREEN CONNECTION TECH CO LTD
Filing Date
2026-01-21
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Traditional routing methods suffer from high coupling between modules and insufficient compatibility in multi-platform UI framework environments, making it difficult to achieve unified management across technology stacks.

Method used

By defining the route identification information and route metadata set corresponding to the target component of the application, including address, parameters and framework metadata, and matching the URL link information with the route metadata set, the route jump control parameters are determined, and the corresponding route jump operation is executed, supporting route jump under multiple UI frameworks.

Benefits of technology

It achieves decoupling between modules, improves the flexibility and compatibility of the application in a multi-platform UI framework environment, and ensures the accuracy and reliability of route navigation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121940352A_ABST
    Figure CN121940352A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of the Internet, and discloses a route skipping method, device, equipment and system based on a multi-UI framework. Route identification information corresponding to a target component is defined, and a route metadata set of the target component is set, so that the route metadata set comprises at least one of address metadata, parameter metadata and framework metadata; according to the method, UI frames, such as a SwiftUI frame and a UIKit frame, which can be supported by the target component are indicated through the frame metadata, so that the target component performs routing jump in all the UI frames based on the frame metadata, and when a routing system monitors URL link information, the URL link information is matched with a routing metadata set, so that the URL link information of the target component is matched with the routing metadata set, and the routing efficiency of the target component is improved. According to the method and the device, the corresponding routing jump control parameter set is determined, and the routing jump operation is executed according to the determined routing jump control parameter set, so that not only can no coupling among routing jump modules be realized, but also the compatibility in a multi-platform UI framework environment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet technology, and in particular to a routing method, apparatus, device and system based on a multi-UI framework. Background Technology

[0002] In order to provide an application with a clear and controllable page flow mechanism, it is usually necessary to design a route jump method. The commonly used route jump methods currently include the direct dependency method or the enumeration route method (that is, the method of using an enumeration type to correspond to the page view).

[0003] However, in practice, it has been found that traditional routing methods have the following technical defects: On the one hand, the direct dependency method requires high coupling between modules. Specifically, its routing logic is scattered in various places, and the caller must import the target module and create the target parameter instance, resulting in high coupling and difficulty in unified modification; on the other hand, the enumeration routing method simply represents each enumeration as a route. In the scenario of mixed multi-platform UI frameworks (such as SwiftUI / UIViewController), it is impossible to perform unified management across technology stacks. The routing logic needs to be adapted separately and lacks normalization processing capability.

[0004] It is evident that proposing a technical solution that not only enables decoupling between modules for route navigation but also improves compatibility across multiple platform UI framework environments is of paramount importance. Summary of the Invention This invention provides a routing method, apparatus, device, and system based on multiple UI frameworks, which not only enables decoupling between routing modules but also improves compatibility in multi-platform UI framework environments.

[0005] To address the aforementioned technical problems, the first aspect of this invention discloses a routing method based on a multi-UI framework. This method is applied to an electronic device with an application installed, wherein the electronic device is communicatively connected to a network attached storage device (NETS) and accesses the NETS through the application. The method is used to control routing for the electronic device or the application within the NETS; wherein the method includes: By defining the route identifier information corresponding to the target component of the application, the route metadata set of the target component is set. The route metadata set includes at least one of address metadata, parameter metadata and framework metadata. The framework metadata is used to indicate the UI framework that the target component can support. The UI framework includes the SwiftUI framework and the UIKit framework. The framework metadata is used to enable all business within the target component to perform route jumps in all UI frameworks based on the framework metadata. When the routing system detects an input URL link information for the target component, it matches the URL link information with the routing metadata set to determine the set of routing jump control parameters corresponding to the URL link information. Based on the set of routing control parameters corresponding to the URL link information, execute the routing operation corresponding to the target component.

[0006] As an optional implementation, in the first aspect of the present invention, the address metadata is used to indicate the path field of the target component, and the parameter metadata is used to indicate the parameter passing method of the target component; And, the matching of the URL link information and the routing metadata set to determine the set of routing redirection control parameters corresponding to the URL link information includes: Parse the URL link information to obtain several key pieces of information about the URL link information, including length information and key fields; Based on the routing metadata set, target information matching each routing metadata in the routing metadata set is determined from all the key information. The target information matching the address metadata is the path field, the target information matching the parameter metadata is the length information, and the target information matching the frame metadata is the frame field. For each of the aforementioned routing metadata, the routing hop control parameters corresponding to that routing metadata are determined based on the target information that matches the routing metadata. By integrating all the routing metadata corresponding to the routing jump control parameters, a set of routing jump control parameters corresponding to the URL link information is obtained.

[0007] As an optional implementation, in the first aspect of the present invention, determining the routing hop control parameters corresponding to each routing metadata based on target information matching the routing metadata includes: For each of the aforementioned routing metadata, when the routing metadata is the address metadata, the target path of the URL link information determined by the path field matching the address metadata is used to generate the routing jump control parameters corresponding to the address metadata; or, For each of the route metadata, when the route metadata is the parameter metadata, the parameter passing method of the target component's parameter to be passed is determined based on the length information matching the parameter metadata, and used as the route jump control parameter corresponding to the parameter metadata; or, For each of the route metadata, when the route metadata is the framework metadata, the target UI framework to be routed is determined based on the framework field that matches the framework metadata, and is used as the route jump control parameter corresponding to the framework metadata.

[0008] As an optional implementation, in the first aspect of the present invention, determining the parameter transmission method of the parameter to be transmitted of the target component based on the length information matching the parameter metadata, as the routing control parameter corresponding to the parameter metadata, includes: Based on the length information matching the parameter metadata, memory analysis is performed on the pre-determined parameters to be transmitted of the target component to obtain the memory occupied by the parameters to be transmitted. Based on the memory usage, the parameter transmission method of the parameter to be transmitted is determined and used as the routing control parameter corresponding to the parameter metadata. The parameter transmission method includes inline mode or external mode.

[0009] As an optional implementation, in the first aspect of the present invention, determining the parameter transmission method of the parameter to be transmitted based on the occupied memory, as the routing control parameter corresponding to the parameter metadata, includes: Based on the memory occupied by the parameter to be transmitted, determine whether the occupied memory is less than or equal to the preset memory. When it is determined that the memory occupied is less than or equal to the preset memory occupied, the parameter passing method of the parameter to be passed is determined to be the inline method; When it is determined that the memory occupied is greater than the preset memory occupied, the parameter transmission method of the parameter to be transmitted is determined to be the external method.

[0010] As an optional implementation, in the first aspect of the invention, the routing hopping operation is performed in the following manner: The routing system distributes the corresponding routing processing engine to the target component based on the set of routing jump control parameters corresponding to the URL link information; The routing system, based on the routing processing engine, executes the navigation code corresponding to the set of routing jump control parameters to complete the routing jump operation corresponding to the target component.

[0011] As an optional implementation, in the first aspect of the present invention, the step of setting the routing metadata set of the target component by defining the routing identifier information corresponding to the target component of the application includes: Define unique routing identification information for the target components of the application; By registering the route identifier information of the target component and the corresponding view building closure into the routing table, a mapping relationship is established between the route identifier information and the building logic corresponding to the view building closure, thus obtaining the route metadata set of the target component. The route metadata set is used to pass the route identifier information of the target component and the parameters to be passed by the target component when the routing system executes the navigation code, so that the routing middleware of the routing system can look up the corresponding view builder in the routing table according to the route identifier information. The view builder is used to construct the page to be redirected corresponding to the target component.

[0012] A second aspect of this invention discloses a routing and redirection device based on a multi-UI framework. The device is applied to an electronic device with an application installed, and the electronic device is communicatively connected to a network-attached storage device (NATD) and accesses the NATD through the application. The device is used to perform routing and redirection control on the electronic device or the application in the NATD; wherein the device includes: The configuration module is used to set the routing metadata set of the target component by defining the routing identifier information corresponding to the target component of the application. The routing metadata set includes at least one of address metadata, parameter metadata and framework metadata. The framework metadata is used to indicate the UI framework that the target component can support. The UI framework includes the SwiftUI framework and the UIKit framework. The framework metadata is used to enable all business within the target component to perform routing jumps in all UI frameworks based on the framework metadata. The matching module is used to match the URL link information and the routing metadata set when the routing system listens for the input URL link information for the target component, so as to determine the set of routing jump control parameters corresponding to the URL link information. The redirection module is used to execute a route redirection operation corresponding to the target component based on the set of route redirection control parameters corresponding to the URL link information.

[0013] As an optional implementation, in a second aspect of the present invention, the address metadata is used to indicate the path field of the target component, and the parameter metadata is used to indicate the parameter passing method of the target component; Furthermore, the specific method by which the matching module matches the URL link information and the routing metadata set to determine the set of routing redirection control parameters corresponding to the URL link information includes: Parse the URL link information to obtain several key pieces of information about the URL link information, including length information and key fields; Based on the routing metadata set, target information matching each routing metadata in the routing metadata set is determined from all the key information. The target information matching the address metadata is the path field, the target information matching the parameter metadata is the length information, and the target information matching the frame metadata is the frame field. For each of the aforementioned routing metadata, the routing hop control parameters corresponding to that routing metadata are determined based on the target information that matches the routing metadata. By integrating all the routing metadata corresponding to the routing jump control parameters, a set of routing jump control parameters corresponding to the URL link information is obtained.

[0014] As an optional implementation, in the second aspect of the present invention, the specific method by which the matching module determines the routing hop control parameters corresponding to each routing metadata based on target information matching the routing metadata includes: For each of the aforementioned routing metadata, when the routing metadata is the address metadata, the target path of the URL link information determined by the path field matching the address metadata is used to generate the routing jump control parameters corresponding to the address metadata; or, For each of the route metadata, when the route metadata is the parameter metadata, the parameter passing method of the target component's parameter to be passed is determined based on the length information matching the parameter metadata, and used as the route jump control parameter corresponding to the parameter metadata; or, For each of the route metadata, when the route metadata is the framework metadata, the target UI framework to be routed is determined based on the framework field that matches the framework metadata, and is used as the route jump control parameter corresponding to the framework metadata.

[0015] As an optional implementation, in a second aspect of the invention, the matching module determines the parameter transmission method of the target component's parameters to be transmitted based on length information matching the parameter metadata. Specific methods for using the routing control parameters corresponding to the parameter metadata include: Based on the length information matching the parameter metadata, memory analysis is performed on the pre-determined parameters to be transmitted of the target component to obtain the memory occupied by the parameters to be transmitted. Based on the memory usage, the parameter transmission method of the parameter to be transmitted is determined and used as the routing control parameter corresponding to the parameter metadata. The parameter transmission method includes inline mode or external mode.

[0016] As an optional implementation, in a second aspect of the present invention, the matching module determines the parameter transmission method of the parameter to be transmitted based on the memory occupied, and the specific method of the routing jump control parameter corresponding to the parameter metadata includes: Based on the memory occupied by the parameter to be transmitted, determine whether the occupied memory is less than or equal to the preset memory. When it is determined that the memory occupied is less than or equal to the preset memory occupied, the parameter passing method of the parameter to be passed is determined to be the inline method; When it is determined that the memory occupied is greater than the preset memory occupied, the parameter transmission method of the parameter to be transmitted is determined to be the external method.

[0017] As an optional implementation, in a second aspect of the invention, the routing hopping operation is performed in the following manner: The routing system distributes the corresponding routing processing engine to the target component based on the set of routing jump control parameters corresponding to the URL link information; The routing system, based on the routing processing engine, executes the navigation code corresponding to the set of routing jump control parameters to complete the routing jump operation corresponding to the target component.

[0018] As an optional implementation, in the second aspect of the present invention, the configuration module sets the routing metadata set of the target component by defining the routing identifier information corresponding to the target component of the application in the following specific ways: Define unique routing identification information for the target components of the application; By registering the route identifier information of the target component and the corresponding view building closure into the routing table, a mapping relationship is established between the route identifier information and the building logic corresponding to the view building closure, thus obtaining the route metadata set of the target component. The route metadata set is used to pass the route identifier information of the target component and the parameters to be passed by the target component when the routing system executes the navigation code, so that the routing middleware of the routing system can look up the corresponding view builder in the routing table according to the route identifier information. The view builder is used to construct the page to be redirected corresponding to the target component.

[0019] A third aspect of the present invention discloses an electronic device, the electronic device comprising: Memory containing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the routing method based on a multi-UI framework disclosed in the first aspect of the present invention.

[0020] The fourth aspect of the present invention discloses a routing system based on a multi-UI framework. The system includes at least a routing device based on a multi-UI framework as described in the second aspect of the present invention, and a network-attached storage device communicatively connected to the routing device based on the multi-UI framework. The network-attached storage device stores a target component of an application. When the routing device based on the multi-UI framework configures a routing metadata set of the target component, the routing device based on the multi-UI framework completes a routing operation for the target component based on the routing metadata set according to the routing method based on a multi-UI framework as described in any one of the first aspects of the present invention. or, The system includes at least an electronic device as described in the third aspect of the present invention, and a network-attached storage device communicatively connected to the electronic device, wherein the network-attached storage device stores a target component of an application. When the electronic device configures a routing metadata set for the target component, the electronic device performs a routing jump operation for the target component based on the routing metadata set according to the multi-UI framework-based routing jump method as described in the first aspect of the present invention.

[0021] The fifth aspect of the present invention discloses a computer storage medium storing computer instructions, which, when invoked, are used to execute the routing jump method based on a multi-UI framework disclosed in the first aspect of the present invention.

[0022] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: Implementing this invention allows defining routing identifier information corresponding to the target component of an application and setting its routing metadata set. This routing metadata set includes at least one of address metadata, parameter metadata, and framework metadata. The framework metadata indicates the UI frameworks supported by the target component, such as SwiftUI and UIKit. All business logic within the target component can then perform routing jumps across all UI frameworks based on this framework metadata. When the routing system detects an input URL link for the target component, it matches the URL link with the routing metadata set to determine the corresponding routing jump control parameter set. This facilitates precise control of routing jump behavior, ensuring accuracy and reliability. Based on the determined routing jump control parameter set, the corresponding routing jump operation for the target component is executed. Compared to traditional routing jump methods that require high coupling between modules, this solution, through the URL protocol, not only achieves decoupling between routing jump modules but also improves the flexibility and compatibility of the application in multi-platform UI framework environments by supporting multi-UI framework routing jumps. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 This is a flowchart illustrating a routing method based on a multi-UI framework disclosed in an embodiment of the present invention. Figure 2 This is a schematic diagram illustrating the definition and usage process of a routing identifier as disclosed in an embodiment of the present invention; Figure 3 This is a flowchart illustrating another routing method based on a multi-UI framework disclosed in an embodiment of the present invention. Figure 4 This is a schematic diagram of the execution flow of a routing method based on a multi-UI framework disclosed in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of a routing jump device based on a multi-UI framework disclosed in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of a routing system based on a multi-UI framework disclosed in an embodiment of the present invention; Figure 8 This is a schematic diagram of another routing system based on a multi-UI framework disclosed in an embodiment of the present invention. Detailed Implementation

[0025] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or end that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or ends.

[0027] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0028] This invention discloses a routing method, apparatus, device, and system based on multiple UI frameworks. It defines routing identifier information corresponding to the target component of an application and sets its routing metadata set, ensuring that the routing metadata set includes at least one of address metadata, parameter metadata, and framework metadata. This allows the framework metadata to indicate the UI frameworks supported by the target component, such as SwiftUI and UIKit, so that all business logic within the target component can perform routing jumps across all UI frameworks based on this framework metadata. When the routing system detects an input URL link for the target component, it matches the URL link with the routing metadata set to determine the corresponding routing jump control parameter set. This facilitates precise control of routing jump behavior, ensuring accuracy and reliability. Then, based on the determined routing jump control parameter set, it executes the corresponding routing jump operation for the target component. Compared to traditional routing jump methods that require high coupling between modules, this solution, through the URL protocol, not only achieves decoupling between routing jump modules but also improves the flexibility and compatibility of the application in multi-platform UI framework environments by supporting multi-UI framework routing jumps. Detailed descriptions follow.

[0029] Example 1 Please see Figure 1 , Figure 1 This is a flowchart illustrating a routing method based on a multi-UI framework disclosed in an embodiment of the present invention. Figure 1The described multi-UI framework-based routing method can be applied to electronic devices with installed applications, where the electronic device is communicatively connected to a network-attached storage device (NAT), and accesses the NAT through the application. This method is used to control routing for applications on the electronic device or NAT. The method can also be applied to a multi-UI framework-based routing device, which may include a routing device or a routing server. The routing server may include a cloud server or a local server; this embodiment of the invention does not impose limitations. Figure 1 As shown, this multi-UI framework-based route navigation method can include the following operations: 101. Set the route metadata set of the target component by defining the route identifier information corresponding to the target component of the application.

[0030] In this embodiment of the invention, the target component can be any component in the application that requires route navigation, such as a page, view, or controller. The route identifier information is responsible for marking the route; the route identifier in the route identifier information can be defined in a View or UIViewController, and is essentially a static string used for router registration and lookup.

[0031] In this embodiment of the invention, the routing metadata set includes at least one of address metadata, parameter metadata, and framework metadata. The address metadata indicates the path field of the target component, the parameter metadata indicates the parameter passing method of the target component, and the framework metadata indicates the UI frameworks supported by the target component.

[0032] Optionally, the UI framework may include the SwiftUI framework and the UIKit framework. Further optionally, the UI framework may also include at least one of the Flutter framework, the React Native framework, and the H5 framework. The framework metadata is used to enable all business logic within the target component to navigate between all UI frameworks based on the framework metadata; this embodiment of the invention does not impose any limitations.

[0033] 102. When the routing system detects an input URL link information for a target component, it matches the URL link information with the routing metadata set to determine the set of routing jump control parameters corresponding to the URL link information.

[0034] In this embodiment of the invention, specifically, the routing control parameter set may include routing control parameters corresponding to address metadata, routing control parameters corresponding to parameter metadata, and routing control parameters corresponding to framework metadata. Specifically, the routing control parameters corresponding to address metadata may be the target path indicated by the URL link information; the routing control parameters corresponding to parameter metadata may be the parameter passing method of the parameters to be passed to the target component; and the routing control parameters corresponding to framework metadata may be the target UI framework to be routed to.

[0035] 103. Based on the set of route redirection control parameters corresponding to the URL link information, execute the corresponding route redirection operation for the target component.

[0036] It is evident that implementation Figure 1 The described multi-UI framework-based routing method defines the routing identifier information corresponding to the target component of the application and sets its routing metadata set. This routing metadata set includes at least one of address metadata, parameter metadata, and framework metadata. The framework metadata indicates the UI frameworks supported by the target component, such as SwiftUI and UIKit. All business logic within the target component can then perform routing across all UI frameworks based on this framework metadata. When the routing system detects an input URL link for the target component, it matches the URL link with the routing metadata set to determine the corresponding routing control parameter set. This facilitates precise control of routing behavior, ensuring accuracy and reliability. Based on the determined routing control parameter set, the corresponding routing operation for the target component is executed. Compared to traditional routing methods that require high coupling between modules, this solution, through the URL protocol, not only achieves decoupling between routing modules but also enhances the flexibility and compatibility of the application in multi-platform UI framework environments by supporting multi-UI framework routing.

[0037] In an optional embodiment, the route hopping operation is performed in the following manner: The routing system distributes the corresponding routing processing engine to the target component based on the set of routing jump control parameters corresponding to the URL link information; The routing system, based on the routing processing engine, executes the navigation code corresponding to the set of routing jump control parameters to complete the routing jump operation with the target component.

[0038] In this embodiment of the invention, the routing engine can optionally be one of the following: Event engine, UIKit engine, SwiftUI engine, Flutter engine, ReactNative engine, or H5 rendering engine. By encapsulating different types of routing logic within different routing engines, this avoids writing a large amount of redundant route judgment and processing code within the target component. When it is necessary to modify or extend a specific type of routing logic, only the corresponding routing engine needs to be operated on, without affecting other parts, greatly improving code reusability and maintainability.

[0039] In this embodiment of the invention, specifically, the routing system can open a specified URL link to jump to a specified page or perform a specified operation. For example, "app: / / swiftUI / center / info" can be opened through the routing system to jump to the specified page. In this way, the routing system uses the URL string as the jump protocol, decoupling through the string and eliminating the need for direct dependence. The jump intention can be clearly described through the URL string.

[0040] As can be seen, this optional embodiment can distribute the corresponding routing processing engine to the target component according to the routing jump control parameter set through the routing system. The dynamic distribution mechanism enables different routing scenarios to adapt to the most suitable processing engine, which can flexibly cope with various complex routing requirements. Whether it is a simple page jump or a complex navigation process involving multiple steps and conditions, an appropriate processing method can be found. Subsequently, the routing system executes the navigation code corresponding to the routing jump control parameter set based on the distributed routing processing engine. It can execute navigation operations according to predetermined logic and rules, ensuring the accuracy of routing jumps and avoiding jump errors or unexpected situations. It can also be optimized for specific routing scenarios, reducing unnecessary computation and resource consumption. Furthermore, by centralizing the routing jump operation in the routing processing engine and navigation code, the routing system can more easily manage and monitor all routing jump behaviors in a unified manner.

[0041] In another optional embodiment, step 101 above, which involves setting the route metadata set of the target component by defining the route identifier information corresponding to the target component of the application, includes: Define unique routing identification information for the target components of the application; By registering the route identification information of the target component and the corresponding view construction closure into the routing table, a mapping relationship is established between the route identification information and the construction logic corresponding to the view construction closure, thus obtaining the route metadata set of the target component.

[0042] In this embodiment of the invention, the routing metadata set is used to pass the routing identifier information of the target component and the parameters to be passed to the target component when the routing system executes the navigation code. The routing intermediate layer of the routing system can then look up the corresponding view builder in the routing table based on the routing identifier information. The view builder is used to construct the page to be redirected to the target component.

[0043] For example, such as Figure 2 As shown, Figure 2 This is a schematic diagram illustrating the definition and usage process of a routing identifier according to an embodiment of the present invention. The definition and usage process of the routing identifier may include the following steps: Step 1: The page implements the routing protocol and provides a unique route identifier, such as a component ID, for example: "demo / typesafe"; Step 2: The registration layer writes the component ID and factory closure into the registry. An example of the unified mapping relationship is: "identifier->view builder"; Step 3: When calling the navigation, pass in the component ID and parameters so that the routing middleware of the subsequent routing system can find and build the matching page based on the ID; Step 4: After matching is complete, execute the navigation code (SwiftUI path / UIView push) to set a unified entry point for subsequent validation, event tracking, and permission handling.

[0044] As can be seen, this optional embodiment can define unique route identification information for target components, ensuring that each component in the routing system can be accurately identified and located, avoiding routing confusion caused by identification conflicts, and enabling the routing system to accurately direct requests to the correct target components, thus improving the accuracy and reliability of routing. Furthermore, registering the route identification information of the target component with the corresponding view construction closure in the routing table establishes a mapping relationship between the two, forming a set of routing metadata. This allows the routing system to dynamically call the corresponding view construction logic based on different route identification information, bringing high flexibility to the application. Moreover, when new target components need to be added or the view construction method of existing components needs to be modified, only the mapping relationship in the routing table needs to be updated, without requiring large-scale modifications to the core logic of the routing system, reducing the coupling of the system.

[0045] Example 2 Please see Figure 3 , Figure 3 This is a flowchart illustrating a routing method based on a multi-UI framework disclosed in an embodiment of the present invention. Figure 3The described multi-UI framework-based routing method can be applied to electronic devices with installed applications, where the electronic device is communicatively connected to a network-attached storage device (NAT), and accesses the NAT through the application. This method is used to control routing for applications on the electronic device or NAT. The method can also be applied to a multi-UI framework-based routing device, which may include a routing device or a routing server. The routing server may include a cloud server or a local server; this embodiment of the invention does not impose limitations. Figure 3 As shown, this multi-UI framework-based route navigation method can include the following operations: 201. Set the route metadata set of the target component by defining the route identifier information corresponding to the target component of the application.

[0046] 202. When the routing system detects the input URL link information for the target component, it parses the URL link information to obtain several key pieces of information from the URL link information.

[0047] In this embodiment of the invention, the key information may include length information and key fields. The key fields may include path fields and frame fields.

[0048] 203. Based on the routing metadata set, determine the target information that matches each routing metadata in the routing metadata set from all key information.

[0049] In this embodiment of the invention, specifically, the target information for matching address metadata is the path field, the target information for matching parameter metadata is the length information, and the target information for matching frame metadata is the frame field.

[0050] 204. For each route metadata, determine the route hop control parameters corresponding to that route metadata based on the target information that matches the route metadata.

[0051] 205. Integrate all routing metadata corresponding to routing jump control parameters to obtain a set of routing jump control parameters corresponding to URL link information.

[0052] 206. Based on the set of route redirection control parameters corresponding to the URL link information, execute the corresponding route redirection operation for the target component.

[0053] In this embodiment of the invention, for other descriptions of steps 201-206, please refer to the detailed description of steps 101-103 in Embodiment 1. These descriptions will not be repeated in this embodiment of the invention.

[0054] It is evident that implementation Figure 3The described multi-UI framework-based routing method defines the routing identifier information corresponding to the target component of the application and sets its routing metadata set. This routing metadata set includes at least one of address metadata, parameter metadata, and framework metadata. The framework metadata indicates the UI frameworks supported by the target component, such as SwiftUI and UIKit. All business logic within the target component can then perform routing across all UI frameworks based on this framework metadata. When the routing system detects an input URL link for the target component, it matches the URL link with the routing metadata set to determine the corresponding routing control parameter set. This facilitates precise control of routing behavior, ensuring accuracy and reliability. Based on the determined routing control parameter set, the corresponding routing operation for the target component is executed. Compared to traditional routing methods that require high coupling between modules, this solution, through the URL protocol, not only achieves decoupling between routing modules but also enhances the flexibility and compatibility of the application in multi-platform UI framework environments by supporting multi-UI framework routing. Furthermore, it can parse URL link information to obtain multiple key pieces of information, providing a comprehensive and detailed analysis of the URL's structure. This provides a rich and accurate data foundation for subsequent accurate matching of routing metadata. Subsequently, based on the routing metadata set, it identifies the target information that matches each piece of routing metadata in the set from all key information, specifying the target information corresponding to address metadata, parameter metadata, and frame metadata. By clearly defining the correspondence between URL links and routing metadata, it avoids confusion and errors during the matching process, enabling the routing system to accurately associate information in the URL with routing metadata. Through targeted matching, the routing system can quickly locate target information related to metadata without searching and filtering through a large amount of irrelevant information, thus improving matching efficiency. Then, based on the target information matching each piece of routing metadata, it determines the routing jump control parameters corresponding to that routing metadata, thereby integrating a set of routing jump control parameters corresponding to the URL link information. By identifying different types of target information corresponding to different metadata, it determines routing jump control parameters with different functions, thus integrating a complete set of routing jump control parameters. This provides a comprehensive and accurate control basis for the routing system to execute specific jump operations.

[0055] In an optional embodiment, step 204 above, for each route metadata, determines the route hop control parameters corresponding to that route metadata based on the target information matching the route metadata, including: For each route metadata instance, when the route metadata is address metadata, the target path of the URL link information determined by the path field matching the address metadata is used to generate the route redirection control parameters corresponding to the address metadata; or, For each route metadata, when the route metadata is parameter metadata, the parameter passing method of the target component's parameter is determined based on the length information matching the parameter metadata, and used as the route jump control parameter corresponding to the parameter metadata; or, For each route metadata, when the route metadata is frame metadata, the target UI frame to be routed is determined based on the frame field that matches the frame metadata, and is used as the route jump control parameter corresponding to the frame metadata.

[0056] In this embodiment of the invention, the address metadata may include multiple path rule information. Specifically, the path field that matches the address metadata is compared with all the path rule information contained in the address metadata to obtain matching path rule information; then, the target path of the URL link information is determined based on the access path of the matching path rule information; and finally, the routing jump control parameters corresponding to the address metadata are generated based on the target path of the URL link information.

[0057] For example: Suppose the address metadata includes first path rule information, second path rule information, and third path rule information. The access path of the first path rule information is "article list page" with the format " / posts", the access path of the second path rule information is "article details page" with the format " / post / :id", and the access path of the third path rule information is "author homepage" with the format " / user / :name". Furthermore, assuming that when the path field matching the address metadata in the URL link entered by the user in the browser is " / post / 123", this path field is compared one by one with all the aforementioned path rule information. It is found that the format of " / post / 123" and the format of the second path rule information both begin with " / post / " followed by specific content. That is, the format of " / post / 123" matches the format of the second path rule information. At this point, the access path is determined to be "article details page", and "123" in the URL link is extracted as a text number parameter. This parameter is then packaged with the identifier of "article details page" to generate route redirection control parameters, such as a control parameter with the instruction "load article details page, article number 123". Alternatively, assuming that the path field matching the address metadata in the URL link clicked by the user is " / user / alice", this path field is compared one by one with all the aforementioned path rule information. It is found that " / user / alice"... The format matches the format of the third path rule information. At this point, it is determined that the access path is "author's homepage". Route redirection control parameters are generated, such as control parameters with the instruction "record author's homepage, author's name is alice".

[0058] As can be seen, this optional embodiment can generate routing control parameters by determining the target path of the URL link information based on the path field matching the address metadata. It can accurately locate the target page or resource, achieve accurate routing, avoid routing errors caused by unclear paths, and improve the accuracy and reliability of routing. Furthermore, it can determine the parameter transmission method of the target component based on the length information matching the parameter metadata. It can flexibly select an appropriate transmission method according to the specific situation of the parameter (such as length), ensuring that the parameter can be correctly and efficiently transmitted to the target component, guaranteeing the normal operation of the component function, and improving the stability and compatibility of the system. It can also determine the target UI framework to be routed based on the framework field matching the framework metadata, enabling the system to perform accurate routing according to different framework requirements. This enhances the adaptability and flexibility of the system in different UI framework environments and facilitates switching and integration between different frameworks.

[0059] In this optional embodiment, as an optional implementation method, the parameter passing method of the target component's parameters to be passed is determined based on the length information matching the parameter metadata, serving as the routing control parameters corresponding to the parameter metadata, including: Based on the length information matching the parameter metadata, memory analysis is performed on the parameters to be transmitted of the pre-determined target component to obtain the memory occupied by the parameters to be transmitted. Based on the memory usage, determine the parameter passing method for the parameters to be passed, which will then serve as the routing control parameters corresponding to the parameter metadata.

[0060] In this embodiment of the invention, the parameter passing method includes inline or external methods. The inline method involves appending the serialized parameter string to the route URL. This ensures the URL contains complete parameter information and allows for direct sharing and copying of the URL without additional storage management. The external method stores the parameters in designated memory for automatic retrieval by the page. This method allows for the passing of parameters of any size while maintaining a concise URL, and also supports complex objects and large amounts of data.

[0061] As can be seen, this optional implementation method can perform memory analysis on the parameters to be transmitted to the target component based on the length information matching the parameter metadata. It can accurately obtain the actual memory size occupied by the parameters to be transmitted, and thus determine the most suitable parameter transmission method based on the memory size occupied by the parameters to be transmitted. This reduces problems such as data loss, corruption or system crashes caused by improper transmission methods. By scientifically determining the transmission method based on memory usage, these potential risks can be effectively avoided, and the stability and reliability of the system can be enhanced.

[0062] In this optional implementation, optionally, the parameter passing method for the parameters to be passed is determined based on the memory occupied, and used as the routing control parameters corresponding to the parameter metadata, including: Based on the memory usage of the parameters to be transmitted, determine whether the memory usage is less than or equal to the preset memory usage. When it is determined that the memory usage is less than or equal to the preset memory usage, the parameter passing method is determined to be inline. When it is determined that the memory usage exceeds the preset memory usage, the parameter passing method is set to external.

[0063] For example, when the memory occupied by the parameter to be transmitted is less than or equal to 500 bits, the inline method is supported, and the inline method is selected for parameter transmission; when the memory occupied by the parameter to be transmitted is greater than 500 bits, the inline method has the risk of overflow, and the external method is selected for parameter transmission.

[0064] As can be seen, this optional implementation can also use an inline method when the memory occupied by the parameter to be transmitted is less than or equal to the preset memory occupied. This can reduce additional memory access and pointer jump operations, allowing data to be read and processed more quickly. This helps to speed up the data transmission speed of the entire system and improve the overall operating efficiency. For parameters that occupy a large amount of memory, using an external method can avoid the memory bloat problem caused by directly embedding a large amount of data. Moreover, the external method can usually store the parameters in a specific memory area and access them through references or pointers, reducing unnecessary memory copying and storage space occupation, and reducing the system's memory overhead and operating burden.

[0065] For example, such as Figure 4 As shown, Figure 4 This is a schematic diagram illustrating the execution flow of a routing method based on a multi-UI framework disclosed in an embodiment of the present invention. The execution flow of this method is as follows: Analyze the routing application, such as using "app: / / route / uikit / page / detail" in the route address to locate the specific application; Analyze events / routes, such as "app: / / event / page / detail", and extract key fields. These fields can be "event" or at least one of the following: uikit, swifiUI, h5, flutter, and reactnative. After extracting the event, analyze the unique route identifier, such as "app: / / route / uikit / page / detail", to find the event sent by the specified recipient; After extracting at least one field from uikit, swifiUI, h5, flutter, and reactnative, the unique route identifier, such as "app: / / route / uikit / page / detail", is analyzed to analyze the receiver in the registry (such as the UI framework mentioned above), and then the parameters to be transmitted are analyzed and the route jump operation related to the parameters to be transmitted is executed.

[0066] Example 3 Please see Figure 5 , Figure 5 This is a schematic diagram of a routing and navigation device based on a multi-UI framework disclosed in an embodiment of the present invention. Figure 5The described multi-UI framework-based routing and redirection device can be applied to electronic devices with installed applications. The electronic device is communicatively connected to a network-attached storage device (NAT), and accesses the NAT through the application. This device is used to control routing and redirection of applications on the electronic device or NAT. The device may include a redirection device or a redirection server, wherein the redirection server may be a cloud server or a local server; this embodiment of the invention is not limited thereto. Figure 5 As shown, the routing device based on a multi-UI framework may include: The configuration module 301 is used to set the routing metadata set of the target component by defining the routing identifier information corresponding to the target component of the application. The routing metadata set includes at least one of address metadata, parameter metadata and framework metadata. The framework metadata is used to indicate the UI framework that the target component can support. The UI framework includes the SwiftUI framework and the UIKit framework. The framework metadata is used to enable all business within the target component to perform routing jumps in all UI frameworks based on the framework metadata.

[0067] The matching module 302 is used to match the URL link information and the set of routing metadata when the routing system listens for the input URL link information for the target component, so as to determine the set of routing jump control parameters corresponding to the URL link information.

[0068] The redirection module 303 is used to perform the corresponding route redirection operation for the target component based on the set of route redirection control parameters corresponding to the URL link information.

[0069] It is evident that implementation Figure 5The described multi-UI framework-based routing device can define the routing identifier information corresponding to the target component of the application and set its routing metadata set. The routing metadata set includes at least one of address metadata, parameter metadata, and framework metadata. It enables the target component to indicate the UI frameworks it can support, such as the SwiftUI framework and the UIKit framework, so that all business logic within the target component can perform routing jumps across all UI frameworks based on the framework metadata. When the routing system listens for the input URL link information for the target component, it matches the URL link information with the routing metadata set to determine the corresponding routing jump control parameter set. This facilitates precise control of the routing jump behavior and helps ensure the accuracy and reliability of the jump. Then, based on the determined routing jump control parameter set, the corresponding routing jump operation for the target component is executed. Compared with the traditional routing jump method that requires high coupling between modules, this solution can not only achieve decoupling between routing jump modules through the URL protocol, but also improve the flexibility and compatibility of the application in a multi-platform UI framework environment by supporting multi-UI framework routing jumps.

[0070] In an optional embodiment, address metadata is used to indicate the path field of the target component, and parameter metadata is used to indicate the parameter passing method of the target component. Furthermore, the matching module 302 matches the URL link information and the routing metadata set to determine the specific method by which it matches the routing control parameter set corresponding to the URL link information, including: Parse the URL link information to obtain several key pieces of information, including length information and key fields. Based on the routing metadata set, target information matching each routing metadata in the routing metadata set is determined from all key information. The target information matching the address metadata is the path field, the target information matching the parameter metadata is the length information, and the target information matching the frame metadata is the frame field. For each route metadata, determine the route hop control parameters corresponding to that route metadata based on the target information that matches the route metadata; By integrating all routing metadata and corresponding routing control parameters, a set of routing control parameters corresponding to the URL link information is obtained.

[0071] As can be seen, this optional embodiment can parse URL link information to obtain multiple key pieces of information from the URL link information. It can comprehensively and meticulously analyze the composition of the URL, providing a rich and accurate data foundation for subsequent accurate matching of routing metadata. Subsequently, based on the routing metadata set, the target information that matches each routing metadata in the routing metadata set is determined from all key information, specifying the target information corresponding to address metadata, parameter metadata, and frame metadata respectively. By clearly defining the correspondence between URL links and routing metadata, confusion and errors in the matching process can be avoided, enabling the routing system to accurately associate the information in the URL with the routing metadata. Through targeted matching methods, the routing system can quickly locate the target information related to the metadata without having to search and filter through a large amount of irrelevant information, which is beneficial to improving matching efficiency. Then, based on the target information that matches each routing metadata, the routing jump control parameters corresponding to that routing metadata are determined, thereby integrating to obtain a set of routing jump control parameters corresponding to the URL link information. By using different metadata to correspond to different types of target information to determine routing jump control parameters with different functions, a complete set of routing jump control parameters is obtained, which can provide a comprehensive and accurate control basis for the routing system to perform specific jump operations.

[0072] In this optional embodiment, as an optional implementation, the matching module 302 determines the specific method by which it determines the route hopping control parameters corresponding to each route metadata based on the target information that matches the route metadata, including: For each route metadata instance, when the route metadata is address metadata, the target path of the URL link information determined by the path field matching the address metadata is used to generate the route redirection control parameters corresponding to the address metadata; or, For each route metadata, when the route metadata is parameter metadata, the parameter passing method of the target component's parameter is determined based on the length information matching the parameter metadata, and used as the route jump control parameter corresponding to the parameter metadata; or, For each route metadata, when the route metadata is frame metadata, the target UI frame to be routed is determined based on the frame field that matches the frame metadata, and is used as the route jump control parameter corresponding to the frame metadata.

[0073] As can be seen, this optional implementation can generate routing control parameters by determining the target path of the URL link information based on the path field matching the address metadata. It can accurately locate the target page or resource, achieve accurate routing, avoid routing errors caused by unclear paths, and improve the accuracy and reliability of routing. Furthermore, it can determine the parameter transmission method of the target component based on the length information matching the parameter metadata. It can flexibly select an appropriate transmission method according to the specific situation of the parameter (such as length), ensuring that the parameter can be correctly and efficiently transmitted to the target component, ensuring the normal operation of the component function, and improving the stability and compatibility of the system. It can also determine the target UI framework to be routed based on the framework field matching the framework metadata, enabling the system to perform accurate routing according to different framework requirements. This enhances the adaptability and flexibility of the system in different UI framework environments and facilitates switching and integration between different frameworks.

[0074] In this optional implementation, the matching module 302 may determine the parameter transmission method of the target component's parameters based on the length information matching the parameter metadata. Specific methods for using the routing control parameters corresponding to the parameter metadata may include: Based on the length information matching the parameter metadata, memory analysis is performed on the parameters to be transmitted of the pre-determined target component to obtain the memory occupied by the parameters to be transmitted. Based on the memory usage, determine the parameter passing method for the parameters to be passed, which serves as the routing control parameter corresponding to the parameter metadata. The parameter passing method can be either inline or external.

[0075] As can be seen, this optional implementation can also perform memory analysis on the parameters to be transmitted to the target component based on the length information matching the parameter metadata. It can accurately obtain the actual memory size occupied by the parameters to be transmitted, and thus determine the most suitable parameter transmission method based on the memory size occupied by the parameters to be transmitted. This reduces problems such as data loss, corruption or system crashes caused by improper transmission methods. By scientifically determining the transmission method based on memory usage, these potential risks can be effectively avoided, and the stability and reliability of the system can be enhanced.

[0076] In this optional implementation, the matching module 302 further optionally determines the parameter transmission method of the parameter to be transmitted based on the memory occupied. The specific method for the routing jump control parameter corresponding to the parameter metadata includes: Based on the memory usage of the parameters to be transmitted, determine whether the memory usage is less than or equal to the preset memory usage. When it is determined that the memory usage is less than or equal to the preset memory usage, the parameter passing method is determined to be inline. When it is determined that the memory usage exceeds the preset memory usage, the parameter passing method is set to external.

[0077] As can be seen, this optional implementation can also use an inline method when the memory occupied by the parameter to be transmitted is less than or equal to the preset memory occupied. This can reduce additional memory access and pointer jump operations, allowing data to be read and processed more quickly. This helps to speed up the data transmission speed of the entire system and improve the overall operating efficiency. For parameters that occupy a large amount of memory, using an external method can avoid the memory bloat problem caused by directly embedding a large amount of data. Moreover, the external method can usually store the parameters in a specific memory area and access them through references or pointers, reducing unnecessary memory copying and storage space occupation, and reducing the system's memory overhead and operating burden.

[0078] In another alternative embodiment, the route hopping operation is performed in the following manner: The routing system distributes the corresponding routing processing engine to the target component based on the set of routing jump control parameters corresponding to the URL link information; The routing system, based on the routing processing engine, executes the navigation code corresponding to the set of routing jump control parameters to complete the routing jump operation with the target component.

[0079] As can be seen, this optional embodiment can distribute the corresponding routing processing engine to the target component according to the routing jump control parameter set through the routing system. The dynamic distribution mechanism enables different routing scenarios to adapt to the most suitable processing engine, which can flexibly cope with various complex routing requirements. Whether it is a simple page jump or a complex navigation process involving multiple steps and conditions, an appropriate processing method can be found. Subsequently, the routing system executes the navigation code corresponding to the routing jump control parameter set based on the distributed routing processing engine. It can execute navigation operations according to predetermined logic and rules, ensuring the accuracy of routing jumps and avoiding jump errors or unexpected situations. It can also be optimized for specific routing scenarios, reducing unnecessary computation and resource consumption. Furthermore, by centralizing the routing jump operation in the routing processing engine and navigation code, the routing system can more easily manage and monitor all routing jump behaviors in a unified manner.

[0080] In yet another optional embodiment, the configuration module 301 sets the specific method of the route metadata set of the target component by defining the route identifier information corresponding to the target component of the application, including: Define unique routing identification information for the target components of the application; By registering the route identifier information of the target component and the corresponding view building closure into the routing table, a mapping relationship is established between the route identifier information and the building logic corresponding to the view building closure, resulting in a set of route metadata for the target component. The set of route metadata is used to pass the route identifier information of the target component and the parameters to be passed to the target component when the routing system executes navigation code. The routing middleware layer of the routing system can then look up the corresponding view builder in the routing table based on the route identifier information. The view builder is used to construct the page to be navigated to for the target component.

[0081] As can be seen, this optional embodiment can define unique route identification information for target components, ensuring that each component in the routing system can be accurately identified and located, avoiding routing confusion caused by identification conflicts, and enabling the routing system to accurately direct requests to the correct target components, thus improving the accuracy and reliability of routing. Furthermore, registering the route identification information of the target component with the corresponding view construction closure in the routing table establishes a mapping relationship between the two, forming a set of routing metadata. This allows the routing system to dynamically call the corresponding view construction logic based on different route identification information, bringing high flexibility to the application. Moreover, when new target components need to be added or the view construction method of existing components needs to be modified, only the mapping relationship in the routing table needs to be updated, without requiring large-scale modifications to the core logic of the routing system, reducing the coupling of the system.

[0082] Example 4 Please see Figure 6 , Figure 6 This is a schematic diagram of another routing and navigation device based on a multi-UI framework disclosed in an embodiment of the present invention. Figure 6 As shown, the routing device based on a multi-UI framework may include: Memory 401 storing executable program code; Processor 402 coupled to memory 401; The processor 402 calls the executable program code stored in the memory 401 to execute the steps in the routing jump method based on the multi-UI framework described in Embodiment 1 or Embodiment 2 of the present invention.

[0083] Example 5 Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of a routing system based on a multi-UI framework disclosed in an embodiment of the present invention, as shown below. Figure 7As shown, the system includes at least a multi-UI framework-based routing jump device 30 as described in Embodiment 3 of the present invention, and a network-attached storage device 50 communicatively connected to the multi-UI framework-based routing jump device 30. The network-attached storage device 50 stores the target components of the application. When the multi-UI framework-based routing jump device 30 configures the routing metadata set of the target components, the multi-UI framework-based routing jump device 30 completes the routing jump operation for the target components based on the multi-UI framework-based routing jump method described in Embodiment 1 or Embodiment 2 of the present invention and based on the routing metadata set. or, Please see Figure 8 , Figure 8 This is a schematic diagram of another routing system based on a multi-UI framework disclosed in an embodiment of the present invention, as shown below. Figure 8 As shown, the system includes at least an electronic device 40 as described in Embodiment 4 of the present invention, and a network-attached storage device 50 that is communicatively connected to the electronic device 40. The network-attached storage device 50 stores the target component of the application. When the electronic device 40 configures the routing metadata set of the target component, the electronic device 40 completes the routing jump operation for the target component based on the routing metadata set according to the routing jump method based on the multi-UI framework as described in Embodiment 1 or Embodiment 2 of the present invention.

[0084] Example 6 This invention discloses a computer storage medium storing computer instructions. When these computer instructions are invoked, they are used to execute the steps in the routing method based on a multi-UI framework described in Embodiment 1 or Embodiment 2 of this invention.

[0085] Example 7 This invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform the steps in the multi-UI framework-based routing method described in Embodiment 1 or Embodiment 2.

[0086] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0087] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, 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 can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0088] Finally, it should be noted that the routing method, apparatus, device, and system based on a multi-UI framework disclosed in the embodiments of the present invention are merely preferred embodiments of the present invention and are only used to illustrate the technical solutions of the present invention, not to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A routing method based on multiple UI frameworks, characterized in that, The method is applied to an electronic device with an application installed, and the electronic device is communicatively connected to a network attached storage device (NETS), accessing the NETS through the application. The method is used to perform routing control on the electronic device or the application in the NETS; wherein the method includes: By defining the route identifier information corresponding to the target component of the application, the route metadata set of the target component is set. The route metadata set includes at least one of address metadata, parameter metadata and framework metadata. The framework metadata is used to indicate the UI framework that the target component can support. The UI framework includes the SwiftUI framework and the UIKit framework. The framework metadata is used to enable all business within the target component to perform route jumps in all UI frameworks based on the framework metadata. When the routing system detects an input URL link information for the target component, it matches the URL link information with the routing metadata set to determine the set of routing jump control parameters corresponding to the URL link information. Based on the set of routing control parameters corresponding to the URL link information, execute the routing operation corresponding to the target component.

2. The routing method based on a multi-UI framework according to claim 1, characterized in that, The address metadata is used to indicate the path field of the target component, and the parameter metadata is used to indicate the parameter passing method of the target component; And, the matching of the URL link information and the routing metadata set to determine the set of routing redirection control parameters corresponding to the URL link information includes: Parse the URL link information to obtain several key pieces of information about the URL link information, including length information and key fields; Based on the routing metadata set, target information matching each routing metadata in the routing metadata set is determined from all the key information. The target information matching the address metadata is the path field, the target information matching the parameter metadata is the length information, and the target information matching the frame metadata is the frame field. For each of the aforementioned routing metadata, the routing hop control parameters corresponding to that routing metadata are determined based on the target information that matches the routing metadata. By integrating all the routing metadata corresponding to the routing jump control parameters, a set of routing jump control parameters corresponding to the URL link information is obtained.

3. The routing method based on a multi-UI framework according to claim 2, characterized in that, For each of the routing metadata, determining the corresponding routing hop control parameters based on the target information matching the routing metadata includes: For each of the aforementioned routing metadata, when the routing metadata is the address metadata, the target path of the URL link information determined by the path field matching the address metadata is used to generate the routing jump control parameters corresponding to the address metadata; or, For each of the route metadata, when the route metadata is the parameter metadata, the parameter passing method of the target component's parameter to be passed is determined based on the length information matching the parameter metadata, and used as the route jump control parameter corresponding to the parameter metadata; or, For each of the route metadata, when the route metadata is the framework metadata, the target UI framework to be routed is determined based on the framework field that matches the framework metadata, and is used as the route jump control parameter corresponding to the framework metadata.

4. The routing method based on a multi-UI framework according to claim 3, characterized in that, The step of determining the parameter transmission method of the target component's parameters based on the length information matching the parameter metadata, and using it as the routing control parameter corresponding to the parameter metadata, includes: Based on the length information matching the parameter metadata, memory analysis is performed on the pre-determined parameters to be transmitted of the target component to obtain the memory occupied by the parameters to be transmitted. Based on the memory usage, the parameter transmission method of the parameter to be transmitted is determined and used as the routing control parameter corresponding to the parameter metadata. The parameter transmission method includes inline mode or external mode.

5. The routing method based on a multi-UI framework according to claim 4, characterized in that, The step of determining the parameter transmission method of the parameter to be transmitted based on the memory occupied, as the routing control parameter corresponding to the parameter metadata, includes: Based on the memory occupied by the parameter to be transmitted, determine whether the occupied memory is less than or equal to the preset memory. When it is determined that the memory occupied is less than or equal to the preset memory occupied, the parameter passing method of the parameter to be passed is determined to be the inline method; When it is determined that the memory occupied is greater than the preset memory occupied, the parameter transmission method of the parameter to be transmitted is determined to be the external method.

6. The routing method based on a multi-UI framework according to any one of claims 1-5, characterized in that, The routing jump operation is performed in the following manner: The routing system distributes the corresponding routing processing engine to the target component based on the set of routing jump control parameters corresponding to the URL link information; The routing system, based on the routing processing engine, executes the navigation code corresponding to the set of routing jump control parameters to complete the routing jump operation corresponding to the target component.

7. The routing method based on a multi-UI framework according to claim 6, characterized in that, The step of setting the route metadata set of the target component by defining the route identifier information corresponding to the target component of the application includes: Define unique routing identification information for the target components of the application; By registering the route identifier information of the target component and the corresponding view building closure into the routing table, a mapping relationship is established between the route identifier information and the building logic corresponding to the view building closure, thus obtaining the route metadata set of the target component. The route metadata set is used to pass the route identifier information of the target component and the parameters to be passed by the target component when the routing system executes the navigation code, so that the routing middleware of the routing system can look up the corresponding view builder in the routing table according to the route identifier information. The view builder is used to construct the page to be redirected corresponding to the target component.

8. A routing and navigation device based on a multi-UI framework, characterized in that, The device is applied to an electronic device with an application installed, and the electronic device is communicatively connected to a network-attached storage device (NAT), and accesses the NAT through the application. The device is used to perform routing control on the electronic device or the application in the NAT; wherein the device includes: The configuration module is used to set the routing metadata set of the target component by defining the routing identifier information corresponding to the target component of the application. The routing metadata set includes at least one of address metadata, parameter metadata and framework metadata. The framework metadata is used to indicate the UI framework that the target component can support. The UI framework includes the SwiftUI framework and the UIKit framework. The framework metadata is used to enable all business within the target component to perform routing jumps in all UI frameworks based on the framework metadata. The matching module is used to match the URL link information and the routing metadata set when the routing system listens for the input URL link information for the target component, so as to determine the set of routing jump control parameters corresponding to the URL link information. The redirection module is used to execute a route redirection operation corresponding to the target component based on the set of route redirection control parameters corresponding to the URL link information.

9. An electronic device, characterized in that, The electronic device includes: Memory containing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the routing method based on a multi-UI framework as described in any one of claims 1-7.

10. A routing system based on a multi-UI framework, characterized in that, The system includes at least the routing jump device based on the multi-UI framework as described in claim 8, and a network-attached storage device communicatively connected to the routing jump device based on the multi-UI framework, wherein the network-attached storage device stores the target component of the application. When the routing jump device based on the multi-UI framework configures the routing metadata set of the target component, the routing jump device based on the multi-UI framework completes the routing jump operation for the target component according to the routing jump method based on the multi-UI framework as described in any one of claims 1-7 and based on the routing metadata set. or, The system includes at least the electronic device as described in claim 9, and a network-attached storage device communicatively connected to the electronic device, wherein the network-attached storage device stores a target component of the application, and when the electronic device configures the routing metadata set of the target component, the electronic device performs a routing jump operation for the target component based on the routing metadata set according to the routing jump method based on the multi-UI framework as described in any one of claims 1-7.

11. A computer storage medium, characterized in that, The computer storage medium stores computer instructions, which, when invoked, are used to execute the routing method based on a multi-UI framework as described in any one of claims 1-7.