Page processing method and device based on webpage view, equipment, medium and product

By obtaining and processing information such as transit access address, target access address, status variable, etc., the page processing strategy of the web page view is determined, and the naming conflicts and code complexity increase in the existing technology are solved, thereby realizing concise and efficient web page view management.

CN119939052APending Publication Date: 2025-05-06CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411697829.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The prior art has problems with naming conflicts and increased code complexity when closing web views, mainly due to invasive modifications to window objects and the introduction of third-party software development toolkits.

Method used

By obtaining the transit access address, the target access address, the status variable, the first web page address and the second web page address, the current status of the transit access address is determined based on the status variable, and the page processing strategy executed for the web page view is determined based on the status and other addresses, so as to avoid invasive modifications to the window object.

Benefits of technology

Implements to avoid naming conflicts when closing web views and reduces code complexity and application size.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119939052A_ABST
    Figure CN119939052A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a page processing method and device based on a webpage view, equipment, a medium and a product, and the method comprises the following steps: obtaining a transfer access address, a target access address, a state variable, a first webpage address and a second webpage address; determining a current loading state of the transfer access address according to the state variable; determining a first page processing strategy executed on the webpage view according to the current state, the transfer access address and the first webpage address; and determining a second page processing strategy executed on the webpage view according to the current state, the transfer access address, the second webpage address and the target access address. According to the method, when page processing is carried out based on the webpage view, invasive modification does not need to be carried out on the window object, so that naming conflicts cannot be caused, meanwhile, a third-party software development kit does not need to be introduced, and the code complexity and the application program size are effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a page processing method, device, equipment, medium and product based on a web page view. Background Art

[0002] When developing mobile applications, web view components are often embedded to open web pages. When the user wants to return to the native layer from the web layer in the web view, the web layer code cannot close the web view because the web view is a component of the native layer.

[0003] In response to the above problems, related technologies usually use a dynamic client scripting language bridge (JavaScriptBridge, JSBridge) to communicate between the native layer and the web page layer, so as to realize mutual calling and interaction between the web page layer code and the native layer code. The above method injects a method into the window object of the web page layer code running environment. When the user wants to close the web page view, this method can be called. However, the above method has the following problems: (1) Since all properties of the window object can be reassigned, after the window object is invasively modified, it is likely to cause naming conflicts. For example, the above method of injecting the window object can be easily overwritten by the business code or the introduced third-party code; (2) It is necessary to introduce some third-party software development kits (Software Development Kit, SDK), which increases the complexity of the code and also increases the size of the mobile application.

[0004] Therefore, when closing a web page view, the related art has problems such as naming conflicts caused by intrusive modification of window objects and increased code complexity and application size caused by the introduction of a third-party software development kit. Summary of the invention

[0005] In view of this, the present disclosure provides a page processing method, apparatus, device, medium and product based on a web page view to solve the problems of naming conflicts caused by invasive modification of window objects and increased code complexity and application size caused by the introduction of third-party software development kits when closing the web page view in related technologies.

[0006] In a first aspect, the present disclosure provides a page processing method based on a web page view, the method comprising:

[0007] Obtaining a transfer access address, a target access address, a state variable, a first web page address, and a second web page address, wherein the transfer access address is used to access a transfer page, the target access address is used to access a target page, the target page is a page to be loaded determined according to a request sent by a user, the state variable is used to indicate a state in which the transfer page is loaded in a web page view, the first web page address is an address of a web page to be opened obtained after monitoring a first event of the web page view, and the second web page address is an address of a web page currently being opened obtained after monitoring a second event of the web page view;

[0008] Determine the current state of the forwarding access address being loaded according to the state variable;

[0009] Determine a first page processing strategy to be executed on the web page view according to the current state, the intermediate access address, and the first web page address;

[0010] A second page processing strategy to be executed on the web page view is determined according to the current state, the transit access address, the second web page address, and the target access address.

