A method for obtaining a page, a terminal device and a storage medium
By obtaining and storing the page source code when the application starts, and calling back to perform preset operations when called, the problem that compatibility development tools cannot directly pass and obtain View type data is solved, and the application management system and compatibility development tools are realized The page type data interaction and source code operation between them improve system efficiency.
Patent Information
- Application Number
- CN202010394645.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-11
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2040-05-11
AI Technical Summary
In the prior art, compatibility development tools cannot directly transmit and obtain View type data, which limits the interaction of page type data between the application management system and the compatibility development tools.
When the application starts, the source code of the page is obtained and stored in the target storage area. When the source code is called, the preset operation is performed to realize the direct transmission and acquisition of the page source code.
It realizes page-type data interaction between the application management system and the compatibility development tool, supports the direct transmission and acquisition of View-type data, improves the system operation efficiency and maintains the encapsulation of the compatibility development tool.
Smart Images

Figure CN111859212B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software development technology, and in particular to a method for acquiring a page, a terminal device, and a storage medium. Background Art
[0002] The introduction of the compatibility development tool framework has changed the division between iOS and Android platforms. This web front-end language JavaScript is used to develop iOS and Android applications, which unifies the logic of mobile platforms from a technical perspective, thereby improving development efficiency and reducing labor costs. However, although the compatibility development tool framework implements partial bridging between JavaScript and native iOS / Android, and even comprehensive calls to variables, functions, objects, and UI, it also has limitations. For example, JavaScript calls natively can only pass JSON types, and do not support direct transmission and acquisition of View type data. However, many scenarios in the existing technology require the acquisition or transmission of View, so a technical solution that can solve the above problems is needed. Summary of the invention
[0003] The main technical problem solved by the present application is to provide a method for obtaining pages, a mobile terminal and a storage medium, which can realize data interaction of page types between an application management system and a compatibility development tool.
[0004] In order to solve the above technical problems, a technical solution adopted by the present application is: to provide a method for obtaining a page, the method comprising:
[0005] When the application is started, the source code corresponding to the page in the application is obtained;
[0006] The source code is stored in a target storage area, and when the source code is called, the source code stored in the target storage area is called back, thereby performing a preset operation on the source code corresponding to the page.
[0007] In order to solve the above technical problems, another technical solution adopted by the present application is to provide a mobile terminal, the terminal comprising a coupled memory and a processor, wherein:
[0008] The memory includes local storage and stores a computer program;
[0009] The processor is configured to run the computer program to perform any of the methods described above.
[0010] In order to solve the above technical problems, another technical solution adopted by the present application is to provide a storage medium, wherein the storage medium stores a computer program that can be executed by a processor, and the computer program is used to implement any of the methods described above.
[0011] Compared with the prior art, the method for obtaining a page provided in the present application intercepts the source code corresponding to the page in the application when the application is started, stores the obtained source code in the target storage area, and calls back the source code stored in the target storage area when the source code is called, and then performs preset operations on the source code corresponding to the page, so that when the source code corresponding to the page is called, it can support the direct transmission and acquisition of page type data (View type data), so that the interaction of page type data is realized between the application management system and the compatibility development tool, and at the same time, the preset operations on the source code corresponding to the page are realized. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 This is a flow chart of a method for obtaining a page in an embodiment of the present application;
[0013] Figure 2 A schematic diagram of a flow chart of another embodiment of a method for obtaining a page in the present application;
[0014] Figure 3 This is a flow chart of a method for obtaining a page in an embodiment of the present application;
[0015] Figure 4 A schematic diagram of a flow chart of another embodiment of a method for obtaining a page in the present application;
[0016] Figure 5 This is a schematic diagram of the structure of a terminal device in an embodiment of the present application;
[0017] Figure 6 It is a structural schematic diagram of an embodiment of a storage medium of the present application. DETAILED DESCRIPTION
[0018] The technical solutions 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. It is to be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0019] In the description of the present application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically limited. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0020] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0021] Before describing the technical solution provided by this application, some of the terms mentioned in this application are first explained:
[0022] ReactNative is a cross-platform mobile development framework provided by FaceBook. Apps can be developed using JavaScript and it is applicable to both iOS and Android systems (in some embodiments, ReactNative may also be referred to as RN and JavaScript as JS).
[0023] In the existing mobile terminal field, the application management system mainly has two camps, iOS system and Android system, but the development languages and frameworks of iOS system and Android system are different. Among them, iOS system uses Objective-C or Swift, and Android system uses Java or Kotlin. Since the development languages and frameworks of iOS system and Android system are different, the application programs cannot be universal. Therefore, when developing application programs, two sets of language codes need to be written for iOS system and Android system respectively. The introduction of compatibility development tools has changed the situation of segmentation between iOS system and Android system, and it can be realized that programs suitable for both iOS system and Android system can be developed by using compatibility development tools. Among them, compatibility development tools include at least: ReactNative. Taking ReactNative as an example, this kind of Web front-end language of JavaScript is used to develop iOS system and Android system applications, which can unify the logic of the two system platforms from a technical level, thereby improving the development efficiency of the R&D team and can better reduce labor costs.
[0024] However, the data interaction between the compatibility development tools in the prior art and the iOS system or the Android system still has limitations. Specifically, in the prior art, there are limitations on the data transmission type between the compatibility development tools and the application management system, and it is impossible to directly transfer and obtain View data between the compatibility development tools and the application management system. The technical solution provided by this application can solve the above technical problems.
[0025] See also Figure 1 , Figure 1 This is a flow chart of a method for obtaining a page in the present application. In the current embodiment, the execution subject of the method provided by the present application is a terminal device equipped with an application management system and a compatibility development tool. In the current embodiment, the method for obtaining a page provided by the present application is first explained from the perspective of the application management system. The method provided by the present application includes:
[0026] S110: When the application is started, the source code corresponding to the page in the application is obtained.
[0027] When a user starts an application as needed, or when other applications trigger the start of an application, the application management system obtains the source code corresponding to the page in the application when the application is started, so as to store the source code corresponding to the page in the target storage area in the following steps. In other embodiments, it can also be understood that the page in the application is intercepted when the application is started to obtain control over the source code of the page in the application. Among them, the application management system includes iOS system and Android system, but the application management system is not limited to only the above two systems. An application includes at least one page. In other embodiments, an application can include multiple pages, but the number of pages included in the application is not specifically limited.
[0028] In a terminal device loaded with an application management system, when an application in the terminal device is started, the application management system can directly learn that the application is started, and then intercept a page in the application when the application is started.
[0029] In one embodiment, taking UC browser as an example, when the user clicks to start UC browser on the terminal device, the application management system can directly know that UC browser is started or know that UC browser is started by parsing the notification message from the system or program. It should be noted that when the application is started, the page in the application is not started, and correspondingly, the source code corresponding to the page is not actually called. Therefore, when the UC browser in the above example is started, the page in the UC browser is not started. The application management system will obtain the source code corresponding to the page included in the UC browser, and then the following step S120 can be executed.
[0030] Furthermore, when the application management system starts an application, the method provided by the present application may also include: determining whether the current application belongs to an application in a preset list; if the current application belongs to the preset list, obtaining or abandoning the source code corresponding to the page in the application according to the setting of the preset list. The preset list at least includes a list of programs that require asking the user to access and applications that are inaccessible to the compatibility development tool. The user can set the applications included in the preset list according to his own needs.
[0031] When the setting list is a program in the list of programs that need to be asked to access the program, in the method provided by the present application, the step of obtaining the source code corresponding to the page in the application according to the setting of the preset list further includes: asking the user whether to allow the application management system to obtain the source code corresponding to the page of the application. Alternatively, in another embodiment, the step of obtaining the page in the application according to the setting of the preset list may also include: asking the user whether to allow the compatibility development tool to process the source code corresponding to the page in the application or perform a preset operation, and when the user allows the compatibility development tool to process the source code corresponding to the page in the application or perform a preset operation, the source code corresponding to the page in the application can be continued. In the current embodiment, by determining whether the current application belongs to the application in the preset list when obtaining the source code corresponding to the page in the application, and when it is determined that the current application belongs to the program in the list of programs that need to be asked to the user and can be accessed only when the user allows it, asking the user whether to allow the application management system to obtain the application page or the source code corresponding to the application page, the security of user data can be better protected and the user experience is also improved.
[0032] S120: Storing the source code in the target storage area, and calling back the source code stored in the target storage area when the source code is called, and then performing a preset operation on the source code corresponding to the page.
[0033] After the application management system obtains the source code corresponding to the page in the application, it will further store the source code corresponding to the page in the target storage area, so that when the source code is called later, or when the page is started, the source code stored in the target storage area is called back by the compatibility development tool to perform preset operations on the source code corresponding to the page. Among them, the target storage area is a storage area pre-set or allocated for storing the acquired source code, and the target storage area may include a global storage area allocated by the application management system to the application when the application is started. The preset operation refers to the processing performed after the compatibility development tool calls back the page, which specifically includes at least monitoring the security and stability of the page, monitoring the stability of the page parameters, monitoring the stability of the page source code operation, the rate of the page source code response, etc., but is not limited to this.
[0034] The method for obtaining pages provided in the present application is that the application management system obtains the source code corresponding to the page in the application when the application is started, and stores the obtained source code corresponding to the page in the target storage area after obtaining the source code corresponding to the page. That is, the technical solution provided in the present application obtains the source code corresponding to the page in the application and stores it in the target storage area accessible to the compatibility development tool, so that when the page source code is called, the compatibility development tool can directly access the target storage area to call back the source code corresponding to the page, thereby realizing the interaction of page type data between the application management system and the compatibility development tool. Compared with the prior art, it realizes the direct transmission and acquisition of page type (i.e., View type) data between the application management system and the compatibility development tool.
[0035] Furthermore, in the above step S110, obtaining the source code corresponding to the page in the application includes: using an interception technology that matches the current application management system to intercept the source code corresponding to the page in the application. As described above, when the application management system includes an iOS system or an Android system, then step S110 will include: using an interception technology that matches the iOS system or the Android system to obtain the source code corresponding to the page in the application.
[0036] In one embodiment, when the current application includes multiple pages, the above steps use the interception technology that matches the current application management system to obtain the source code corresponding to the pages in the application, including: using the interception technology that matches the current application management system to obtain the source code corresponding to each of the multiple pages in the application.
[0037] Furthermore, when the application management system is an iOS system, intercepting the page in the application in the above step S110 includes: using the Hook technology to obtain the source code corresponding to the page in the application. Taking the application as UC browser as an example, when the UC browser includes a browser homepage and different window pages collected by the user, the source code corresponding to the browser homepage included in the UC browser and the source code corresponding to the different window pages collected by the user will be obtained by using the Hook technology when the UC browser is started, so that when the corresponding page source code in the UC browser is called (in other embodiments, it can also be understood as when the page is started), the source code stored in the target storage area is called back to perform a preset operation on the source code corresponding to the page.
[0038] In one embodiment, when the current application includes multiple pages, the above-mentioned use of the Hook technology to obtain the source code corresponding to the page in the application further includes: using the Hook technology to obtain the source code corresponding to multiple pages. Correspondingly, the above-mentioned step of storing the source code in the target storage area, and calling back the source code stored in the target storage area when the source code is called, and then performing a preset operation on the source code corresponding to the page further includes: storing the source codes corresponding to the multiple pages in the target storage area corresponding to the application, and when the source code of at least one page is called, calling back the source code corresponding to the target page stored in the target storage area through the compatibility development tool, so as to perform a preset operation on the source code corresponding to the target page.
[0039] Furthermore, in one embodiment, the above step of storing the source code in the target storage area further includes: storing the source code in a global storage area corresponding to the application, wherein the global storage area at least includes a storage area allocated to the application by the application management system when the application is started.
[0040] In another embodiment, when the application includes multiple pages, the above step of storing the source code in the target storage area further includes: storing each group of source code corresponding to the multiple pages in the same global storage area corresponding to the current application.
[0041] Furthermore, when the number of pages included in the application is large and the pages are classified in the application, the above step of storing the source code in the target storage area further includes: according to the classification of multiple pages in the application, the intercepted source code is stored in the same global storage area corresponding to the current application based on the page classification.
[0042] For example, in the original architecture design of an application, the pages included are classified, and the classification includes at least Class A, Class B and Class C. Then, after the application management system intercepts the source code corresponding to the pages of Class A, Class B and Class C, it will store the source code corresponding to the intercepted pages in the same global storage area corresponding to the current application according to the original page classification, that is, the source code is divided into Class A, Class B and Class C in the global storage area.
[0043] Furthermore, when the application includes multiple pages, the step in the method provided by the present application: the application management system obtains the source code corresponding to the page in the application when the application is started, further includes: the application management system obtains the source code corresponding to the set page in the application when the application is started. Correspondingly, the step stores the source code corresponding to the page in the target storage area, and calls back the source code stored in the target storage area when the source code is called, and then performs a preset operation on the source code corresponding to the page, further including: storing the acquired source code corresponding to the set page in the target storage area, so that when the source code corresponding to the page is called, the source code of the page stored in the target storage area is called back by the compatibility development tool. For example, in the above embodiment: when the UC browser includes the browser homepage and different window pages collected by the user, when the compatibility development tool is pre-set to only call the homepage of the UC browser, the source code corresponding to the browser homepage included in the UC browser will be obtained according to the setting when the UC browser is started, so that when the homepage in the UC browser is started by the compatibility development tool, the source code corresponding to the homepage stored in the target storage area is called back, and then the preset operation is performed on the source code corresponding to the homepage.
[0044] Furthermore, in one embodiment, when the application management system obtains the source code corresponding to the page in the application when the application is started, and before or while storing the source code corresponding to the page in the target storage area, the application management system will further initialize the page to configure initialization parameters for the page.
[0045] In this embodiment, the present application obtains the source code corresponding to the page in the application when the application is started, and stores the obtained source code corresponding to the page in the target storage area after obtaining the source code corresponding to the page. It is not necessary to download the source code corresponding to the page each time the page is started. It is only necessary to obtain the source code corresponding to the page once when the application is started and store it in the target storage area, thereby saving memory resources. Furthermore, in the prior art, since the source code corresponding to the page is originally encapsulated in the compatibility development tool, the encapsulation will be destroyed due to the need to implant system notifications. The present solution uses Hook interception technology without destroying the encapsulation and without knowing the source code, and directly obtains the source code corresponding to the page, which is separated from the compatibility development tool framework and not coupled. This achieves the goal of retaining the encapsulation of the compatibility development tool and realizing system notifications in place, and occupies fewer resources, thereby improving the system operation efficiency.
[0046] See also Figure 2 , Figure 2This is a flow chart of another embodiment of a method for obtaining a page in this application. In the current embodiment, it is described that when the application management system is an iOS system and the compatibility development tool is ReactNative, the steps included in the method provided by this application are described.
[0047] S201: When the application is started, the iOS system uses the Hook technology to obtain the source code corresponding to the page in the application.
[0048] When the iOS system detects that one or more applications are started, the iOS system uses the Hook technology to obtain the source code corresponding to the page included in the one or more applications.
[0049] S202: The iOS system initializes the page of the application and stores the acquired source code in the global storage area corresponding to the application, so that ReactNative can call back the source code corresponding to the page stored in the global storage area when the page is started, so as to perform preset operations on the source code.
[0050] After acquiring the page in the application, the iOS system will also initialize the page of the application. In the process of initializing the page of the application, the source code corresponding to the acquired page is stored in the global storage area corresponding to the application, so that when the page is started, ReactNative uses the corresponding callback method to call back the source code corresponding to the page stored in the global storage area to perform preset operations on the source code corresponding to the page.
[0051] ReactNative can learn whether the page is started according to the system notification message, and when the page is started, ReactNative calls back the source code corresponding to the page stored in the global storage area to perform preset operations on the source code corresponding to the page. ReactNative can use the RNToIOSMethod callback method to call back the source code stored in the global storage area.
[0052] In another embodiment, when the management system is an Android system, the method provided in the present application includes: when the application is started, the Android system uses an interception function that matches the Android system to obtain the source code corresponding to the page in the application, the Android system initializes the page of the application, and while initializing the intercepted page, stores the obtained source code of the page in the global storage area corresponding to the application, so that ReactNative uses a callback method that matches the Android system when the page is started to call back the source code of the page stored in the global storage area, and then executes a preset operation on the source code corresponding to the page.
[0053] See also Figure 3 , Figure 3 This is a flow chart of an embodiment of a method for obtaining a page in the present application. In the current embodiment, the step of calling back the source code stored in the target storage area when the source code is called further includes:
[0054] S310: Monitor whether there is a page in the application that is triggered to start.
[0055] In one embodiment, the compatibility development tool monitors whether a page in at least one application is triggered to start during operation. If it is detected that a page in the application is triggered to start, step S320 is executed, if not, step S310 is continued to be executed.
[0056] In another embodiment, during the operation of the application management system, it monitors whether a page in at least one application is triggered to start. When the application management system detects that a page in the application is triggered to start, it notifies the compatibility development tool so that the compatibility development tool can call back the source code corresponding to the page from the target storage area; or when the application management system detects that a page in the application is triggered to start, it controls the compatibility development tool to call back the source code corresponding to the page from the target storage area so as to perform preset operations on the source code.
[0057] S320: If yes, use a compatibility development tool to call back the source code corresponding to the page from the target storage area.
[0058] If the compatibility development tool detects that a page in the application is triggered to start, it will call back the page stored in the target storage area to perform preset operations on the source code corresponding to the page.
[0059] Furthermore, when different application management systems correspond to different callback methods, the above-mentioned callback of the page stored in the target storage area to perform a preset operation on the source code corresponding to the page includes: using the compatibility development tool to call back the corresponding target page using the callback method matching the application management system to perform a preset operation on the source code corresponding to the page. The target page is the page that is started, or when there is a time difference between the source code being called and the page being started, the target page is the page where the corresponding source code is called.
[0060] Among them, the application management system includes iOS system and Android system, and the compatibility development tools include: ReactNative.
[0061] Furthermore, performing preset operations on the source code corresponding to the page includes: monitoring the stability of the source code, the rate of source code response, and / or obtaining the parameters of the source code operation. When the application is an online shopping APP, the online shopping APP includes a login homepage, a page for browsing products, an order confirmation page, and a payment page. The application management system obtains the source code corresponding to the page in the online shopping APP when the online shopping APP is started, and stores the obtained source code corresponding to the page in the online shopping APP to the corresponding target storage area in the online shopping APP. When the payment page is started through the compatibility development tool, the source code corresponding to the payment page will be called back from the corresponding target storage area in the online shopping APP, and the preset operation will be performed on the source code. For example, the stability of the source code corresponding to the payment page can be monitored, the response rate of the source code corresponding to the payment page can be obtained, and / or the parameters of the source code corresponding to the payment page can be obtained. The parameters of the source code operation obtained can be set and adjusted according to actual needs, and the specifics are not limited here.
[0062] Furthermore, when the pages included in the application program are in a mutually triggering startup relationship, the page that is started first is defined as the parent page, and the page that is triggered to start or enter the pre-start state when the parent page is started is defined as the child page. When a parent page is started, the corresponding child page of the parent page is also directly started or triggered to enter the pre-start state, and when the parent page is started, the compatibility development tool is used to simultaneously call back the source codes corresponding to the parent page and the child page stored in the target storage area, so as to perform preset operations on the source codes corresponding to the called back parent page and the child page.
[0063] See also Figure 4 , Figure 4 This is a flow chart of another embodiment of a method for obtaining a page in this application. In the current embodiment, the application management system is the iOS system, and the compatibility development tool is ReactNative. In the current embodiment, the method provided by this application includes:
[0064] S401: Use ReactNative to monitor whether a page in the application is triggered to start.
[0065] In a terminal device loaded with the iOS system, when ReactNative is required to perform a preset operation on a page included in a certain application or multiple applications, the application management system will use ReactNative to monitor whether a page in the application is triggered to start. When it is detected that a page is triggered to start, step S402 will be executed.
[0066] S402: Using ReactNative to enable the RNToIOSMethod callback method to call back the source code corresponding to the page stored in the target storage area, so as to perform a preset operation on the source code.
[0067] In a terminal device loaded with the iOS system, when ReactNative detects that a page in the application is triggered to start, ReactNative will use a callback method that matches the iOS system to call back the source code corresponding to the triggered page stored in the target storage area to perform a preset operation on the source code. Among them, the callback method that matches the iOS system includes at least the RNToIOSMethod callback method.
[0068] In another embodiment, when the management system is an Android system, the method provided by the present application includes: using ReactNative to monitor whether a page in the application is triggered to start; if a page in the monitored application is triggered to start, using ReactNative to enable a callback method that matches the Android system to call back the page stored in the target storage area to perform preset operations on the source code.
[0069] Furthermore, the technical solution provided by the present application can also directly fork to the source code of the framework of the compatibility development tool, and then open the page as a public attribute, and then perform preset operations on the page.
[0070] Furthermore, in another embodiment, when the compatibility development tool is ReactNative, when obtaining and saving the source code corresponding to the page, the view of ReactNative itself can also be used to obtain the source code corresponding to the page through ReactTag, and then find the page through traversal.
[0071] Compared with the prior art which requires sending and listening through system notification every time after the page is started, so that the same page will send and receive messages multiple times, which will occupy more memory overhead of the terminal, the solution provided by the present application only needs to obtain the source code corresponding to the page when the application is started, and save the obtained source code to the target storage area, and then directly call back the source code corresponding to the page from the target storage area when the page is started and initialized, that is, without changing the framework of the application and / or the compatibility development tool and maintaining the encapsulation of the application and / or the compatibility development tool, it is also possible to complete the call to the page and the page source code with a relatively small overhead, and at the same time, it is also possible to improve the efficiency of the callback of the page through the compatibility development tool, and finally realize the transmission of page type data between the application management system and the compatibility development tool.
[0072] See also Figure 5 , Figure 5 FIG. 5 is a schematic diagram of a terminal device in an embodiment of the present application. In the current embodiment, the terminal device 500 provided by the present application includes a coupled processor 501 and a memory 502. The terminal device 500 can execute Figures 1 to 4 And the method described in any corresponding embodiment.
[0073] The memory 502 includes a local storage (not shown) and stores a computer program. The computer program is executed to realize Figures 1 to 4 And the method described in any corresponding embodiment.
[0074] The processor 501 is coupled to the memory 502, and the processor 501 is used to run the computer program to perform the above Figures 1 to 4 And the method described in any corresponding embodiment.
[0075] See also Figure 6 , Figure 6 Schematic diagram of a storage medium in an embodiment of the present application. The storage medium 600 stores a computer program 601 that can be executed by a processor. The computer program 601 is used to implement the above Figures 1 to 4 Specifically, the storage medium 600 may be a memory, a personal computer, a server, a network device, or a USB flash drive.
[0076] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for obtaining a page, characterized in that: The method comprises: If the application belongs to the preset list and it is determined that the acquisition of source code is allowed according to the setting of the preset list, the application management system acquires the source code corresponding to the page in the application when the application is started, wherein the page in the application is not started and the source code corresponding to the page is not actually called when the application is started, and the preset list includes a list of programs that the user is allowed to access; The application management system stores the source code in a target storage area, and when the compatibility development tool detects that the page in the application is triggered to start, the compatibility development tool calls back the target source code from the target storage area; and then performs a preset operation on the source code corresponding to the page; the target source code is the source code corresponding to the page that is triggered to start, or the target source code includes the source code corresponding to the page that is triggered to start and the source code corresponding to the subordinate page, and the subordinate page is a page that is started or triggered to enter a pre-start state when the page that is triggered to start is started.
2. The method for obtaining a page according to claim 1, characterized in that: The obtaining of the source code corresponding to the page in the application comprises: The Hook technology is used to obtain the source code corresponding to the page in the application.
3. The method for obtaining a page according to claim 2, characterized in that: When the application includes a plurality of the pages, the method of obtaining the source code corresponding to the pages in the application by using the Hook technology further includes: The Hook technology is used to respectively obtain multiple groups of source codes corresponding to the multiple pages.
4. The method for obtaining a page according to claim 3, characterized in that: The calling back the source code corresponding to the page from the target storage area by the compatibility development tool includes: The target source code corresponding to the page is called back using a callback method that matches the application management system.
5. The method for obtaining a page according to claim 4, characterized in that: The application management system includes an iOS system and an Android system, and the compatibility development tool includes: ReactNative.
6. The method for obtaining a page according to claim 1, characterized in that: The performing a preset operation on the source code corresponding to the page includes: Monitor the stability of the source code, and / or obtain the parameters of the source code operation.
7. The method for obtaining a page according to claim 1, characterized in that: The storing of the source code into the target storage area further comprises: The source code is stored in a global storage area corresponding to the application.
8. A terminal device, characterized in that: The terminal device comprises a coupled memory and a processor, wherein: The memory includes local storage and stores a computer program; The processor is configured to run the computer program to perform the method according to any one of claims 1 to 7.
9. A storage medium, characterized in that: The storage medium stores a computer program that can be executed by a processor, and the computer program is used to implement the method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
