Method of registering route, related apparatus and computer program product

By reading the registered rules in the description information and automatic registered routing information, the problem of low registered registration efficiency in the existing technology is solved, and a simpler and efficient routing information registration process is achieved.

CN119383224APending Publication Date: 2025-01-28SHANGHAI BILIBILI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411564041.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The prior art is inefficient in the routing registration process. Operators need to specify routing information in advance and configure it independently to the system registration module, which makes configuration and registration difficult and inefficient.

Method used

By reading the registration rules in the description information, in response to the configuration information that receives the application, determine whether the configuration information is the routing information based on the registration rules, and automatically register the route information to the route information table.

Benefits of technology

The configuration and registration difficulty of routing information has been reduced, and registration of routing information is achieved simpler and efficiently.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383224A_ABST
    Figure CN119383224A_ABST
Patent Text Reader

Abstract

The invention provides a method for registering a route, a related device and a computer program product. The method comprises the following steps: reading a registration rule indicated in route description information; in response to the received configuration information of the application, determining whether the configuration information is routing information based on the registration rule; and in response to determining that the configuration information is routing information based on the registration rule, registering the routing information to a routing information table. Therefore, the configuration and registration difficulty of the routing information can be reduced, and the registration of the routing information can be completed more simply and efficiently.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and device for registering a route, an electronic device, a computer-readable medium, and a computer program product. Background Art

[0002] The Routing Framework can be used to manage and process user requests and determine how to respond to these requests. For example, these requests can be directed to appropriate handlers or controllers to actually "respond". Accordingly, in the process of executing page jumps and view display, it is necessary to define these "pages" and "views" for the actual execution system in advance, and register routing information so that the system can use the registered routing information to actually act.

[0003] Therefore, how to complete routing registration more efficiently and with higher quality is worthy of attention and an urgent need. Summary of the invention

[0004] Multiple aspects of the present application provide a method, apparatus, electronic device, computer-readable storage medium, and computer program product for registering routing, which can use the provided registration rules to "understand" and "identify" routing information that is allowed and needs to be registered. This makes it possible to determine whether the content of the configuration information is actually routing information based on the matching and identification results with the registration rules when the configuration information of the application is received. If the configuration information can meet the requirements of the registration rules and can be confirmed to be routing information, the registration can be automatically completed based on the routing information. As a result, the difficulty of configuring and registering routing information can be reduced, and the registration of routing information can be completed more simply and efficiently.

[0005] In one aspect of the present application, a method for registering a route is provided, comprising: reading a registration rule indicated in route description information; in response to receiving configuration information of an application, determining whether the configuration information is route information based on the registration rule; in response to determining that the configuration information is route information based on the registration rule, registering the route information to a route information table.

[0006] In another aspect of the present application, a device for registering a route is provided, comprising: a registration rule reading unit, configured to read the registration rule indicated in the route description information; a route information determination unit, configured to determine whether the configuration information is route information based on the registration rule in response to receiving the configuration information of the application; and a route information registration unit, configured to register the route information to the route information table in response to determining that the configuration information is route information based on the registration rule.

[0007] Another aspect of the present application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for registering routing provided above.

[0008] In another aspect of the present application, a computer-readable storage medium is provided, on which computer program instructions are stored. The computer program instructions can be executed by a processor to implement the registration routing method provided above.

[0009] In another aspect of the present application, a computer program product includes a computer program having computer program instructions stored thereon. When the computer program is executed by a processor, the method for registering a route as provided above can be implemented.

[0010] In the solution provided by the embodiment of the present application, the registration rules indicated in the routing description information are read; in response to receiving the configuration information of the application, whether the configuration information is routing information is determined based on the registration rules; in response to determining that the configuration information is routing information based on the registration rules, the routing information is registered in the routing information table. In this way, the difficulty of configuring and registering routing information can be reduced, and the registration of routing information can be completed more simply and efficiently. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0012] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0013] Figure 1 A schematic diagram of a process of registering a route provided in an embodiment of the present application;