[0011] In the disclosed embodiment, by obtaining the transit access address, the target access address, the state variable, the first web page address and the second web page address; determining the current state of the transit access address being loaded according to the state variable; determining the first page processing strategy to be executed on the web page view according to the current state, the transit access address and the first web page address; determining the second page processing strategy to be executed on the web page view according to the current state, the transit access address, the second web page address and the target access address. Since the disclosed embodiment determines the current state of the transit access address being loaded through the state variable, and executes the first page processing strategy and the second page processing strategy on the web page view based on the current state, the transit access address, the target access address, the first web page address and the second web page address, there is no need to perform invasive modifications to the window object, thereby not causing naming conflicts, and there is no need to introduce a third-party software development kit, thereby effectively reducing code complexity and application volume.

[0012] In an optional implementation, determining a second page processing strategy to be executed on the web page view according to the current state, the transit access address, the second web page address, and the target access address includes:

[0013] When the state variable is not the target preset value, load the transfer access address, set the state variable to the target preset value, and obtain the second webpage address;

[0014] comparing the second web page address with the relay access address;

[0015] The target page corresponding to the target access address is determined or the next access address is obtained according to the comparison result.

[0016] In the disclosed embodiment, the first opening of the transfer page is achieved by loading the transfer access address when the state variable is not the target preset value. The current state of the transfer access address being loaded is changed by setting the state variable to the target preset value. The target page is opened by obtaining the second web page address, comparing the second web page address with the transfer access address, and determining to display the target page corresponding to the target access address according to the comparison result, or obtaining the next access address according to the comparison result, providing the target access address for the subsequent next cycle operation.

[0017] In an optional implementation, determining to display a target page corresponding to the target access address or obtaining a next access address according to the comparison result includes:

[0018] In the case where the second webpage address is not equal to the transit access address, obtaining the next access address according to the trigger instruction, wherein the trigger instruction is used to indicate that the user has performed a selection operation on the target control;

[0019] or,

[0020] When the second webpage address is equal to the transit access address, the target link of the target access address is obtained, the target link is jumped to display the target page, and the operation flow of obtaining the next access address according to the trigger instruction is executed.

[0021] In the embodiment of the present disclosure, when the second web page address is not equal to the transit access address, the next access address is obtained according to the trigger instruction, and the target access address is provided for the subsequent next loop operation. When the second web page address is equal to the transit access address, the target link of the target access address is obtained, and the target page is displayed by jumping to the target link to open the target page. After opening the target page, the operation process of obtaining the next access address according to the trigger instruction is executed, and the next access address can be obtained, and the target access address is provided for the subsequent next loop operation.

[0022] In an optional implementation, when the second webpage address is not equal to the transit access address, obtaining the next access address according to the trigger instruction includes:

[0023] When the first trigger instruction is received, the next access address is obtained according to the fallback function and the history list, wherein the history list includes multiple history access addresses, the fallback function is used to remove the history access address at the end of the history list to obtain the current list, the next access address is the web page address at the end of the current list, and the first trigger instruction is used to indicate that the target control is a return button.

[0024] In the disclosed embodiment, when receiving the first trigger instruction, a history list is used to store multiple historical access addresses, and a fallback function is used to remove the historical access address at the end of the history list to obtain the current list, so that the webpage address at the end of the current list, that is, the next access address, can be obtained. The next access address can be obtained according to the fallback function and the history list, providing a target access address for returning to the previous page in the subsequent next loop operation.

[0025] In an optional implementation, when the second webpage address is not equal to the transit access address, obtaining the next access address according to the trigger instruction includes:

[0026] When the second trigger instruction is received, the next access link is obtained to obtain the next access address, wherein the next access link is used to implement continued jump access based on the completion of target page loading, and the second trigger instruction is used to indicate that the target control is a continued jump link.

[0027] In the embodiment of the present disclosure, when the second trigger instruction is received, the next access address is obtained according to the acquired next access link, so as to provide a target access address for continuing the access jump in the subsequent next loop operation.

[0028] In an optional implementation, determining a first page processing strategy to be executed on the web page view according to the current state, the intermediate access address, and the first web page address includes:

[0029] When the state variable is the target preset value and the first webpage address is not equal to the transit access address, the first webpage address is loaded, the second webpage address is obtained, and the step of comparing the second webpage address with the transit access address is performed;

