Multi-level father-child node management method on APP page

By using the APP function page as a routing node and using HOOK technology to realize the management of routing information, the problem of poor practicality and low flexibility of the parent-child node management method of existing APP pages is solved, and the automatic transmission and maintenance of routing information is realized, which improves the Management flexibility and reusability.

CN119474577APending Publication Date: 2025-02-18ULTIMATE IOT (HENAN) TECHNOLOGY LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310992737.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-08
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The parent-child node management method of existing APP pages has problems such as poor practicality and low flexibility, and it is difficult to accurately describe how users can quickly enter specific functional pages. The maintenance of parent-child nodes depends on specific developers, resulting in difficulty in reuse and maintenance.

Method used

By using each function page in the APP as a routing node, the routing nodes experienced by each function page are recorded, and the routing information is transmitted, changed and removed through the HOOK UIView method to ensure that the routing information can be effectively transmitted and maintained .

Benefits of technology

It realizes automatic transmission, change and removal of routing information, improves the flexibility and reusability of parent-child node management, reduces the consumption of human development resources, can accurately analyze users' operation routing paths, and improves the effectiveness of buried point data. .

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The invention relates to a multi-level father-child node management method on an APP page, and belongs to the technical field of APP software development. According to the method, each functional page in the APP is used as a routing node, the routing node which reaches each functional page in the APP operation is recorded, and the routing of each functional page is equal to the sum of the routing of the previous skipped functional page and the node of the previous skipped functional page, so that the routing information is transmitted to the next-level page; according to the method, on the basis of runtime runtime characteristics of OBJective-c of an iOS system, maintenance of each node route is realized through a method of holding UIView by HOOK; and meanwhile, by adding classification and attributes to the NSObject, the routing management of each node is realized. The method is based on the characteristics of the iOS development language, follows the language specification of OBJective-c, provides an interface for the system development language, and expands in a pollution-free and coupling-free manner.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a multi-level parent-child node management method on an APP page, and belongs to the technical field of APP software development. Background Art

[0002] The existing parent-child nodes can only record the current child node and its parent node. In the specific implementation, either all parent nodes from which the child node comes cannot be fully presented, or in order to reflect all paths of the child node, the developer defines different parent nodes for the specific child node.

[0003] For example, if a device control function is frequently used, the current single-node parent-child relationship is used to describe how users quickly enter this function page. Based on the above two parent-child node definition methods, either it cannot be described accurately, or a large amount of parent node information needs to be defined in order to pursue accuracy. In addition, the record of parent-child nodes depends on the developers of APP related functions, and the actual developers need to maintain their node information themselves.

[0004] Specifically, it is reflected in the actual operation of the APP: for example, the on / off function of the switch, the APP user can click the switch on the control page entered through the homepage search, or enter the switch control page through the switch device recommended on the homepage, or add the switch device to the homepage device tab management (and distinguish whether to enter the control page or click the switch shortcut button), or the user can control the switch through the room module (and distinguish whether to enter the control page or click the switch shortcut button), or the notification component center of the APP. These cannot be analyzed based on the above description of single node parent and child, and it is difficult even if the second solution is adopted.

[0005] It can be seen from this that the above two solutions are either impractical or the design flexibility of the parent-child nodes is low. The maintenance of the parent-child nodes depends on specific developers, which is not conducive to the reuse of parent-child nodes and maintenance through public tools, resulting in difficulties in the maintenance of parent-child nodes. In short, based on the actual usage of the APP function page, it is difficult to analyze the routing path of the user's APP operation through the above method, which may cause invalid tracking data and a large workload. Summary of the invention

[0006] The purpose of the present invention is to provide a multi-level parent-child node management method on an APP page to solve the problems of poor practicality and low flexibility of the current management method.

[0007] In order to solve the above technical problems, the present invention provides a multi-level parent-child node management method on an APP page, the method comprising the following steps:

[0008] Take each function page in the APP as a routing node, and record the routing nodes experienced in the APP operation to reach each function page. The route of each function page is equal to the route of the function page of the previous jump plus the function page node of the previous jump, so that the routing information is passed to the lower-level page. The function page of the previous jump of the current function page is the parent page of the current child page; the top-level page of the APP is the top-level routing node and has no routing.

[0009] The present invention regards each function page in the APP as a node, and regards the function page passed through by the jump as a node in the current route, so that the routing information can be transmitted to the lower-level page (sub-page). Through this process, the present invention can timely grasp the transmission process of routing information in the page through the above process, and can realize the maintenance of the routing information transmission process.

[0010] Furthermore, when the jump order of two function pages in the APP is exchanged, the routing is also changed accordingly, that is, the routing information of the corresponding nodes of the two function pages is exchanged.

[0011] Furthermore, when the function page that a certain function page in the APP jumps to previously changes, the routing information of the node corresponding to the function page is removed, and the routing information of the current function page is re-recorded.

[0012] The present invention can also provide maintenance for changing and removing routing information in response to changes in page jump sequence and jump page.