[0014] Figure 2 A schematic diagram of a process for determining whether configuration information is routing information provided by an embodiment of the present application;

[0015] Figure 3 A schematic diagram of a jump execution process provided by another embodiment of the present application;

[0016] Figure 4 A schematic diagram of the structure of a device for registering a route provided in an embodiment of the present application;

[0017] Figure 5 The present invention is a schematic diagram of the structure of an electronic device suitable for implementing the solution in the embodiment of the present application.

[0018] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0020] In a typical configuration of the present application, the terminal and the equipment of the service network each include one or more processors (CPU), input / output interface, network interface and memory.

[0021] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0022] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer program instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0023] In actual scenarios, the execution subject of the method can be an object device, or a device formed by integrating an object device and a network device through a network, or an application running on the above device. The object device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.

[0024] As discussed above, how to complete routing registration more efficiently and with higher quality is worthy of attention and an urgent need.

[0025] In some solutions, the registration of routes can be implemented by an operator adding corresponding route information to a registration module of the system. For example, the operator can specify which information is route information and independently configure them to the corresponding registration module to implement registration.

[0026] However, in this way, not only does the operator need to fully specify this information in advance (for example, communicate and configure with the system in advance, and provide the system with comprehensive routing information), but also needs to add them to the corresponding registration module of the system through an independent programming process, which is very inefficient.

[0027] In this regard, an embodiment of the present application provides a method for registering a route, which reads a registration rule indicated in route description information; in response to receiving configuration information of an application, determines whether the configuration information is route information based on the registration rule; in response to determining that the configuration information is route information based on the registration rule, registers the route information to a route information table. Thus, the difficulty of configuring and registering route information can be reduced, and the registration of route information can be completed more simply and efficiently.

[0028] When the execution subject is software, it can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules, or as a single software or software module, and no specific limitation is made here.

[0029] The execution subject of the process of registering a route can be a device that actually provides resources that support the running of the application. For example, for some online applications and web pages, the execution subject can be a "server" that provides online browsing services for these applications and pages. For another example, in some cases where support can be provided to users based on local resources, the execution subject can also be the terminal device used by the user.

[0030] Figure 1A process 100 of registering a route provided by an embodiment of the present application is shown. The process 100 includes at least the following processing steps:

[0031] (Step) S101, reading the registration rule indicated in the routing description information.

[0032] In an embodiment of the present application, the execution subject may first read the routing description information to determine the registration rule included therein and indicated by the read routing description information.

[0033] The registration rules may specifically include the "target key fields" included in the routing information allowed to be registered, the combination of the "target key fields", and the front and back "connection relationships" between the "target key fields", etc.

[0034] For example, the registration rules may allow the registered routing information to include the scheme (protocol rules), host (domain name rules) and path (path rules). For example, the registration rules may allow the routing information under the "http" protocol to be registered, while the host may allow the routing information under the ".com" domain name to be registered.

[0035] In some embodiments, for the above three aspects, the registration rules corresponding to at least one of the three can be configured in combination with specific scenario requirements. Thus, after reading the registration rule, the execution subject can determine whether the subsequently transmitted information or code is routing information, or which specific parts of the information are related to the "registered route" based on the instructions of the registration rule.

[0036] S102: In response to receiving the configuration information of the application, determine whether the configuration information is routing information based on the registration rule.

[0037] In the embodiment of the present application, the application can interact with the execution subject by means of communication configuration information, in order to configure the operating environment, configure the operating components, register routing information, etc. Generally, if the configuration information is expected to "register routing", the specific form of the configuration information can be a "register routing declaration table".

[0038] For example, the registered route declaration table may be a document that clearly lists all routes in an application and their related information to indicate the "routes" required by the application and their corresponding functions.

[0039] Accordingly, when the execution subject receives the configuration information of the application, it can determine whether the configuration information is routing information based on the above registration rules.

[0040] Exemplarily, when the registration rules require the inclusion of the above three fields, the execution subject can determine whether the configuration information (e.g., the registration routing declaration table) includes the contents of the above three fields based on the above rules. If included, the execution subject can determine that the configuration information is routing information.