[0030] When the state variable is a target preset value and the first web page address is equal to the transit access address, a closing operation is performed on the web page view.

[0031] In the disclosed embodiment, by loading the first web page address when the state variable is the target preset value and the first web page address is not equal to the transit access address, the first web page address is opened and multiple jumps are completed. By obtaining the second web page address and executing the step of comparing the second web page address with the transit access address, the operation process can be continued to complete this cycle. By performing a closing operation on the web page view when the state variable is the target preset value and the first web page address is equal to the transit access address, the web page view can be closed when the transit page is loaded for the second time, without the need for invasive modification of the window object, thereby not causing naming conflicts, and without the need to introduce a third-party software development kit, thereby effectively reducing code complexity and application size.

[0032] In a second aspect, the present disclosure provides a page processing device based on a web page view, the device comprising:

[0033] an acquisition module, used to acquire a transfer access address, a target access address, a state variable, a first web page address, and a second web page address, wherein the transfer access address is used to access a transfer page, the target access address is used to access a target page, the target page is a page to be loaded determined according to a request sent by a user, the state variable is used to indicate a state in which the transfer page is loaded in a web page view, the first web page address is a web page address to be loaded obtained after monitoring a first event of the web page view, and the second web page address is a web page address currently being loaded obtained after monitoring a second event of the web page view;

[0034] A first determination module, used to determine the current state of the transfer access address being loaded according to the state variable;

[0035] A second determination module, configured to determine a first page processing strategy to be executed on the web page view according to the current state, the transit access address and the first web page address;

[0036] The third determination module is used to determine the second page processing strategy to be executed on the web page view according to the current state, the transit access address, the second web page address and the target access address.

[0037] In a third aspect, the present disclosure provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the page processing method based on the web page view of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0038] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the page processing method based on a web page view according to the first aspect or any corresponding embodiment thereof.

[0039] In a fifth aspect, the present disclosure provides a computer program product, including computer instructions, where the computer instructions are used to enable a computer to execute the page processing method based on a web page view according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0041] Figure 1 is a flow chart of a page processing method based on a web page view according to an embodiment of the present disclosure;

[0042] Figure 2 is a flow chart of a page processing method based on a web page view according to another embodiment of the present disclosure;

[0043] Figure 3 is a structural block diagram of a page processing device based on a web page view according to an embodiment of the present disclosure;

[0044] Figure 4 It is a schematic diagram of the hardware structure of the computer device of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0046] When developing mobile applications, web view components are often embedded to open web pages. When the user wants to return to the native layer from the web layer in the web view, the web layer code cannot close the web view because the web view is a component of the native layer.

[0047] In response to the above problems, related technologies usually use a dynamic client scripting language bridge (JavaScriptBridge, JSBridge) to communicate between the native layer and the web page layer, so as to realize mutual calling and interaction between the web page layer code and the native layer code. The above method injects a method into the window object of the web page layer code running environment. When the user wants to close the web page view, this method can be called. However, the above method has the following problems: (1) Since all properties of the window object can be reassigned, after the window object is invasively modified, it is likely to cause naming conflicts. For example, the above method of injecting the window object can be easily overwritten by the business code or the introduced third-party code; (2) It is necessary to introduce some third-party software development kits (Software Development Kit, SDK), which increases the complexity of the code and also increases the size of the mobile application.

[0048] In order to solve the above problems, according to an embodiment of the present disclosure, a page processing method embodiment based on a web page view is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0049] In this embodiment, a page processing method based on a web page view is provided, such as Figure 1 As shown, Figure 1 : is a flow chart of a page processing method based on a web page view according to an embodiment of the present disclosure, and the flow can be applied to a server, including the following steps:

[0050] Step S101, obtaining a transit access address, a target access address, a state variable, a first web page address, and a second web page address, wherein the transit access address is used to access a transit page, the target access address is used to access a target page, the target page is a page to be loaded determined according to a request issued by a user, the state variable is used to indicate a state in which the transit page is loaded in a web page view, the first web page address is an address of a web page to be opened obtained after monitoring a first event of the web page view, and the second web page address is an address of a web page currently being opened obtained after monitoring a second event of the web page view.