[0013] Furthermore, the transmission, change, and removal of routing information of each routing node are achieved by hooking the UIView.

[0014] The method of HOOKing UIView in the present invention realizes the transmission, change and removal of routing information, can be reused among different projects, and reduces unnecessary consumption of human development resources.

[0015] Furthermore, the methods of HOOKing UIView include addSubview, removeFromSuperview, didMoveToSuperview, and didMoveToWindow, where addSubview means adding a sub-page, removeFromSuperview means removing it from its parent page, didMoveToSuperview means adding a sub-page to the parent page, and didMoveToWindow means adding a sub-page to the top-level page.

[0016] The present invention implements operations such as adding and removing sub-pages by calling various functions, so as to quickly and conveniently maintain the routes of each page.

[0017] Furthermore, the method also includes adding categories and attributes to NSObject so that all classes that inherit NSObject have routing attributes, and can provide methods for generating subordinate routes, naming and modifying their own nodes based on their own routes and routing nodes, so as to realize the management of routing information of each routing node.

[0018] The present invention adds categories and attributes to NSObject, and can conveniently implement the management of node routing information. DETAILED DESCRIPTION

[0019] The present invention regards each function page in the APP as a routing node, records the routing nodes experienced in the APP operation to reach each function page, and the routing of each function page is equal to the routing of the function page of the previous jump plus the function page node of the previous jump, so that the routing information is passed to the lower-level page; wherein the main page of the APP is a top-level routing node and has no routing. The present invention can pass the routing information to the lower-level page when the page jumps and the function is added and presented, and the route to the function page and the node where this function is defined will be obtained on the final function point page. At the same time, by adding categories and attributes to NSObject, the routing management of each node is realized.

[0020] The following takes the development process of a smart home control APP as an example to illustrate.

[0021] The smart home control APP in this example is developed on the iOS system and is used to control various devices in the smart home, such as lamps, air conditioners, curtains, etc. It contains a main control page (main page, top-level page, parent node). A multi-level menu is set on the main control page. You can jump to the corresponding sub-page through the multi-level menu on the main control page. For example, the control page of the lamp can be entered by clicking the corresponding menu on the main control page.

[0022] The present invention uses the main control page in the APP as the top-level routing node, and other control pages (subpages) as ordinary routing nodes. The routing of each control page is equal to the routing of the control page of the previous jump plus the function page node of the previous jump, so that the routing information is passed to the lower-level page. Assuming that the APP page has four levels, its jump relationship is from A to B to C and then to D. If you want to enter page D, you need to go through pages A, B and C. At this time, the routing of page D is the routing of page C plus the node of page C. Similarly, the routing of page C is the routing of page B plus the node of page B; if you can also enter page D directly from page B, you need to remove the routing information of the previous page D at this time, and record the current routing information of directly entering page D from page B. In addition, there are two pages whose jump order has changed. It used to jump from B to C, but now it has become a jump from C to B. At this time, it is also necessary to adjust the reasons of page B and page C, that is, the routing of the current page B becomes the routing of the previous page C, and the routing of page C becomes the routing of the previous page B.

[0023] In order to realize the above functions, in the specific implementation, the present invention utilizes the runtime characteristics of iOS system OBJective-c to modify the corresponding relationship between SEL and IMP (function pointer), so as to achieve the principle of HOOKiOS development language OBJective-c method. First, the program execution flow is changed by HOOKing the methods of UIView (addSubview, removeFromSuperview, didMoveToSuperview, didMoveToWindow), and then method_exchangeImplementations is performed to achieve the purpose of MethodSwizzle after Hooking the system method, so as to realize the automatic transmission, change and removal of routing information, and achieve the purpose of automatic maintenance of routing information. Among them, addSubview means adding a subpage, removeFromSuperview means removing from its own parent page, didMoveToSuperview means adding a subpage to the parent page, and didMoveToWindow means adding a subpage to the top-level page.

[0024] The display controls of the iOS system APP interface are all inherited from UIView, so the specific HOOK methods in the base class UIView are as follows:

[0025] -(void)removeFromSuperview;

[0026] / / Remove its routing information

[0027] -(void)insertSubview:(UIView*)view atIndex:(NSInteger)index;

[0028] / / Get the route of UIView at layer index-1 and assign the route to view

[0029] -(void)exchangeSubviewAtIndex:(NSInteger)index1withSubviewAtIndex:(NSInteger)index2

[0030] / / Exchange the routing information of the page at index1 and the page at index2 of the current parent page -(void)addSubview:(UIView*)view;

[0031] / / Assign the current route to the view

[0032] -(void)insertSubview:(UIView*)view belowSubview:(UIView*)siblingSubview;

[0033] / / Insert a view in the upper layer of siblingSubview. The route of view is the route of siblingSubview. You need to assign the route of siblingSubview directly to view, which is the route of view. The view generates a new route according to the route generation rule and assigns it to siblingSubview, which is the current route of siblingSubview.

[0034] -(void)insertSubview:(UIView*)view aboveSubview:(UIView*)siblingSubview;