[0041] In some embodiments, the registration rules may be configured to limit which routing information is allowed to be registered. In other words, by using the registration rules, the execution entity may not regard the "routing information" that is not desired to be registered as the above-mentioned routing information.

[0042] In other words, for those information with routing information properties that do not want to be registered, the execution subject will not actually regard them as the above-mentioned routing information.

[0043] For example, in the registration rules, the specific content corresponding to each field can be indicated in a more granular manner. Accordingly, the execution subject can further determine whether the content included in the configuration information actually meets the requirements of the registration rules, and if so, determine that the configuration information is the above-mentioned routing information.

[0044] For example, if the registration rule requires the inclusion of the "AAA" scheme, if the configuration information records that the scheme is "AAA", the execution subject will actually determine that the configuration information can meet the requirements of the registration rule, and the configuration information is routing information.

[0045] In some embodiments, in order to facilitate configuration and improve configuration efficiency, the registration rules may only include those "key fields" related to basic functions and basic restrictions, and when these "key fields" are included in the configuration information, it is determined that the configuration information is routing information, and the routing information is able to meet the requirements for being allowed to be registered.

[0046] In other words, in addition to the registration rule information that needs to be included to be satisfied, the configuration information may also include more information for registering the route.

[0047] For example, the execution subject determines that the configuration information meets the requirements based on the scheme (protocol rules), host (domain name rules) and path (path rules). When the configuration information is routing information, the above three aspects and other contents included in the configuration information (or routing information) will be registered in the routing information table together when the routing is actually registered.

[0048] That is, in some embodiments, if the execution subject receives configuration information of the application, it may respond thereto by choosing to first determine a set of key fields based on the configuration information.

[0049] Then, the execution subject determines whether the configuration information satisfies the registration rule and whether the configuration information is routing information based on whether the set of key fields can completely include a set of target key fields required by the registration rule.

[0050] In other words, the execution entity may compare a set of "key fields" determined based on the configuration information with a set of "target key fields" required by the registration rules.

[0051] If a set of key fields can completely include a set of target key fields required by the registration rules, that is, the "key fields" in the configuration information can completely cover the "target key fields" required by the registration rules, then the execution subject can determine that the configuration information can meet the requirements of the registration rules, and the configuration information is routing information. Therefore, when registering a route, the configuration information is not limited to carrying only the information corresponding to the registration rules, and it can be allowed to carry more information to register routing information more efficiently and with quality.

[0052] It should be understood that, as discussed above, in some scenarios with more fine-grained settings for "fields", the "key fields" can include the actual content corresponding to the "key fields" in a more fine-grained manner. Therefore, based on these "actual contents", it can be determined later whether the key fields can completely include the finer-grained "actual content" of the target key fields to determine whether all target key fields can be comprehensively "completely included" and "completely hit".

[0053] S103: In response to determining that the configuration information is routing information based on the registration rule, register the routing information into a routing information table.

[0054] In an embodiment of the present application, if the execution subject determines that the configuration information is routing information based on the registration rule in the above S102, the execution subject may choose to register the routing information into the routing information table to automatically implement the registration.

[0055] Thus, the execution subject can use the "registration rules" to identify those routing information that meet the registration requirements and are allowed to be registered, and "automatically" complete the registration, thereby improving the registration efficiency. For example, in this way, it is not necessary to fully configure all the routing information of the application to the execution subject in advance, and the routing information can be written and provided to the execution subject through the general code editing process, without having to "independently" configure them to the corresponding registration module. For example, for configuration information that can be regarded as routing information, the execution subject can automatically register it by "understanding" and "recognizing" it.

[0056] In some embodiments, as discussed above, if the configuration information is allowed to include more information than required by the registration rules, the execution entity may, as an alternative or alternative, choose to determine that the configuration information is routing information in response to a set of key fields included in the configuration information being able to fully include a set of target key fields required by the registration rules, and register the applied routing information to the routing information table.