[0051] Optionally, in the disclosed embodiment, the transfer page can be a blank HyperText Markup Language (HTML) document. The server writes a blank HTML document, i.e., the transfer page, defines the access address of the transfer page as BlankURL, i.e., the transfer access address, and then uploads the transfer page to the server, or places it in the local resource file directory and accesses it through the file protocol. The target page is the page to be loaded determined according to the request issued by the user. The server defines the access address of the target page as TargetURL, i.e., the target access address. The state variable is used to indicate the state of the transfer page being loaded in the web page view, i.e., whether the transfer page has been loaded. The server defines the state variable as HasLoadedBlankURL. The first event is the start loading event (onPageStarted), and the second event is the loading completion event (onPageFinished).

[0052] Specifically, after listening to the start loading event of the web page view, the server obtains the address of the web page to be opened, that is, the first web page address, in the callback function of the event; after listening to the loading completion event of the web page view, the server obtains the address of the web page currently being opened, that is, the second web page address, in the callback function of the event.

[0053] It should be noted that the application scenario of the embodiment of the present disclosure is the hybrid development of immersive web page views in mobile applications. Mobile applications (Application, APP) are applications running on mobile devices (such as smartphones and tablets). When developing mobile applications, web view (Webview) components are often embedded to open web pages. In order to provide more flexible customizability (referring to the web page layer can be used to layout the content of the entire web page view through HTML and CSS) and better immersive experience (referring to the complete integration of the native layer and the web page layer), the web view component is often rendered to the full screen area. Immersive web view, also known as full-screen web view, refers to rendering the web view component to the full screen range of the mobile device, and no other native components (such as back buttons, close buttons, etc.) are provided in its upper layer. All interactions are determined by the dynamic client scripting language (JavaScript, JS) code running in the web view. The native layer (Native) refers to the part of the application written in the native programming language (such as Objective-C / Swift or Java / Kotlin) provided by a specific platform (such as iOS or Android).

[0054] Step S102, determining the current state of the transferred access address being loaded according to the state variable.

[0055] Optionally, in the embodiment of the present disclosure, the server determines the current loading status of the forwarding access address BlankURL, that is, whether the forwarding page has been loaded, through the value of the state variable HasLoadedBlankURL.

[0056] Step S103, determining a first page processing strategy to be executed on the web page view according to the current state, the intermediate access address and the first web page address.

[0057] Optionally, in an embodiment of the present disclosure, the server determines a first page processing strategy to be executed on the web page view according to the current state, the transit access address BlankURL, and the first web page address.

[0058] Step S104, determining a second page processing strategy to be executed on the web page view according to the current state, the transit access address, the second web page address and the target access address.

[0059] Optionally, in the embodiment of the present disclosure, the server determines the second page processing strategy to be executed on the web page view according to the current state, the transit access address BlankURL, the second web page address and the target access address TargetURL.

[0060] In the disclosed embodiment, by obtaining the transit access address, the target access address, the state variable, the first web page address and the second web page address; determining the current state of the transit access address being loaded according to the state variable; determining the first page processing strategy to be executed on the web page view according to the current state, the transit access address and the first web page address; determining the second page processing strategy to be executed on the web page view according to the current state, the transit access address, the second web page address and the target access address. Since the disclosed embodiment determines the current state of the transit access address being loaded through the state variable, and executes the first page processing strategy and the second page processing strategy on the web page view based on the current state, the transit access address, the target access address, the first web page address and the second web page address, there is no need to perform invasive modifications to the window object, thereby not causing naming conflicts, and there is no need to introduce a third-party software development kit, thereby effectively reducing code complexity and application volume.

[0061] In some optional implementations, determining a second page processing strategy to be executed on the web page view according to the current state, the transit access address, the second web page address, and the target access address includes:

[0062] When the state variable is not the target preset value, load the transfer access address, set the state variable to the target preset value, and obtain the second webpage address;

[0063] comparing the second web page address with the relay access address;

