A page control method and device
By receiving open view events in the APP and using caching technology to quickly jump to the target content page, the problems of excessive paths and network dependence in the existing technology are solved, and the user experience and user stickiness of the APP are improved.
Patent Information
- Application Number
- CN201910559913.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-26
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2039-06-26
AI Technical Summary
In the prior art, the path is too long when viewing products or other specific services, the user operates unfriendly, and strongly relies on the network. If the network is not good or there is no network, the user cannot view the information of the target content page.
By receiving the open first view event, the second view is displayed, and when receiving the open second view event, it jumps to the page view controller corresponding to the cached service data to display the corresponding target content page. The method includes sending network requests to obtain business data, parsing and registering data for cache, and using the fast interaction between the local cache and the top view of the application interface to quickly enter the target content page.
Improves the user experience when viewing specific content pages, simplifies the operation process, reduces user waiting time, and can still access cached target content pages without network conditions, and improves the user stickiness of the APP.
Smart Images

Figure CN112149028B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a page control method and device. Background Art
[0002] In order to meet the needs of different users, as the business grows, there will be more and more corresponding business pages in the APP (application), but the content displayed on each page is limited, which will naturally lead to the user's path to the target content page becoming longer and longer, and the interaction steps and waiting time required for users to view the information they want will increase. For example, to view the details of a certain product: search for a specific product on the main page, find the product you want to view from the search results, click the product icon, and enter the product details page to view the specific product information. Or after collecting the product, enter and view it from a specific collection page. In addition, to view the details of a certain product, you can also: view the first-level classification of the product on the default homepage, enter the first-level classification, view the second-level classification, view the required product in the second-level classification, if there is no, enter the third-level classification, view the required product in the third-level classification, if there is no, enter the fourth-level classification, and search for products in the next level in turn until you find the desired product.
[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:
[0004] Viewing the target content page of a product or other specific business is too deep and user-unfriendly. At the same time, the existing logic and technology are strongly dependent on the network. If the network is not good or there is no network, users will not be able to see the information of the target content page they want. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a page control method and device, which can solve the problem of long path and long time consumption when viewing goods or other specific services.
[0006] To achieve the above-mentioned purpose, according to one aspect of an embodiment of the present invention, a page control method is provided, including receiving an event of opening a first view and displaying a second view; wherein the first view is drawn on the topmost view of the application interface; and when an event of opening a second view is received, jumping to the page view controller corresponding to the cached business data to display the corresponding target content page according to the cached business data.
[0007] Optionally, before receiving the event of opening the first view, the method includes:
[0008] Send a network request to obtain the business data of the target content page;
[0009] Analyze the acquired business data;
[0010] Register the parsed business data so that the business data can be cached when the event listener receives the cache command.
[0011] Optionally, the parsed business data is registered so that when the event monitor receives a cache command, the cached business data includes:
[0012] The registration center records the page view controller of the current target content page and the current business data;
[0013] Register the system terminal cache event trigger interface and listen;
[0014] After the system terminal cache event is triggered, the registration information of the cache registration center is cached; wherein the registration information includes the mapping relationship between the page view controller and the business data.
[0015] Optionally, before receiving the event of opening the first view, the method further includes:
[0016] Read the registration information in the local cache and draw the second view;
[0017] According to a preset rule, the second view is drawn on the first view;
[0018] Get the top view of the application interface and draw the first view on the top view.
[0019] In addition, according to one aspect of an embodiment of the present invention, a page control device is provided, comprising a trigger module, configured to receive an event of opening a first view and display a second view; wherein the first view is drawn on the topmost view of the application program interface;
[0020] The display module is used to receive the event of opening the second view, and then jump to the page view controller corresponding to the cached business data to display the corresponding target content page according to the cached business data.
[0021] Optionally, it also includes:
[0022] The cache module is used to send a network request to obtain the business data of the target content page; parse the obtained business data; and register the parsed business data so that the business data can be cached when the event monitor receives a cache command.
[0023] Optionally, the cache module registers the parsed business data so that when the event monitor receives a cache command, the cached business data includes:
[0024] The registration center records the page view controller of the current target content page and the current business data;
[0025] Register the system terminal cache event trigger interface and listen;
[0026] After the system terminal cache event is triggered, the registration information of the cache registration center is cached; wherein the registration information includes the mapping relationship between the page view controller and the business data.
[0027] Optionally, it also includes:
[0028] The setting module is used to read the registration information cached locally and draw the second view; draw the second view on the first view according to the preset rules; obtain the top view of the application interface and draw the first view on the top view.
[0029] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, including:
[0030] one or more processors;
[0031] a storage device for storing one or more programs,
[0032] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the above page control embodiments.
[0033] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, any of the above methods based on the page control embodiment is implemented.
[0034] One embodiment of the above invention has the following advantages or beneficial effects: the present invention displays the second view by receiving an event of opening the first view; wherein the first view is drawn on the top view of the application interface; upon receiving an event of opening the second view, the page view controller corresponding to the cached business data is jumped to display the corresponding target content page according to the cached business data. Thus, the present invention can improve the user experience when viewing a specific content page, thereby improving the overall user stickiness of the APP (application).
[0035] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0037] Figure 1 is a schematic diagram of the main process of the page control method according to the first embodiment of the present invention
[0038] Figure 2 is a schematic diagram of the main process of a page control method according to another embodiment of the present invention;
[0039] Figure 3 is a schematic diagram of the main process of a method for registering parsed business data according to an embodiment of the present invention;
[0040] Figure 4 is a schematic diagram of the main process of a method for caching registration information to a local target location according to an embodiment of the present invention;
[0041] Figure 5 is a schematic diagram of the main process of a method for managing the timeliness of registration information according to an embodiment of the present invention;
[0042] Figure 6 is a schematic diagram of the main process of a method for managing the timeliness of registration information according to an embodiment of the present invention;
[0043] Figure 7 is a schematic diagram of main modules of a page control device according to an embodiment of the present invention;
[0044] Figure 8 is a schematic diagram of main modules of a page control device according to another embodiment of the present invention;
[0045] Fig. 9 is a schematic diagram of main modules of a page control device according to yet another embodiment of the present invention;
[0046] Fig.10 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0047] Fig.11 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0048] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0049] Figure 1 is a schematic diagram of the main process of a page control method according to a first embodiment of the present invention. The page control method may include:
[0050] Step S101, receiving an event of opening a first view and displaying a second view.
[0051] In an embodiment, the first view may be drawn on the top view Window of the application interface, such as a floating view. The top view Window refers to the top layer of the application APP interface, and below it are various content pages, that is, if the floating view MenuView is drawn on the window, all content pages are visible and interactive.
[0052] The second view can be an entry subview, which is attached to the floating view MenuView and can be displayed on the top view window together with the floating view MenuView. An entry subview MenuItemView corresponds to a locally cached page and represents the entry to this page. Preferably, an image or text with a meaning associated with the cached page is used to represent the interface of the entry subview.
[0053] Step S102, receiving an event of opening the second view, jumping to the page view controller corresponding to the cached business data to display the corresponding target content page according to the cached business data.
[0054] Preferably, before executing step S101 and step S102, it is necessary to construct the first view and the second view. The specific implementation process includes: reading the local cache to draw the second view. Drawing the second view on the first view according to a preset rule. Obtaining the top view of the application interface, and drawing the first view on the top view.
[0055] Furthermore, when constructing the first view and the second view, the read local cache can obtain the business data of the target content page by sending a network request to the server. Then, the obtained business data is parsed and the parsed business data is registered so that the business data can be cached when the event monitor receives a cache command.
[0056] It is worth noting that the specific process of registering the parsed business data may include: the registration center records the page view controller of the current target content page and the current business data. Then, the system terminal cache event triggering interface is registered and monitored, and after the system terminal cache event is triggered, the registration information of the cache registration center is cached.
[0057] The registration information includes a mapping relationship between a page view controller and business data. Each target content page corresponds to a page view controller, and entering the target content page may trigger the page view controller of the target content page.
[0058] According to the various embodiments described above, the present invention can combine the local cache with the quick interaction of the first view MenuView on the top Window of the application APP page to quickly enter the content target content page. Therefore, the present invention can greatly facilitate user operation and view the target content page information they want at any location (page), in any environment, and at any time in the application APP.
[0059] Figure 2 : is a schematic diagram of the main process of a page control method according to another embodiment of the present invention, which is applied to a client. The page control method may include:
[0060] Step S201, start the application program to trigger the program to open the target content page.
[0061] In an embodiment, each target content page corresponds to a page view controller ViewController, and the program that triggers opening the target content page may be the program that triggers the page view controller ViewController of the target content page.
[0062] Step S202: Send a network request to obtain the business data of the target content page.
[0063] In the embodiment, HTTP or HTTPS protocol is used to request downloading of service data on the server side. The server side uses SOA (Service-Oriented Architecture) services corresponding to each business according to specific different businesses, but the network interaction with the client side uniformly uses the json data format.
[0064] Step S203, parsing the acquired business data.
[0065] In the embodiment, the business data can be parsed using the json tool of the system, and the parsing uses the relevant protocols of the archive Achiver. Among them, the archive Achiver is a data caching method, which needs to implement the copying and encoding protocols, that is, the entire object can be cached to the local disk.
[0066] Step S204, register the parsed business data so that the business data can be cached in time when the event monitor receives a cache command. Figure 3 As shown in the figure, the specific implementation process includes:
[0067] Step S301: The registration center records the page view controller ViewController object of the current target content page and the current business data.
[0068] Preferably, only one piece of registration information is retained in the registration center, and when leaving the page view controller ViewController of the current target content page, the registration center clears the previous registration information. The registration information includes the mapping relationship between the page view controller ViewController object and the business data.
[0069] Step S302: registering the system terminal cache event triggering interface and monitoring it.
[0070] Preferably, the vibration interface of the system terminal (eg, mobile phone, etc.) can be registered to monitor the shake event.
[0071] Step S303: After the system terminal cache event is triggered, the registration information of the registration center is cached.
[0072] Preferably, after the shake event is triggered, the data information of the registration center is notified and cached.
[0073] Step S205: Cache the registration information to the local target location. Figure 4 As shown, the specific implementation process includes:
[0074] Step S401: Encapsulate the top-level base class ArchiverBaseModel of the registration information cache and comply with the Copying and Coding protocols.
[0075] Step 402: Encapsulate the registration information, inherit from the top-level base class ArchiverBaseModel, declare variables according to the interface protocol determined with the server, and implement the Copying and Coding protocols.
[0076] Among them, variables can be accessed locally.
[0077] Step S403: Encapsulate the registration information storage interface, respond to the data local storage command, and write the registration information to the local target location.
[0078] Preferably, the registration information storage interface is encapsulated, and in response to a local storage command for storing data, the registration information is written into a local fixed disk directory.
[0079] Step S404: encapsulate the registration information reading interface, respond to the read data local read command, and read the registration information from the local target location.
[0080] Preferably, the registration information reading interface is encapsulated, and in response to a local read command for reading data, the registration information is read from a local fixed disk directory.
[0081] Step S206, read the registration information cached locally, and draw the entry subview MenuItemView.
[0082] Among them, the entry subview MenuItemView is hidden by default.
[0083] In the embodiment, all the registration information cached locally is read, that is, multiple pieces of registration information may be cached locally, and the corresponding entry subview MenuItemView is drawn according to each piece of registration information.
[0084] Step S207: Draw the entry subview MenuItemView on the floating view MenuView according to preset rules.
[0085] The preset rules include horizontal, vertical or circular, etc.
[0086] In an embodiment, all entry sub-views MenuItemView may be drawn onto the floating view MenuView, that is, multiple entry sub-views MenuItemView may be drawn onto the floating view MenuView.
[0087] Step S208, obtaining the top view Window of the application APP interface, and drawing the floating view MenuView on the top view Window.
[0088] Among them, the top-level view Window refers to the top layer of the application APP interface, and below it are various content pages. That is, the floating view MenuView drawn on the window is visible and interactive on all content pages.
[0089] Step S209, receiving a click event of the floating view MenuView, and displaying the entry subview MenuItemView.
[0090] In an embodiment, if there are multiple entry sub-views MenuItemView, after receiving a click on the floating view MenuView event, all entry sub-views MenuItemView are displayed.
[0091] Preferably, when a MenuView event of clicking on the floating view is received, all the entry subviews MenuItemView are displayed, and if a MenuView event of clicking on the floating view is received again, all the entry subviews MenuItemView are hidden.
[0092] Step S210, receiving a click event of the entry subview MenuItemView, and then displaying the target content page according to the cached registration information.
[0093] In an embodiment, when a click event of an entry subview MenuItemView is received, the page view controller ViewController of the corresponding cached business data is jumped to, and the corresponding target content page can be displayed according to the cached business data.
[0094] As an embodiment of the present invention, the cached registration information can be managed locally. Furthermore, the registration information can be managed in terms of timeliness and quantity, wherein the timeliness management can set a retention time, and the registration information that exceeds the retention time will be automatically deleted. For example, the registration information that exceeds 2 months will be automatically deleted. Figure 5 The specific implementation process is as follows:
[0095] Step S501, obtaining the time when the local write is performed when the cache registration information is cached.
[0096] Step S502, compare the current system time with the written time to determine whether it is greater than the preset retention time, if so, execute step S503, otherwise exit the process.
[0097] Step S503: Delete the local registration information.
[0098] In addition, the quantity management can set a reserved capacity threshold, for example, the capacity threshold is 8 or 10M. Figure 6 The specific implementation process is as follows:
[0099] Step S601, obtaining the capacity of registration information cached locally.
[0100] Step S602, determining whether the capacity of the registration information cached locally is greater than a preset retention capacity threshold, if so, executing step S603, otherwise exiting the process.
[0101] Step S603, obtaining the time when the local write is performed when the registration information is cached, and deleting the registration information with the longest time from the current system.
[0102] It is worth noting that if the same object already exists in the local cache (for example, the same page view controller ViewController means it is the same object, but the business data may be different, mainly due to changes in the page content), then the previous cached business data will be overwritten first.
[0103] Figure 7 is a page control device according to an embodiment of the present invention, such as Figure 7As shown, the page control device 700 includes a trigger module 701 and a display module 702. The trigger module 701 receives an event of opening the first view and displays the second view. The display module 702 receives an event of opening the second view and jumps to the page view controller corresponding to the cached business data to display the corresponding target content page according to the cached business data.
[0104] In an embodiment, the first view may be drawn on the top view Window of the application interface, such as a floating view. The top view Window refers to the top layer of the application APP interface, and below it are various content pages, that is, if the floating view MenuView is drawn on the window, all content pages are visible and interactive.
[0105] As another page control device, such as Figure 8 As shown, the page control device 800 includes a trigger module 801, a display module 802 and a cache module 803. The trigger module 801 receives an event of opening the first view and displays the second view. The display module 802 receives an event of opening the second view and jumps to the page view controller corresponding to the cached business data to display the corresponding target content page according to the cached business data. The cache module 803 sends a network request to obtain the business data of the target content page; parses the obtained business data; and registers the parsed business data so that the business data can be cached when the event monitor receives a cache command.
[0106] Preferably, the cache module 803 registers the parsed business data so that the business data can be cached when the event monitor receives a cache command. The specific implementation process includes:
[0107] The registration center records the page view controller of the current target content page and the current business data. Register the system terminal cache event trigger interface and listen to it. After the system terminal cache event is triggered, cache the registration information of the registration center. Among them, the registration information includes the mapping relationship between the page view controller and the business data.
[0108] As another page control device, such as Fig. 9As shown, the page control device 900 includes a trigger module 901, a display module 902, a cache module 903 and a setting module 904. Among them, the trigger module 901 receives an event of opening the first view and displays the second view. When the display module 902 receives an event of opening the second view, it jumps to the page view controller corresponding to the cached business data to display the corresponding target content page according to the cached business data. The cache module 903 sends a network request to obtain the business data of the target content page; parses the obtained business data; registers the parsed business data so that the business data can be cached when the event listens to the cache command. The setting module 904 reads the registration information of the local cache and draws the second view. According to the preset rules, the second view is drawn on the first view. The top view of the application interface is obtained, and the first view is drawn on the top view.
[0109] It should be noted that the page control method and the page control device of the present invention have a corresponding relationship in terms of specific implementation contents, so the repeated contents will not be described again.
[0110] Fig.10 An exemplary system architecture 1000 is shown to which the page control method or the page control apparatus according to the embodiment of the present invention can be applied.
[0111] like Fig.10 As shown, the system architecture 1000 may include terminal devices 1001, 1002, 1003, a network 1004, and a server 1005. The network 1004 is used to provide a medium for communication links between the terminal devices 1001, 1002, 1003 and the server 1005. The network 1004 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0112] Users can use terminal devices 1001, 1002, 1003 to interact with server 705 through network 1004 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 1001, 1002, 1003, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0113] The terminal devices 1001 , 1002 , and 1003 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.
[0114] The server 1005 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 1001, 1002, and 1003. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.
[0115] It should be noted that the page control method provided in the embodiment of the present invention is generally executed by the server 1005 , and accordingly, the page control device is generally disposed in the server 1005 .
[0116] It should be understood that Fig.10 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0117] Reference below Fig.11 , which shows a schematic diagram of the structure of a computer system 1100 of a terminal device suitable for implementing an embodiment of the present invention. Fig.11 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0118] like Fig.11 As shown, the computer system 1100 includes a central processing unit (CPU) 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from the storage part 808 into a random access memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation of the system 1100 are also stored. The CPU 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0119] The following components are connected to the I / O interface 1105: an input section 1106 including a keyboard, a mouse, etc.; an output section 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN card, a modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the I / O interface 1105 as needed. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as needed, so that a computer program read therefrom is installed into the storage section 1108 as needed.
[0120] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1109, and / or installed from the removable medium 1111. When the computer program is executed by the central processing unit (CPU) 1101, the above-mentioned functions defined in the system of the present invention are executed.
[0121] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0122] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0123] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes a trigger module and a display module. The names of these modules do not, in some cases, constitute limitations on the modules themselves.
[0124] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: receiving an event of opening a first view and displaying a second view; wherein the first view is drawn on the top view of the application interface; receiving an event of opening a second view, jumping to the page view controller corresponding to the cached business data, so as to display the corresponding target content page according to the cached business data.
[0125] The technical solution according to the embodiment of the present invention can solve the problem of long path and long time consumption when viewing goods or other specific services.
[0126] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A page control method, characterized in that: include: Obtain the business data of the target content page, parse the obtained business data, and register the parsed business data so that the business data can be cached when the event monitor receives a cache command, including: the registration center records the page view controller and current business data of the target content page; registers the system terminal cache event trigger interface and monitors; after the system terminal cache event is triggered, caches the registration information of the registration center; wherein the registration information includes the mapping relationship between the page view controller and the business data; Cache the registration information to the local target location, including: encapsulate the registration information cache top-level base class, comply with the Copying and Coding protocols; encapsulate the registration information, inherit from the top-level base class, declare variables according to the interface protocol determined with the server, and implement the Copying and Coding protocols; encapsulate the registration information storage interface, respond to the local storage command to store data, and write the registration information to the local target location; Encapsulate the registration information reading interface, respond to the local read command of reading data, and read the registration information from the local target location; draw the second view based on the registration information; Receive an event of opening the first view and display the second view; wherein the first view is drawn on the top view of the application interface; the second view is an entry subview, and an entry subview corresponds to a locally cached page and represents the entry of this page; When receiving the event of opening the second view, the program jumps to the page view controller corresponding to the cached business data to display the corresponding target content page according to the cached business data.
2. The method according to claim 1, characterized in that: The obtaining of the business data of the target content page includes: Send a network request to obtain the business data of the target content page.
3. The method according to claim 1, characterized in that Before receiving the event of opening the first view, it also includes: Read the registration information in the local cache and draw the second view; According to a preset rule, the second view is drawn on the first view; Get the top view of the application interface and draw the first view on the top view.
4. A page control device, characterized in that: include: The cache module is used to obtain the business data of the target content page, parse the obtained business data, and register the parsed business data so that the business data can be cached when the event monitor receives the cache command, including: the registration center records the page view controller and current business data of the target content page; registers the system terminal cache event trigger interface and monitors; after the system terminal cache event is triggered, caches the registration information of the registration center; wherein the registration information includes the mapping relationship between the page view controller and the business data; Cache the registration information to the local target location, including: encapsulate the registration information cache top-level base class, comply with the Copying and Coding protocols; encapsulate the registration information, inherit from the top-level base class, declare variables according to the interface protocol determined with the server, and implement the Copying and Coding protocols; encapsulate the registration information storage interface, respond to the local storage command to store data, and write the registration information to the local target location; Encapsulate the registration information reading interface, respond to the local read command of reading data, and read the registration information from the local target location; draw the second view based on the registration information; A trigger module is used to receive an event of opening a first view and display a second view; wherein the first view is drawn on the top view of the application interface; the second view is an entry subview, and an entry subview corresponds to a locally cached page and represents the entry of this page; The display module is used to receive the event of opening the second view, and then jump to the page view controller corresponding to the cached business data to display the corresponding target content page according to the cached business data.
5. The device according to claim 4, characterized in that The cache module is used to send a network request to obtain the business data of the target content page.
6. The device according to claim 4, characterized in that Also includes: A setting module is used to read the registration information of the local cache and draw the second view; According to a preset rule, the second view is drawn on the first view; Get the top view of the application interface and draw the first view on the top view.
7. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 3.
8. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
H5 page loading method and device, electronic equipment and readable storage medium
CN109710870A
View processing method, electronic equipment and storage medium
CN109782977A