[0057] Then, the method for registering routing provided by the present application reads the registration rules indicated in the routing description information; in response to receiving the configuration information of the application, determines whether the configuration information is routing information based on the registration rules; in response to determining that the configuration information is routing information based on the registration rules, registers the routing information to the routing information table. Thus, the difficulty of configuring and registering routing information can be reduced, and the registration of routing information can be completed more simply and efficiently.

[0058] In some embodiments, for the execution subject in some system environments, it is also possible to choose to use the plug-in in the system environment to read the registration rules indicated in the routing description information, and determine whether the configuration information is routing information based on the registration rules. In this way, the routing information can be managed and the routing can be registered directly based on the plug-in in the future, so as to simplify the configuration difficulty of the system environment.

[0059] For example, for the HarmonyOS system, the execution entity can choose to use Hvigor in the HarmonyOS system to actually read the registration rules indicated in the routing description information, and in response to receiving the configuration information of the application, use Hvigor that stores the registration rules to determine whether the configuration information is routing information based on the registration rules.

[0060] Hvigor in the Hongmeng system is a build task orchestration tool implemented based on TypeScript. It mainly provides a task management mechanism, including key capabilities such as task registration orchestration, engineering model management, configuration management, and provides processes and configurable settings dedicated to building and testing applications.

[0061] Therefore, Hvigor's efficient virtualization technology can be used to improve the resource utilization and security of the execution entity used in the Hongmeng system, and Hvigor can be used to implement "full process management" of routing information registration actions.

[0062] Next, to determine whether the routing declaration information satisfies the registration rules, the execution entity may choose to complete the above process in a "static analysis" manner to improve the analysis and registration efficiency in, for example, a cold start scenario.

[0063] For this, please continue to refer to Figure 2 . Figure 2A process 200 for determining whether configuration information is routing information provided by an embodiment of the present application is shown. The process 200 at least includes the following processing steps:

[0064] S201, determining the routing rule segment code of the configuration information based on the regular matching result between the configuration information and the registration rule.

[0065] Specifically, the execution subject may choose to parse Arkts, for example, to "read" configuration information (eg, a registration routing declaration table), and perform regular matching between the read configuration information and the registration rules.

[0066] Regular matching is a method of searching and manipulating strings using regular expressions, which can be used to match specific character combinations in strings through a specific pattern description language.

[0067] Accordingly, the regular matching result obtained is actually the code included in the configuration information that meets the requirements of the registration rule, or in other words, the code of the part of the registration declaration table that corresponds to the registration rule in content. For the convenience of description, the code of the corresponding part is called "routing rule segment code".

[0068] It should be understood that the result of the regular matching may be an "empty set". For example, when the configuration information may not be "routing information", the regular matching of the two may not be able to regularly match the content from the configuration information.

[0069] S202, determining whether the routing rule segment code is a function call.

[0070] Specifically, after obtaining the routing rule segment code, the execution subject may further analyze it to ultimately determine whether it can be used and allowed to be registered in the routing information table.

[0071] The execution subject can parse the routing rule segment code through TSC (TypeScript Compiler), and determine whether the routing rule segment code is a "function call", or an action pointing to a function call, based on the grammatical structure of the routing rule segment code and whether it is a parameter passing action.

[0072] TSC is a compiler for TypeScript, which can be used to convert TypeScript code into JavaScript code and parse and check type and syntax errors in the code.

[0073] If the routing rule segment code is a function call, the execution subject may continue to execute S203.

[0074] S203: Determine whether the routing rules can be extracted from the routing rule segment code.

[0075] Specifically, for a routing rule segment code that can point to a function call, the execution subject can further determine whether the routing rule can be extracted therefrom. For example, the execution subject can determine whether the routing rule can be extracted from the routing rule segment code by identifying the routing definition (e.g., searching for keywords) and whether the path to implement the routing can be extracted, and whether the protocol and processing function for identifying the routing can be extracted.

[0076] If so, the execution subject continues to execute S204.

[0077] S204: Determine that the configuration information is routing information.