[0064] The target page corresponding to the target access address is determined or the next access address is obtained according to the comparison result.

[0065] Optionally, in the disclosed embodiment, the target preset value is True, indicating that the transfer page has been loaded. When the state variable HasLoadedBlankURL is not True, that is, the transfer page has not been loaded, the server stops loading the first web page URL, then loads the transfer access address BlankURL, and sets the state variable HasLoadedBlankURL to True. Then, after listening to the loading completion event of the web page view, the server obtains the address of the web page currently being opened, that is, the second web page address, in the callback function of the event, and then compares the second web page address with the transfer access address BlankURL, and determines to display the target page corresponding to the target access address TargetURL or obtains the next access address based on the comparison result.

[0066] In the disclosed embodiment, the first opening of the transfer page is achieved by loading the transfer access address when the state variable is not the target preset value. The current state of the transfer access address being loaded is changed by setting the state variable to the target preset value. The target page is opened by obtaining the second web page address, comparing the second web page address with the transfer access address, and determining to display the target page corresponding to the target access address according to the comparison result, or obtaining the next access address according to the comparison result, providing the target access address for the subsequent next cycle operation.

[0067] In some optional implementations, determining to display a target page corresponding to the target access address or obtaining a next access address according to the comparison result includes:

[0068] In the case where the second webpage address is not equal to the transit access address, obtaining the next access address according to the trigger instruction, wherein the trigger instruction is used to indicate that the user has performed a selection operation on the target control;

[0069] or,

[0070] When the second webpage address is equal to the transit access address, the target link of the target access address is obtained, the target link is jumped to display the target page, and the operation flow of obtaining the next access address according to the trigger instruction is executed.

[0071] Optionally, in an embodiment of the present disclosure, when the second web page address is not equal to the transit access address BlankURL, the server obtains the next access address according to the trigger instruction; when the second web page address is equal to the transit access address BlankURL, the server obtains the target link of the target access address TargetURL, jumps to the target link to display the target page, and executes the operation process of obtaining the next access address according to the trigger instruction.

[0072] Specifically, when the second web page address is equal to the transit access address BlankURL, the server executes a JavaScript code window.location.href=TargetURL in the web page view to jump to the target link TargetURL.

[0073] In the embodiment of the present disclosure, when the second web page address is not equal to the transit access address, the next access address is obtained according to the trigger instruction, and the target access address is provided for the subsequent next loop operation. When the second web page address is equal to the transit access address, the target link of the target access address is obtained, and the target page is displayed by jumping to the target link to open the target page. After opening the target page, the operation process of obtaining the next access address according to the trigger instruction is executed, and the next access address can be obtained, and the target access address is provided for the subsequent next loop operation.

[0074] In some optional implementations, when the second webpage address is not equal to the transit access address, obtaining the next access address according to the trigger instruction includes:

[0075] When the first trigger instruction is received, the next access address is obtained according to the fallback function and the history list, wherein the history list includes multiple history access addresses, the fallback function is used to remove the history access address at the end of the history list to obtain the current list, the next access address is the web page address at the end of the current list, and the first trigger instruction is used to indicate that the target control is a return button.

[0076] Optionally, in the disclosed embodiment, when the server receives the first trigger instruction, the server removes the historical access address at the end of the history list HistoryList through the fallback function history.back() to obtain the current list. For example: if the server directly loads the target access address TargetURL in the web view, the value of the history list HistoryList is [TargetURL]. If the server first loads the transit access address BlankURL in the web view, and then loads the target access address TargetURL, the value of the history list HistoryList will become [BlankURL, TargetURL], which contains two elements. When the server calls the JavaScript fallback function history.back() in the page of the target access address TargetURL, the historical access address TargetURL at the end of the history list HistoryList will be removed to obtain the current list [BlankURL].

[0077] Then, the server obtains the next access address according to the webpage address at the end of the current list. For example, if the current list is [BlankURL], the server can obtain the next access address, that is, the transit access address BlankURL, according to the current list [BlankURL].