[0035] / / This method implements adding a view to siblingSubview, so the view's route is the route generated by siblingSubview, and the siblingSubview's route does not change

[0036] -(void)bringSubviewToFront:(UIView*)view;

[0037] / / The new route of the lower-level page of the view is concatenated with its nodes and assigned to the view as a route

[0038] -(void)sendSubviewToBack:(UIView*)view;

[0039] / / The view's parent page route is concatenated with its nodes and assigned to the view as a route

[0040] -(void)didAddSubview:(UIView*)subview;

[0041] / / Assign the route generated by the current page to subview

[0042] -(void)willRemoveSubview:(UIView*)subview;

[0043] / / Subview route removal

[0044] -(void)didMoveToSuperview;

[0045] / / Assign the route generated by Superview to the current view

[0046] -(void)willMoveToWindow:(nullable UIWindow*)newWindow;

[0047] / / Assign the route generated by newWindow to the current view

[0048] -(void)didMoveToWindow;

[0049] / / Assign the route generated by Window to the current view

[0050] Through the above HOOK method, the maintenance of routing information of each page can be achieved.

[0051] In order to manage the maintained routing information, the present invention adds classification methods and attributes to NSObject, so that all classes that inherit NSObject have routing and node attributes, and provide methods for generating subordinate routing, naming and modifying their own nodes according to their own routing and nodes. The specific methods are as follows:

[0052] @interface NSObject(UIOTDataTraceExtension) <uiotdatatracedelegate>

[0053] @property(nonatomic,copy)NSString*uiotDataTraceRoutList;

[0054] @property(nonatomic)NSString*(^currentObjectNameBlock)(void);

[0055] @property(nonatomic,copy)NSString*currentObjectName;

[0056] / / Page routing

[0057] -(NSString*)currentObjectParentObject;

[0058] / / Get the current parent node

[0059] -(NSArray*)currentObjectSubObject;

[0060] / / Get the current child node information

[0061] -(NSString*)uiotDataTraceNodeName;

[0062] / / Use the class assignment node that inherits this class

[0063] In this way, the methods and properties exposed to developers are standardized and unified.

[0064] The present invention can provide the smart home system with buried data that records the frequency of use of user operations on APP function points and accurately records the routing path of its buried data, which is used to analyze the usage behavior of all users to confirm the rationality of the design of the business points on the smart home APP. The design concept of the parent-child nodes of the APP function point routing in this example is based on the logical principle of confirming (why) who (who) operated what function (what) at what time (when) in what way (How) and where (where) on the APP. Finally, according to the buried data method of this recording, it can be counted that a certain operation path of a certain function point of the APP is used more frequently.

[0065] The present invention is based on the characteristics of iOS development language, follows the language specification of Objective-c, and provides an interface for system development language to expand in a pollution-free and non-coupled manner. The solution has a clear functional definition and can be reused in any type of APP that requires routing and point-of-care services. It provides specific, feasible, and easy-to-use and maintain solutions for the same type of problems. In terms of functional design, it achieves functional abstraction and has the purpose of modularization, so it is easy to reuse between different projects, reducing unnecessary consumption of human development resources.< / uiotdatatracedelegate>

Claims

1. A multi-level parent-child node management method on an APP page, characterized in that: The method comprises the following steps: Take each function page in the APP as a routing node, and record the routing nodes experienced in the APP operation to reach each function page. The route of each function page is equal to the route of the function page of the previous jump plus the function page node of the previous jump, so that the routing information is passed to the lower-level page. The function page of the previous jump of the current function page is the parent page of the current child page; the top-level page of the APP is the top-level routing node and has no routing.

2. The multi-level parent-child node management method on the APP page according to claim 1 is characterized in that: When the jump order of two function pages in the APP is exchanged, the routing is also changed accordingly, that is, the routing information of the corresponding nodes of the two function pages is exchanged.

3. The multi-level parent-child node management method on the APP page according to claim 2 is characterized in that: When the function page that a certain function page in the APP jumps to changes, the routing information of the node corresponding to the function page is removed, and the routing information of the current function page is re-recorded.

4. The multi-level parent-child node management method on the APP page according to claim 1 is characterized in that: The transmission, change and removal of routing information of each routing node is achieved by HOOKing UIView.

5. The multi-level parent-child node management method on the APP page according to claim 4 is characterized in that: The methods of HOOKing UIView include addSubview, removeFromSuperview, didMoveToSuperview, and didMoveToWindow, where addSubview means adding a sub-page, removeFromSuperview means removing it from its parent page, didMoveToSuperview means adding a sub-page to the parent page, and didMoveToWindow means adding a sub-page to the top-level page.

6. The multi-level parent-child node management method on an APP page according to any one of claims 1-5, characterized in that: The method also includes adding categories and attributes to NSObject so that all classes that inherit NSObject have routing attributes, and can provide methods for generating subordinate routes, naming and modifying their own nodes based on their own routes and routing nodes, so as to achieve management of routing information of each routing node.