[0078] Specifically, if it is determined that the "routing rule segment code" is a function call and the routing rule can be extracted (for example, indicating the behavior and action of continuous jump), it can be determined that the "routing rule segment code" not only includes "routing information", but also that the "routing information" is available and can be registered. Accordingly, the execution subject can respond to this and determine that the configuration information is routing information.

[0079] Therefore, based on the indication of the registration rule, it is possible to automatically search from the configuration information whether there is routing information that meets the requirements and is allowed to be registered based on a static analysis method, thereby reducing the waiting time required for, for example, a cold start.

[0080] As discussed above, the above process can also be implemented by the execution subject through the "Hvigor" plug-in.

[0081] For example, in the case where the registration rules are stored in Hvigor, Hvigor can provide the configuration information and the registration rules to the bridge (BRouter) in a pipeline manner through a bridge (BRouter) as a plug-in, so as to communicate the two to the route map using the bridge.

[0082] Then, after the routing mapping generates the mapping results corresponding to the configuration information and the registration rules, a static analyzer is used to perform regular matching, determine the routing rule segment code of the configuration information, and determine whether the routing rule segment code is a function call and whether the routing rules can be extracted.

[0083] In some embodiments, because the subsequent execution body will actually use these routing rule segment codes that satisfy the routing rules, if Hvigor is used to actually register the route, you can choose to configure the static analyzer. When it is determined that the routing rule segment code is a function call and the routing rules can be extracted, the static analyzer can also choose to return the routing rule segment code to Hvigor in the reverse direction based on the above pipeline (for example, a bridge).

[0084] That is, if Hvigor receives the "routing rule segment code" provided in the reverse direction by the static analyzer based on the above pipeline, Hvigor can determine that the configuration information is routing information, and choose to register the "routing rule segment code" as the routing information.

[0085] It should be understood that, in some embodiments, as discussed above, the configuration information may include multiple aspects of content at the same time.

[0086] In such a case, the registration rules may only include those parts of the configuration information that are used to identify the "routing information" (or, in other words, to identify the "sub-configuration information" in the configuration information that can be used as routing information). Usually, such "sub-configuration information" can be a code part that includes the target key fields that meet the registration rules. For example, the routing rule segment code.

[0087] For example, the target key field may be the header and tail of a complete routing information. If, based on the header and tail, the complete code can be determined as "routing information" and is allowed to be registered, the execution subject may register the complete routing information.

[0088] In this way, the expansion and adjustment capabilities of routing information are enhanced. For example, the configuration information can directly "indicate that the corresponding part of the configuration information is routing information" through "key fields" that can be identified by registration rules, so that the execution subject can identify it and use it for registration.

[0089] Next, you can continue to refer to Figure 3 . Figure 3 A jump execution process 300 provided by an embodiment of the present application is shown. The process 300 includes at least the following processing steps:

[0090] S301 : In response to receiving an action instruction for an application, determining whether target routing information for implementing the action instruction can be determined from a routing information table.

[0091] Specifically, after completing the action of registering the application's routing information to the routing information table, if the execution entity subsequently receives an action instruction of the application (for example, an action instruction to jump to the target page, or to display the target view), the execution entity can determine, based on the action instruction, whether it can find the target routing information that has been registered and can implement the action instruction from the routing information table.

[0092] Taking the Hongmeng system as an example, for example, the action instruction pointing to the target page, its corresponding routing information can be the Hongmeng page routing (Entry component), and the routing information pointing to the target view can be the page routing of the dynamic Builder view wrapper (Builder Wrapper->Entry component).

[0093] If the routing information for implementing the action instruction can be determined, S302 is executed.

[0094] S302, executing the target routing information based on the lazy loading method to jump the application to the target page indicated by the action instruction or provide a target view of the application.

[0095] Specifically, if the execution subject can determine the target routing information, the execution subject can perform actions in sequence based on the target routing information (or the specific jump path indicated by it) to jump to the corresponding page or provide a corresponding target view.

[0096] During this process, in order to improve loading efficiency and reduce loading time, the execution entity can also choose to actually execute the target routing information through lazy loading to jump the application to the target page indicated by the action instruction, or provide the target view of the application.