[0078] Specifically, the first trigger instruction is used to indicate that the target control is a back button. The back button can be implemented through Cascading Style Sheets (CSS) and positioning technology (DIVision, DIV) in the Cascading Style Sheets. After the user clicks the back button, the server will call JavaScript's fallback function history.back() to process the history list HistoryList to obtain the next access address.

[0079] In the disclosed embodiment, when receiving the first trigger instruction, a history list is used to store multiple historical access addresses, and a fallback function is used to remove the historical access address at the end of the history list to obtain the current list, so that the webpage address at the end of the current list, that is, the next access address, can be obtained. The next access address can be obtained according to the fallback function and the history list, providing a target access address for returning to the previous page in the subsequent next loop operation.

[0080] In some optional implementations, when the second webpage address is not equal to the transit access address, obtaining the next access address according to the trigger instruction includes:

[0081] When the second trigger instruction is received, the next access link is obtained to obtain the next access address, wherein the next access link is used to implement continued jump access based on the completion of target page loading, and the second trigger instruction is used to indicate that the target control is a continued jump link.

[0082] Optionally, in an embodiment of the present disclosure, upon receiving the second trigger instruction, the server acquires the next access link and obtains the next access address, wherein the second trigger instruction is used to indicate that the target control is a continue jump link.

[0083] In the embodiment of the present disclosure, when the second trigger instruction is received, the next access address is obtained according to the acquired next access link, so as to provide a target access address for continuing the access jump in the subsequent next loop operation.

[0084] In some optional implementations, determining a first page processing strategy to be executed on the web page view according to the current state, the intermediate access address, and the first web page address includes:

[0085] When the state variable is the target preset value and the first webpage address is not equal to the transit access address, the first webpage address is loaded, the second webpage address is obtained, and the step of comparing the second webpage address with the transit access address is performed;

[0086] When the state variable is a target preset value and the first web page address is equal to the transit access address, a closing operation is performed on the web page view.

[0087] Optionally, in the embodiment of the present disclosure, when the state variable HasLoadedBlankURL is True and the first web page address is not equal to the transit access address BlankURL, the server loads the first web page address, then obtains the second web page address, and performs the step of comparing the second web page address with the transit access address, and continues to execute the operation process to complete this cycle; when the state variable HasLoadedBlankURL is True and the first web page address is equal to the transit access address BlankURL, the server performs a closing operation on the web page view.

[0088] Specifically, when the user clicks the back button, the server calls the JavaScript fallback function history.back() and falls back to the transit access address BlankURL. Since the transit page is only rendered once, the operation of closing the web page view will be triggered when the transit access address BlankURL is loaded for the second time.

[0089] In the disclosed embodiment, by loading the first web page address when the state variable is the target preset value and the first web page address is not equal to the transit access address, the first web page address is opened and multiple jumps are completed. By obtaining the second web page address and executing the step of comparing the second web page address with the transit access address, the operation process can be continued to complete this cycle. By performing a closing operation on the web page view when the state variable is the target preset value and the first web page address is equal to the transit access address, the web page view can be closed when the transit page is loaded for the second time, without the need for invasive modification of the window object, thereby not causing naming conflicts, and without the need to introduce a third-party software development kit, thereby effectively reducing code complexity and application size.

[0090] In some optional embodiments, such as Figure 2 As shown, Figure 2It is a flow diagram of another page processing method based on a web page view according to an embodiment of the present disclosure. First, the server obtains a transfer access address, a state variable and a target access address. Then, the server loads the web page view, monitors the first event of the web page view, obtains the first web page address, and determines whether the first web page address is a preset value: when the first web page address is not a preset value, loads the transfer access address, sets the state variable to the target preset value, and then monitors the second event of the web page view, obtains the second web page address, and determines whether the second web page address is equal to the transfer access address: when the second web page address is not equal to the transfer access address, wait for the user to select the target control, and after the user clicks the return button, obtain the next access address according to the fallback function and the history list; after the user clicks the next access link, obtain the next access address according to the next access link, and input the obtained next access address into the process to start re-executing the loop; when the second web page address is equal to the transfer access address, load the target access address, and then execute the operation process of waiting for the user to select the target control; when the first web page address is the preset value, close the web page view.