[0097] "Lazy loading of routes" can be used to load route components on demand to reduce the initial loading time. In this way, the relevant components will only be loaded when a specific route is accessed, thereby improving the performance of the application.

[0098] In some embodiments, the "routing information" corresponding to the action instruction may also be "incomplete" or "invalid".

[0099] For example, the action instruction may actually only point to the final target page, target view, or not the complete path in the routing information table (for example, the action instruction may correspond to a partial jump path, or part of the content in the jump path has expired or been updated).

[0100] Therefore, in such a case, the execution subject can use the "final target" to find and query the hit target routing information from the routing information table, and actually respond to the action instruction by redirecting the routing, jumping to the target page or providing the target view.

[0101] In some embodiments, in order to ensure that jumping to a target page or providing a target view is safe, the execution subject may also choose to determine whether the target page or the target view provided by the application is allowed to be jumped or obtained by the user (e.g., the user who issued the action instruction) before actually jumping to the page or providing the view. For example, the execution subject may determine whether the user's access rights to the target page or the target view provided by the application meet the requirements, etc.

[0102] Based on any of the above embodiments, some configuration information that is actually routing information may not be "recognized" or "understood" by the execution subject because it cannot meet the requirements of the registration rules. In such a case, the execution subject can choose to provide the unsatisfied (partial) registration rules to the target device based on a preset communication path (i.e., a pre-configured communication path with the target device). The target device, in combination with different scenario requirements, can be a terminal device used by the maintenance personnel of the application, a terminal device used by the maintenance personnel of the execution subject, and so on.

[0103] Accordingly, after receiving the registration rules for the unsatisfied part, the corresponding maintenance personnel can adjust the content of the configuration information accordingly and adaptively, or authorize the execution subject to register authority, etc., to "personally adjust" or "personally register" the configuration information.

[0104] Therefore, it can not only provide a reference to assist maintenance personnel in making decisions and adjusting the registration strategy for routes, but also flexibly and differently meet some personalized route registration needs.

[0105] In some embodiments, in order to reduce the difficulty of “personalized adjustment” or “personalized registration” for maintenance personnel, the execution entity may also choose to generate annotation information for unsatisfied registration rules based on a pre-configured annotation knowledge base.

[0106] For example, for registration rules that are not met, the execution entity may generate corresponding annotation information based on the annotation knowledge base, so as to use the annotation information to provide content that can be directly or more easily understood by maintenance personnel (eg, content in natural language form).

[0107] Accordingly, the execution subject may similarly provide the annotation information in association with the registration rule of the unsatisfied part to the target device based on a preset communication path.

[0108] Therefore, maintenance personnel can more accurately understand the unmet registration rules based on the "annotation information" and complete adjustments more efficiently and with higher quality.

[0109] In some embodiments, the operating system or operating environment may also provide a "prompt capability" for unsatisfied parts of the registration rules. For example, when a part of the registration rules is not satisfied, feedback and prompts may be provided by prompting a corresponding error message.

[0110] In such a case, the annotation knowledge base can correspond to the operating system and operating environment, and maintain the corresponding meanings of these error messages (for example, the meaning expressed in natural language) accordingly, so as to determine the corresponding annotation information based on the error messages through, for example, "translation".

[0111] In this way, linkage with the operating system can be achieved. For example, for the Hongmeng system, the annotation knowledge base can include the meaning expressed in the natural language corresponding to the error message in the Hongmeng system. Accordingly, when an error is reported in the Hongmeng system, the execution subject can "translate" the error and generate corresponding annotation information to prompt the maintenance personnel and assist the maintenance personnel in understanding.

[0112] The present application also provides a device for registering a route, the structure of which is as follows: Figure 4 The device 400 shown. The device 400 includes: a registration rule reading unit 410, configured to read the registration rule indicated in the routing description information; a routing information determination unit 420, configured to determine whether the configuration information is routing information based on the registration rule in response to receiving the configuration information of the application; a routing information registration unit 430, configured to register the routing information to the routing information table in response to determining that the configuration information is routing information based on the registration rule.

[0113] In some embodiments, the registration rule reading unit 410 is further configured to use Hvigor to read the registration rules indicated in the routing description information and control Hvigor to store the registration rules in Hvigor; and the routing information determination unit 420 is further configured to, in response to receiving the configuration information of the application, use Hvigor storing the registration rules to determine whether the configuration information is routing information based on the registration rules.

[0114] In some embodiments, whether the configuration information is routing information is determined based on the registration rules in the following manner: based on the regular matching result between the configuration information and the registration rules, the routing rule segment code of the configuration information is determined; in response to the routing rule segment code being a function call and being able to extract the routing rules, the configuration information is determined to be routing information.

[0115] In some embodiments, the routing information registration unit 430 is further configured to, in response to determining that the configuration information is routing information based on the registration rule, register the routing rule segment code as routing information in the routing information table.

[0116] In some embodiments, the device 400 also includes: an action instruction execution unit, which is configured to respond to receiving an action instruction for an application, and can determine the target routing information for implementing the action instruction from the routing information table, and execute the target routing information based on a lazy loading method to jump the application to the target page indicated by the action instruction or provide a target view of the application.

[0117] In some embodiments, the apparatus 400 further includes: an unsatisfied registration rule communication unit configured to provide unsatisfied registration rules to the target device based on a preset communication path in response to failure to determine that the configuration information is routing information based on the registration rule.

[0118] In some embodiments, the device 400 also includes: an annotation information generation unit, configured to generate annotation information for unsatisfied registration rules based on a preconfigured annotation knowledge base; an annotation information communication unit, configured to provide the annotation information to the target device in association with the unsatisfied registration rules based on a preset communication path.

[0119] In some embodiments, the routing information determination unit 420 includes: a key field determination subunit, configured to determine a set of key fields from the configuration information in response to receiving the configuration information of the application; a routing information determination subunit, configured to determine whether the configuration information is routing information based on whether the set of key fields can completely include a set of target key fields required by the registration rules; and the routing information registration unit 430 is further configured to determine that the configuration information is routing information in response to a set of key fields being able to completely include a set of target key fields required by the registration rules, and register the routing information to the routing information table.

[0120] Based on the same inventive concept, an electronic device, a readable storage medium and a computer program product are also provided in an embodiment of the present application. The method corresponding to the electronic device may be the method for registering a route in the aforementioned embodiment, and its principle of solving the problem is similar to that of the method. The electronic device provided in an embodiment of the present application includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the methods and / or technical solutions of the aforementioned multiple embodiments of the present application.

[0121] The electronic device may be a user device, or a device formed by integrating a user device and a network device through a network, or an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets, which can be used to implement some processing functions when setting an alarm. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.

[0122] Figure 5 The structure of an electronic device suitable for implementing the method and / or technical solution in the embodiment of the present application is shown, and the electronic device 500 includes a central processing unit (CPU, Central Processing Unit) 501, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM, Read Only Memory) 502 or the program loaded from the storage part 508 to the random access memory (RAM, Random Access Memory) 503. In RAM 503, various programs and data required for system operation are also stored. CPU 501, ROM 502 and RAM 503 are connected to each other through bus 504. Input / output (I / O, Input / Output) interface 505 is also connected to bus 504.

[0123] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, a touch screen, a microphone, an infrared sensor, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), an LED display, an OLED display, etc., and a speaker, etc.; a storage section 508 including one or more computer-readable media such as a hard disk, an optical disk, a magnetic disk, a semiconductor memory, etc.; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet.

[0124] In particular, the methods and / or embodiments in the embodiments of the present application may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. When the computer program is executed by the central processing unit (CPU) 501, the above functions defined in the method of the present application are executed.

[0125] Another embodiment of the present application further provides a computer-readable storage medium and a computer program product, on which computer program instructions are stored. The computer program instructions can be executed by a processor to implement the methods and / or technical solutions of any one or more embodiments of the present application.