[0091] In this embodiment, a page processing device based on a web page view is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0092] This embodiment provides a page processing device based on a web page view, such as Figure 3 As shown, including:

[0093] The acquisition module 301 is used to acquire a transfer access address, a target access address, a state variable, a first web page address, and a second web page address, wherein the transfer access address is used to access a transfer page, the target access address is used to access a target page, the target page is a page to be loaded determined according to a request sent by a user, the state variable is used to indicate a state in which the transfer page is loaded in a web page view, the first web page address is an address of a web page to be opened obtained after monitoring a first event of the web page view, and the second web page address is an address of a web page currently being opened obtained after monitoring a second event of the web page view;

[0094] A first determining module 302, configured to determine a current state of loading of the transit access address according to a state variable;

[0095] A second determination module 303, configured to determine a first page processing strategy to be executed on the web page view according to the current state, the intermediate access address and the first web page address;

[0096] The third determination module 304 is used to determine a second page processing strategy to be executed on the web page view according to the current state, the transit access address, the second web page address and the target access address.

[0097] In the disclosed embodiment, by obtaining the transit access address, the target access address, the state variable, the first web page address and the second web page address; determining the current state of the transit access address being loaded according to the state variable; determining the first page processing strategy to be executed on the web page view according to the current state, the transit access address and the first web page address; determining the second page processing strategy to be executed on the web page view according to the current state, the transit access address, the second web page address and the target access address. Since the disclosed embodiment determines the current state of the transit access address being loaded through the state variable, and executes the first page processing strategy and the second page processing strategy on the web page view based on the current state, the transit access address, the target access address, the first web page address and the second web page address, there is no need to perform invasive modifications to the window object, thereby not causing naming conflicts, and there is no need to introduce a third-party software development kit, thereby effectively reducing code complexity and application volume.

[0098] In some optional implementations, the third determining module 304 includes:

[0099] A first loading unit is used to load the transit access address when the state variable is not the target preset value, set the state variable to the target preset value, and obtain the second webpage address;

[0100] A comparison unit, used to compare the second webpage address with the transit access address;

[0101] The determination unit is used to determine the target page corresponding to the display target access address or obtain the next access address according to the comparison result.

[0102] In some optional implementations, the determining unit includes:

[0103] The first obtaining submodule is used to obtain the next access address according to the trigger instruction when the second webpage address is not equal to the transfer access address, wherein the trigger instruction is used to indicate that the user has performed a selection operation on the target control;

[0104] The second obtaining submodule is used to obtain the target link of the target access address when the second web page address is equal to the transit access address, jump to the target link to display the target page, and execute the operation process of obtaining the next access address according to the trigger instruction.

[0105] In some optional implementations, the first obtaining submodule includes:

[0106] The first obtaining sub-unit is used to obtain the next access address according to the fallback function and the history list when receiving the first trigger instruction, wherein the history list includes multiple history access addresses, the fallback function is used to remove the history access address at the end of the history list to obtain the current list, the next access address is the web page address at the end of the current list, and the first trigger instruction is used to indicate that the target control is a return button.

[0107] In some optional implementations, the first obtaining submodule includes:

[0108] The second obtaining subunit is used to obtain the next access link and the next access address when receiving the second trigger instruction, wherein the next access link is used to realize continued jump access based on the completion of target page loading, and the second trigger instruction is used to indicate that the target control is a continued jump link.

[0109] In some optional implementations, the second determining module 303 includes:

[0110] a second loading unit, configured to load the first web page address, obtain the second web page address, and perform a step of comparing the second web page address with the transit access address when the state variable is a target preset value and the first web page address is not equal to the transit access address;

[0111] The closing unit is used to execute a closing operation on the web page view when the state variable is a target preset value and the first web page address is equal to the transfer access address.

[0112] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0113] The page processing device based on web page view in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0114] The present disclosure also provides a computer device having the above Figure 3 The page processing device based on the web page view is shown.

[0115] See also Figure 4 , Figure 4 is a schematic diagram of a computer device provided by an optional embodiment of the present disclosure, such as Figure 4As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 4 A processor 10 is taken as an example.