[0126] Specifically, the present embodiment can adopt any combination of one or more computer-readable media. Computer-readable media can be computer-readable signal media or computer-readable storage media. Computer-readable storage media can be, for example, systems, devices or devices including but not limited to electricity, magnetism, light, electromagnetic, infrared, or semiconductors, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, computer-readable storage media can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0127] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than a computer readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0128] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0129] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

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

[0131] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0132] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules and units is only a logical function division. There may be other division methods in actual implementation. For example, with units as an example, multiple units or page components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0133] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0134] In addition, each functional module or unit in each embodiment of the present application may be integrated into one processing module or unit, or each module or unit may exist physically separately, or two or more units may be integrated into one module or unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules or units.

[0135] The above-mentioned integrated modules and units implemented in the form of software function modules and units can be stored in a computer-readable storage medium. The above-mentioned software function modules and units are stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform some steps of the methods of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.

[0136] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

[0137] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in a device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

Claims

1. A method for registering a route, characterized in that: include: Read the registration rules indicated in the routing description information; In response to receiving configuration information of the application, determining whether the configuration information is routing information based on the registration rule; In response to determining that the configuration information is the routing information based on the registration rule, the routing information is registered in a routing information table.

2. The method according to claim 1, characterized in that: The reading of the registration rules indicated in the routing description information includes: Using Hvigor to read the registration rule indicated in the routing description information, and controlling the Hvigor to store the registration rule in the Hvigor; and The step of determining, in response to receiving the configuration information of the application, whether the configuration information is routing information based on the registration rule comprises: In response to receiving the configuration information of the application, it is determined whether the configuration information is routing information based on the registration rule using the Hvigor storing the registration rule.

3. The method according to claim 1, characterized in that Determining whether the configuration information is routing information based on the registration rule in the following manner: Determine the routing rule segment code of the configuration information based on the regular matching result between the configuration information and the registration rule; In response to the routing rule segment code being a function call and being able to extract routing rules, it is determined that the configuration information is routing information.

4. The method according to claim 3, characterized in that In response to determining that the configuration information is the routing information based on the registration rule, registering the routing information in the routing information table includes: In response to determining that the configuration information is the routing information based on the registration rule, the routing rule segment code is registered in the routing information table as the routing information.

5. The method according to claim 1, characterized in that Also includes: In response to receiving an action instruction for the application, and being able to determine the target routing information for implementing the action instruction from the routing information table, the target routing information is executed based on lazy loading to jump the application to the target page indicated by the action instruction or provide a target view of the application.

6. The method according to claim 1, characterized in that Also includes: In response to the configuration information not being determined to be the routing information based on the registration rule, the unsatisfied registration rule is provided to the target device based on a preset communication path.

7. The method according to claim 6, characterized in that Also includes: Based on a pre-configured annotation knowledge base, generating annotation information for the unsatisfied registration rule; Based on the preset communication path, the annotation information is provided to the target device in association with the unsatisfied registration rule.

8. The method according to any one of claims 1 to 7, characterized in that The step of determining, in response to receiving the configuration information of the application, whether the configuration information is routing information based on the registration rule comprises: In response to receiving configuration information of the application, determining a set of key fields from the configuration information; determining whether the configuration information is routing information based on whether the set of key fields can completely include a set of target key fields required by the registration rule; and In response to determining that the configuration information is the routing information based on the registration rule, registering the routing information in the routing information table includes: In response to the group of key fields being able to completely include a group of target key fields required by the registration rule, determining that the configuration information is the routing information, and registering the routing information in a routing information table.

9. A device for registering a route, characterized in that: include: A registration rule reading unit, configured to read the registration rule indicated in the routing description information; a routing information determination unit, configured to, in response to receiving configuration information of an application, determine whether the configuration information is routing information based on the registration rule; The routing information registering unit is configured to register the routing information into a routing information table in response to determining that the configuration information is the routing information based on the registration rule.

10. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.

11. A computer readable medium, characterized in that Computer program instructions are stored thereon, and the computer program instructions can be executed by a processor to implement the method according to any one of claims 1 to 8.

12. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 8.