[0116] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0117] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0118] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0119] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0120] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0121] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0122] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.

[0123] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A page processing method based on a web page view, characterized in that: The method comprises: Obtaining a transit access address, a target access address, a state variable, a first web page address, and a second web page address, wherein the transit access address is used to access a transit page, the target access address is used to access a target page, the target page is a page to be loaded determined according to a request issued by a user, the state variable is used to indicate a loaded state of the transit page in a web page view, the first web page address is a web page address to be opened obtained after monitoring a first event of the web page view, and the second web page address is a web page address currently being opened obtained after monitoring a second event of the web page view; Determine the current state of the transfer access address being loaded according to the state variable; Determining a first page processing strategy to be executed on the web page view according to the current state, the transit access address, and the first web page address; A second page processing strategy to be executed on the web page view is determined according to the current state, the transit access address, the second web page address, and the target access address.

2. The method according to claim 1, characterized in that The determining, according to the current state, the transit access address, the second web page address, and the target access address, a second page processing strategy to be executed on the web page view comprises: When the state variable is not the target preset value, loading the transit access address, setting the state variable to the target preset value, and acquiring the second webpage address; comparing the second webpage address with the transit access address; The target page corresponding to the target access address is displayed or the next access address is obtained according to the comparison result.

3. The method according to claim 2, characterized in that The step of determining to display the target page corresponding to the target access address or obtaining the next access address according to the comparison result includes: In the case where the second webpage address is not equal to the transfer access address, obtaining the next access address according to a trigger instruction, wherein the trigger instruction is used to indicate that the user has performed a selection operation on the target control; or, When the second web page address is equal to the transit access address, the target link of the target access address is obtained, the target link is jumped to display the target page, and the operation flow of obtaining the next access address according to the trigger instruction is executed.

4. The method according to claim 3, characterized in that The step of obtaining the next access address according to the trigger instruction when the second webpage address is not equal to the transfer access address includes: When the first trigger instruction is received, the next access address is obtained according to the fallback function and the history list, wherein the history list includes multiple history access addresses, the fallback function is used to remove the history access address at the end of the history list to obtain the current list, the next access address is the web page address at the end of the current list, and the first trigger instruction is used to indicate that the target control is a return button.

5. The method according to claim 3, characterized in that: The step of obtaining the next access address according to the trigger instruction when the second webpage address is not equal to the transfer access address includes: When the second trigger instruction is received, the next access link is obtained to obtain the next access address, wherein the next access link is used to implement continued jump access based on the completion of the target page loading, and the second trigger instruction is used to indicate that the target control is a continued jump link.

6. The method according to claim 5, characterized in that The determining, according to the current state, the transit access address, and the first web page address, a first page processing strategy to be executed on the web page view comprises: When the state variable is a target preset value and the first webpage address is not equal to the transit access address, the first webpage address is loaded, the second webpage address is obtained, and the step of comparing the second webpage address with the transit access address is performed; When the state variable is a target preset value and the first webpage address is equal to the transit access address, a closing operation is performed on the webpage view.

7. A page processing device based on a web page view, characterized in that: The device comprises: an acquisition module, used to acquire a transit access address, a target access address, a state variable, a first web page address, and a second web page address, wherein the transit access address is used to access a transit page, the target access address is used to access a target page, the target page is a page to be loaded determined according to a request issued by a user, the state variable is used to indicate a loaded state of the transit page in a web page view, the first web page address is a web page address to be opened obtained after monitoring a first event of the web page view, and the second web page address is a web page address currently being opened obtained after monitoring a second event of the web page view; A first determining module, configured to determine a current state in which the transit access address is loaded according to the state variable; A second determination module, configured to determine a first page processing strategy to be executed on the web page view according to the current state, the transit access address and the first web page address; The third determination module is used to determine a second page processing strategy to be executed on the web page view according to the current state, the transit access address, the second web page address and the target access address.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the page processing method based on the web page view according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the page processing method based on a web page view according to any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to enable a computer to execute the page processing method based on a web page view according to any one of claims 1 to 6.