Link interception method and device, equipment and storage medium
By determining whether the target link is an intercepting link of the application in the learning machine terminal and sending an authorization request to the second terminal, the problem of low link interception flexibility in the prior art is solved, and more efficient and flexible link interception is achieved, and children's access security is improved.
Patent Information
- Application Number
- CN202510446532.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-06-13
AI Technical Summary
In the prior art, link interception is low and it is impossible to effectively intercept the situation of jumping to non-learning websites through WebView external links, resulting in the risk of children being exposed to bad information.
By determining in the first terminal whether the target link is an intercepting link of the application, and sending an authorization request to the second terminal when it is determined that it is an intercepting link, the target link is intercepted before receiving the authorization instruction.
Improves the flexibility and security of link blocking, and even if the page is implemented through view or buttons in the form of an image, it can be blocked, enhancing security control over child access.
Smart Images

Figure CN120151085A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular, to a link interception method, device, equipment, and storage medium. Background Art
[0002] With the popularization of the Android system and the diversification of intelligent terminal devices, learning devices designed specifically for children, such as educational tablets and learning machines, have become important tools for family education. Such devices usually carry a customized Android system and support the installation of third-party applications to meet learning needs. However, due to the openness of the Android system and the diversity of third-party applications, while learning machines provide rich functions, they also face severe challenges in content security control.
[0003] Currently, third-party applications in learning machines (such as educational applications (Application, APP), browsers, etc.) often have a WebView component built in, which is used to load web page content or provide an external link jump function. However, there are cases where some applications jump to non-learning websites through WebView external links, resulting in the risk that children may access inappropriate information through this channel. In the prior art, usually, by monitoring the Activity started by the application, the jump is blocked by setting an Activity blacklist, or by identifying the type and text of the button, it is determined whether the operation of the currently clicked button meets the interception and filtering conditions, so as to intercept the button click event.
[0004] However, in the prior art, after determining that the accessed link meets the interception condition, the access link will be directly intercepted, resulting in low interception flexibility. Summary of the Invention
[0005] The present invention provides a link interception method, device, equipment, and storage medium, which are used to solve the defect of low flexibility in link interception in the prior art and achieve the purpose of improving the flexibility of link interception.
[0006] The present invention provides a link interception method, which is applied to a first terminal. The method includes: When receiving an access operation of a target link in an application program of the first terminal, determining whether the target link is an intercepted link of the application program; When the target link is an intercepted link of the application program, sending an authorization request to a second terminal; When not receiving an authorization instruction sent by the second terminal, intercepting the target link.
[0007] According to a link interception method provided by the present invention, the determining whether the target link is an intercepted link of the application program includes: Match the target link with each link in the interception list corresponding to the application; When there is a link that matches the target link successfully, determine that the target link is the intercepted link of the application; When there is no link that matches the target link successfully, determine that the target link is not the intercepted link of the application.
[0008] According to a link interception method provided by the present invention, the method further includes: Send a list acquisition request to the server, where the list acquisition request includes the identification information of the application; Receive, through the system process, the interception list corresponding to the identification information sent by the server; When it is monitored that the application starts the WebView component for the first time, access the system process through the WebView component to obtain the interception list.
[0009] According to a link interception method provided by the present invention, the method further includes: When receiving the authorization instruction sent by the second terminal, intercept the target link in the application and call an external browser to display the page corresponding to the target link.
[0010] According to a link interception method provided by the present invention, after calling the external browser to display the page corresponding to the target link, the method further includes: When receiving a page switching instruction and determining that the page display mode corresponding to the type of the target link is the blank display mode, in response to the page switching instruction, display a blank page in the WebView component of the application.
[0011] According to a link interception method provided by the present invention, the method further includes: When receiving a page switching instruction and determining that the page display mode corresponding to the type of the target link is the non - blank display mode, in response to the page switching instruction, display the target page in the WebView component of the application, where the target page is the page displayed by the WebView component before the page switching.
[0012] According to a link interception method provided by the present invention, displaying the target page in the WebView component of the application includes: Call the back event through the application to display the target page in the WebView component of the application.
[0013] The present invention also provides a link interception device, including: A judgment module, configured to judge whether the target link is an intercepted link of the application program when receiving an access operation of a user to the target link in the application program of the first terminal; A sending module, configured to send an authorization request to a second terminal when the target link is an intercepted link of the application program; An interception module, configured to intercept the target link when not receiving an authorization instruction sent by the second terminal.
[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the link interception method described in any one of the above is implemented.
[0015] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the link interception method described in any one of the above is implemented.
[0016] The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, the link interception method described in any one of the above is implemented.
[0017] For the link interception method, device, equipment, and storage medium provided by the present invention, when receiving an access operation of a user to the target link in the application program of the first terminal, it is judged whether the target link is an intercepted link of the application program. When the target link is an intercepted link of the application program, an authorization request is sent to the second terminal. When not receiving an authorization instruction sent by the second terminal, the target link is intercepted. On the one hand, in the present invention, the link can be directly intercepted. Even if some pages are implemented through views or the buttons are in the form of pictures, the purpose of interception can be achieved, improving the security of access. On the other hand, when it is determined that the target link is an intercepted link, it is not directly intercepted, but further verified with the second terminal. Interception is only performed when the authorization instruction is not received, thereby improving the flexibility of interception. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0019] Figure 1One of the flow diagrams of the link interception method provided by the embodiments of the present invention.
[0020] Figure 2 Another flow diagram of the link interception method provided by the embodiments of the present invention.
[0021] Figure 3 The signaling interaction diagram of the link interception method provided by the embodiments of the present invention.
[0022] Figure 4 The structural diagram of the link interception device provided by the embodiments of the present invention.
[0023] Figure 5 The entity structural diagram of an electronic device provided by the embodiments of the present invention. Detailed implementation manners
[0024] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without making creative efforts shall fall within the protection scope of the present invention.
[0025] Currently, when intercepting external links, it is usually carried out by means of Activity control and button interception. On the one hand, there are often buttons in some pages in the form of pictures or custom buttons, and for these buttons, it is impossible to distinguish whether they need to be intercepted by text. In addition, for some external links, they are not implemented through Activity but through view, and according to the set Activity blacklist, they cannot be intercepted. Therefore, the method of page interception in the prior art will cause some links to be unable to be intercepted, reducing the security of page access. On the other hand, after determining that the interception conditions are met, the external links to be accessed will be directly intercepted, resulting in low interception flexibility.
[0026] In view of the above problems, an embodiment of the present invention provides a link interception method. In this method, the interception links corresponding to each application can be preset in advance. When it is determined that the target link to be accessed by the user belongs to the interception link, instead of directly intercepting the link, an authorization request is sent to the second terminal for further verification. When the authorization instruction sent by the second terminal is not received, the target link is intercepted. On the one hand, in the present invention, the link can be directly intercepted. Even if some pages are implemented through views or the buttons are in the form of pictures, the purpose of interception can be achieved, improving the security of access. On the other hand, when it is determined that the target link is an interception link, it is not directly intercepted, but further verified with the second terminal. Interception is only performed when the authorization instruction is not received, enhancing the flexibility of interception.
[0027] The following combines Figures 1 to 3 to describe the link interception method provided by the embodiment of the present invention. The embodiment of the present invention can be applied to scenarios where third-party applications in learning machines, educational tablets, etc. jump to external links and intercept risky or insecure external links. The execution subject of this method can be an electronic device such as a terminal device, a computer, a server, a server cluster, or a specially designed link interception device, or it can also be a link interception device set in the electronic device. The link interception device can be implemented through software, hardware, or a combination of both.
[0028] Figure 1 is one of the flow diagrams of the link interception method provided by the embodiment of the present invention. As Figure 1 shown, the method includes: Step 101: When an access operation of the target link in the application of the first terminal by the user is received, determine whether the target link is an interception link of the application.
[0029] In this step, a third-party application is installed in the first terminal, and the target link is a link corresponding to a hyperlink, advertisement, privacy protocol button, or WebView embedded page in the application. When the user clicks on the hyperlink, advertisement, privacy protocol button, or WebView embedded page, it means that the user wants to access the page content corresponding to the target link.
[0030] When receiving an access operation triggered by a user for a target link, it is determined whether the target link is a link that needs to be intercepted corresponding to the application. For example, an interception list corresponding to each application is pre-stored in the system layer of the first terminal, and the interception list includes at least one pre-determined link with risks or security hazards. When the webview component of the application in the first terminal is started for the first time, the application process obtains the interception list corresponding to the application from the system layer. In this way, when determining whether the target link is an intercepted link of the application, it is only necessary to match the target link with each link in the interception list corresponding to the application.
[0031] Step 102: When the target link is an intercepted link of the application, send an authorization request to the second terminal.
[0032] In this step, when it is determined that the target link is an intercepted link of the application, it indicates that the target link is a risky link or has certain security hazards. For further verification, the system does not directly intercept the target link, but sends an authorization request to the second terminal. The user corresponding to the second terminal is the authorizing user, which can be understood as the user who can authorize the user corresponding to the first terminal. For example, if the user corresponding to the first terminal is a minor user, the second terminal can be the terminal corresponding to the guardian of the minor user. The authorization request is used to represent whether to allow the user corresponding to the first terminal to access the target link, such as "XX requests to access the YY website, is it allowed?".
[0033] Step 103: Intercept the target link if the authorization instruction sent by the second terminal is not received.
[0034] In this step, if the first terminal does not receive the authorization instruction sent by the second terminal within the preset time period, it means that the authorizing user does not authorize the user corresponding to the first terminal to access the target link. At this time, the target link will be intercepted.
[0035] The link interception method provided by the embodiments of the present invention, when receiving an access operation of a user for a target link in an application of the first terminal, determines whether the target link is an intercepted link of the application. When the target link is an intercepted link of the application, an authorization request is sent to the second terminal. If the authorization instruction sent by the second terminal is not received, the target link is intercepted. On the one hand, in the present invention, the link can be directly intercepted. Even if some pages are implemented through views or the buttons are in the form of pictures, the interception purpose can be achieved, improving the security of access. On the other hand, when it is determined that the target link is an intercepted link, it does not directly perform interception, but further verifies with the second terminal. Only when the authorization instruction is not received will interception be performed, thereby improving the flexibility of interception.
[0036] Figure 2 This is the second flowchart diagram of the link interception method provided by the embodiments of the present invention. As Figure 2 shown, based on the embodiment shown in Figure 1 this embodiment, a detailed description is given of the specific implementation process of how to determine whether a target link is an intercepted link of an application. As Figure 2 shown, the method includes: Step 201: When receiving an access operation of a user to a target link in an application of a first terminal, match the target link with each link in the interception list corresponding to the application.
[0037] In this step, the interception list includes at least one link that needs to be intercepted, such as at least one Uniform Resource Locator (URL) prohibited by a guardian for a minor user to access, or at least one link with risks or security hazards obtained through pre-analysis.
[0038] In a possible implementation manner, when obtaining the interception list, it can be implemented in the following way: Send a list acquisition request to the server. The list acquisition request includes the identification information of the application. Through the system process, receive the interception list corresponding to the identification information sent by the server. When it is detected that the application starts the WebView component for the first time, access the system process through the WebView component to obtain the interception list.
[0039] Specifically, after the first terminal installs the application for the first time, or periodically sends a list acquisition request to the cloud server through the system process. The list acquisition request includes the identification information of the application. The cloud server stores the interception lists corresponding to different applications set in advance. Among them, each application corresponds to a unique package name. Therefore, the interception lists corresponding to different package names can be set. The links in these interception lists can be set by users in advance, such as some links that parents set that children are not allowed to access, or some links detected by the cloud server as having risks.
[0040] After receiving the list acquisition request, the server will search for the interception list corresponding to the application locally and send the found interception list to the system process of the first terminal.
[0041] In another implementation manner, it can also be that after the server updates the interception list, it actively sends the updated interception list to the first terminal.
[0042] When the interception list corresponding to the application is not configured locally on the server, the server returns NULL to the first terminal.
[0043] When the application starts, when it is detected that the application starts the WebView component for the first time, the system process will be accessed through the WebView component to obtain the interception list corresponding to the application. In this way, the application process will obtain the interception list.
[0044] In this embodiment, when it is detected that the application starts the WebView component for the first time, the system process is accessed through the WebView component to obtain the interception list. Subsequently, when determining whether the target link is an intercepted link, the interception list will no longer be retrieved from the server, thereby improving the efficiency of determining intercepted links.
[0045] When the first terminal detects that the user accesses the target link in the application, the system matches the target link with each link in the locally stored interception list. For example, by calculating the similarity between the target link and each link in the interception list, if the similarity between a certain link and the target link is greater than the preset value, it means they match. If the similarity between the target link and each link in the interception list is less than the preset value, it means that none of the links in the interception list match the target link.
[0046] Step 202: When there is a link that successfully matches the target link, determine that the target link is an intercepted link of the application.
[0047] In this step, if there is a link in the interception list that successfully matches the target link, it means that the target link is a link in the interception list, and there is a risk or security hazard for this target link. Therefore, it can be determined that the target link is an intercepted link of the application.
[0048] Step 203: When there is no link that successfully matches the target link, determine that the target link is not an intercepted link of the application.
[0049] In this step, if there is no link in the interception list that successfully matches the target link, it means that the target link is not a link in the interception list, and there is no risk or security hazard for this target link. It is a safe or permitted link for the user corresponding to the first terminal to access. Therefore, it can be determined that the target link is not an intercepted link of the application.
[0050] Among them, when it is determined that the target link is not an intercepted link of the application, it will be directly released, that is, the user can access the target link normally.
[0051] Step 204: When the target link is an intercepted link of the application, send an authorization request to the second terminal.
[0052] In this step, when it is determined that the target link is an intercepted link of the application, the user will be blocked from accessing the target link, and an authorization request will be sent to the second terminal. The authorization request may include relevant information about the target link, the application name, the access time, and whether to allow the user to access the content of the target link.
[0053] Step 205: Intercept the target link if the authorization instruction sent by the second terminal is not received.
[0054] In this step, if the authorization instruction sent by the second terminal is not received within a preset time period, or if an instruction to deny access sent by the second terminal is received, the target link will be intercepted, thereby preventing the user from accessing the page corresponding to the target link.
[0055] In this embodiment, by matching the target link with each link in the interception list corresponding to the application, it is possible to determine whether the target link is an intercepted link of the application based on the matching result, which can improve the accuracy of determining the intercepted link.
[0056] Exemplarily, based on the above embodiments, when the authorization instruction sent by the second terminal is received, intercept the target link in the application and call an external browser to display the page corresponding to the target link.
[0057] Specifically, when the second terminal sends an authorization instruction to the first terminal within a preset time period, it indicates that the user is allowed to access the target link. However, in order to further improve the security of access, in the specific implementation process, the target link will be intercepted in the application, that is, the page corresponding to the target link will not be opened in the application, but an external default browser will be called to display the page corresponding to the target link. In addition, when the page corresponding to the target link is displayed through the external default browser, it needs to be authorized by the second terminal to be displayed, thereby avoiding security risks.
[0058] Exemplarily, after calling an external browser to display the page corresponding to the target link, when a page switching instruction is received and it is determined that the page display mode corresponding to the type of the target link is the blank display mode, in response to the page switching instruction, a blank page is displayed in the WebView component of the application. When a page switching instruction is received and it is determined that the page display mode corresponding to the type of the target link is the non - blank display mode, in response to the page switching instruction, the target page is displayed in the WebView component of the application, and the target page is the page previously displayed by the WebView component before the page switching.
[0059] Specifically, different page display modes corresponding to respective link types can be preset. Among them, the page display modes include a blank display mode and a non - blank display mode. The blank display mode is used to represent that when switching from the interface of an external browser to the application, a blank page is displayed in the WebView component of the application. The non - blank display mode is used to represent that when switching from the interface of an external browser to the application, a non - blank page is displayed in the WebView component of the application, such as the interface displayed before calling the external browser, etc. It should be noted that the page display modes corresponding to different link types can be set by the user according to their own preferences or according to the display content of the link. The specific setting method of the display mode is not limited in the embodiments of the present invention.
[0060] After the external browser is called to display the page corresponding to the target link, if the user wants to return to the application after browsing the page, a page switching instruction will be triggered. This page switching instruction is used to indicate switching the page to the page corresponding to the application.
[0061] When receiving the page switching instruction, the page display mode corresponding to the type of the target link will be determined. If the display mode is the blank display mode, after switching the page to the application, a blank page will be displayed in the WebView component of the application. If the display mode is the non - blank display mode, after switching the page to the application, the target page will be displayed in the WebView component of the application, and the target page is the page displayed in the WebView component before the page switching.
[0062] In the above - mentioned manner, according to the page display mode corresponding to the type of the target link, it is possible to flexibly adjust whether to display a blank page or the target page in the WebView component of the application, improving the flexibility of page display. In addition, when the page display mode corresponding to the type of the target link is the non - blank display mode, the target page can be displayed in the WebView component of the application instead of a blank page, which can improve the user's visual experience and further enhance the intelligence level of human - machine interaction.
[0063] Exemplarily, when displaying the target page in the WebView component of the application, the application can call the back event to display the target page in the WebView component of the application.
[0064] By the above - mentioned method, displaying the target page instead of a blank page in the WebView component of the application can greatly improve the user's usage experience.
[0065] Figure 3 It is the signaling interaction diagram of the link interception method provided by the embodiments of the present invention, as Figure 3As shown, when the user clicks on an application (APP), when the application process first loads the WebView, the application process obtains an interception list from the system process (App Control Service), and this interception list includes the list of URLs that need to be intercepted. The system process (App Control Service) obtains the interception list from the Hwc Data Control through the data layer and sends the interception list to the WebView.
[0066] When the user clicks on the privacy policy in the application, that is, the target link, when preparing to display the target link through the WebView, it will first determine whether the target link matches the links in the interception list. If it matches, an authorization request will be sent to the second terminal. When receiving the authorization instruction sent by the second terminal, it will jump to the external browser to display the page corresponding to the target link. When switching back to the application, based on the page display mode corresponding to the type of the target link, a blank page will be displayed in the WebView component, or the previous page will be displayed in the WebView component.
[0067] The link interception method provided by the embodiments of the present invention, in the case of receiving a user's access operation to a target link in an application of the first terminal, determines whether the target link is an intercepted link of the application. In the case where the target link is an intercepted link of the application, an authorization request is sent to the second terminal. In the case of not receiving the authorization instruction sent by the second terminal, the target link is intercepted. On the one hand, in the present invention, the link can be directly intercepted. Even if some pages are implemented through views or the buttons are in the form of pictures, the interception purpose can still be achieved, improving the security of access. On the other hand, when it is determined that the target link is an intercepted link, it does not directly perform the interception, but further verifies with the second terminal. Only when the authorization instruction is not received will the interception be performed, thereby improving the flexibility of the interception.
[0068] Based on the above embodiments, the class design is divided into the following layers: 1) Invocation layer: The business application or framework (FWK) is the caller, invoking the interface functions provided externally.
[0069] 2) Control layer: The Appcontrol Manager interface layer provides corresponding interfaces for the business application or FWK.
[0070] 3) Management and control layer: The App Control Service service class, which is the specific implementation of the interface and calls the data layer.
[0071] 4) Data layer: HwcDataControl, which processes and saves the data of the interception list, and provides data storage, data persistence, get() method, etc.
[0072] For the interface design, there are two layers of decoupling in the overall interface design, which are implemented by using the existing interfaces of the Software Development Kit (SDK): 1) Decoupling between Appcontrol Manager and the implementation layer, decoupling the caller and the specific implementation. Callers such as FWK and business applications are not aware of the specific implementation.
[0073] 2) Decoupling of HwcDataControl, decoupling the policy layer and the data layer. App Control Service is not aware of the data in the specific interception list.
[0074] Appcontrol Manager interface: Provided for the FWK application process and business applications to call.
[0075] Table 1 shows the relevant content of the Bundle series interfaces: Table 1
[0076] Among them, for the content in Table 1, assuming the target link is URL, each package name corresponds to multiple URL addresses that need to be intercepted, and each URL has multiple configuration parameters. Therefore, the data type corresponding to each package name is List<Map<String, String>> list. The List contains multiple URLs, and each URL records the attribute information through the Map key-value pair.
[0077] However, List cannot be used during cross-process data transmission. <map>Type data, the List needs to be <map>It is transmitted after being converted to the String type, and data parsing is involved. This process can use the org.json library provided by Android.
[0078] When adding an interception list, it depends on MDM to obtain configuration information through the network. Therefore, it is also necessary to persistently save the data to the device so that the configuration information can be obtained when restarting.
[0079] The above-mentioned relevant configuration information such as simple mode, whitelist, blacklist, etc. is saved in Settings.Global, and the storage method is a key-value pair of <String, String> type. However, the URL interception configuration information is relatively complex and is not suitable for direct conversion to String and saving. The data can be saved in an Xml file, or there are interfaces such as setBundle, addBundle, and removeBundle in the App ControlManager interface, and local saving has been implemented. Therefore, the interfaces in the AppControlManager can be reused.
[0080] The link interception device provided by the present invention will be described below. The link interception device described below can be correspondingly referred to the link interception method described above.
[0081] Figure 4 It is a schematic structural diagram of the link interception device provided by the embodiment of the present invention. Refer to Figure 4 As shown, the link interception device 400 includes: A judgment module 11, configured to judge whether the target link is an intercepted link of the application when receiving an access operation of the target link in the application of the first terminal by the user; A sending module 12, configured to send an authorization request to the second terminal when the target link is an intercepted link of the application; An interception module 13, configured to intercept the target link when the authorization instruction sent by the second terminal is not received.
[0082] The device of this embodiment can be used to execute the method of any one of the embodiments on the link interception method side. The specific implementation process and technical effects are similar to those in the embodiments on the link interception method side. For details, reference can be made to the detailed introduction in the embodiments on the link interception method side, which will not be elaborated here.
[0083] In an exemplary embodiment, the judgment module 11 is specifically configured to: Match the target link with each link in the interception list corresponding to the application; In the case where there is a link that successfully matches the target link, determine the target link as the intercepted link of the application; In the case where there is no link that successfully matches the target link, determine that the target link is not the intercepted link of the application.
[0084] In one exemplary embodiment, the device further includes: a receiving module and an obtaining module, where: The sending module 12 is further configured to send a list obtaining request to the server, where the list obtaining request includes the identification information of the application; The receiving module is configured to receive, through the system process, the intercepted list corresponding to the identification information sent by the server; The obtaining module is configured to, in the case where it is monitored that the application starts the WebView component for the first time, access the system process through the WebView component to obtain the intercepted list.
[0085] In one exemplary embodiment, the device further includes: a calling module, where: The intercepting module 13 is further configured to, in the case where an authorization instruction sent by the second terminal is received, intercept the target link in the application; The calling module is configured to call an external browser to display the page corresponding to the target link.
[0086] In one exemplary embodiment, the device further includes: a display module, where: The display module is configured to, in the case where a page switching instruction is received and it is determined that the page display mode corresponding to the type of the target link is a blank display mode, in response to the page switching instruction, display a blank page in the WebView component of the application.
[0087] In one exemplary embodiment, the display module is further configured to, in the case where a page switching instruction is received and it is determined that the page display mode corresponding to the type of the target link is a non - blank display mode, in response to the page switching instruction, display the target page in the WebView component of the application, where the target page is the page displayed by the WebView component before the page switching.
[0088] In one exemplary embodiment, the display module is specifically configured to call the back event through the application to display the target page in the WebView component of the application.
[0089] The device of this embodiment can be used to execute the method of any one of the method embodiments in the link interception method side. The specific implementation process and technical effects are similar to those in the method embodiments on the link interception method side. For details, please refer to the detailed introduction in the method embodiments on the link interception method side, which will not be elaborated here.
[0090] Figure 5 It is a schematic physical structure diagram of an electronic device provided by an embodiment of the present invention. As Figure 5 shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530, and a communication bus 540. Among them, the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call the logical instructions in the memory 530 to execute the link interception method, and the method includes: when receiving an access operation of a user to a target link in an application of the first terminal, determining whether the target link is an intercepted link of the application; when the target link is an intercepted link of the application, sending an authorization request to a second terminal; and intercepting the target link when not receiving an authorization instruction sent by the second terminal.
[0091] In addition, when the logical instructions in the above-mentioned memory 530 are implemented in the form of software function units and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc that can store program codes.
[0092] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the link interception method provided by each of the above methods. The method includes: when receiving an access operation of a user to a target link in an application program of the first terminal, determining whether the target link is an intercepted link of the application program; when the target link is an intercepted link of the application program, sending an authorization request to a second terminal; and when not receiving an authorization instruction sent by the second terminal, intercepting the target link.
[0093] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is configured to execute the link interception method provided by each of the above methods. The method includes: when receiving an access operation of a user to a target link in an application program of the first terminal, determining whether the target link is an intercepted link of the application program; when the target link is an intercepted link of the application program, sending an authorization request to a second terminal; and when not receiving an authorization instruction sent by the second terminal, intercepting the target link.
[0094] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative efforts.
[0095] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disc, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0096] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.< / map> < / map>
Claims
1. A link interception method, characterized in that: Applied to a first terminal, the method includes: In case of receiving an access operation of a user to a target link in an application of the first terminal, determining whether the target link is an interception link of the application; In case the target link is an interception link of the application, sending an authorization request to the second terminal; If the authorization instruction sent by the second terminal is not received, the target link is intercepted.
2. The link interception method according to claim 1, characterized in that: The determining whether the target link is an interception link of the application program includes: Matching the target link with each link in the interception list corresponding to the application; If there is a link that successfully matches the target link, determining that the target link is an interception link of the application; When there is no link that successfully matches the target link, it is determined that the target link is not an interception link of the application.
3. The link interception method according to claim 2, characterized in that: The method further comprises: Sending a list acquisition request to a server, wherein the list acquisition request includes identification information of the application; Receiving, through a system process, an interception list corresponding to the identification information sent by the server; When it is detected that the application starts the WebView component for the first time, the interception list is obtained by accessing the system process through the WebView component.
4. The link interception method according to claim 1, characterized in that: The method further comprises: When the authorization instruction sent by the second terminal is received, the target link is intercepted in the application, and an external browser is called to display a page corresponding to the target link.
5. The link interception method according to claim 4, characterized in that: After calling the external browser to display the page corresponding to the target link, the method further includes: When a page switching instruction is received and it is determined that the page display mode corresponding to the type of the target link is a blank display mode, a blank page is displayed in the WebView component of the application in response to the page switching instruction.
6. The link interception method according to claim 5, characterized in that: The method further comprises: When a page switching instruction is received and it is determined that the page display mode corresponding to the type of the target link is a non-blank display mode, in response to the page switching instruction, the target page is displayed in the WebView component of the application, and the target page is the page displayed by the WebView component before the page switching.
7. The link interception method according to claim 6, characterized in that: Displaying the target page in the WebView component of the application program includes: The back event is called by the application to display the target page in the WebView component of the application.
8. A link interception device, characterized in that: include: A determination module, configured to determine whether the target link is an interception link of the application program upon receiving an access operation of the user to the target link in the application program of the first terminal; a sending module, configured to send an authorization request to the second terminal when the target link is an interception link of the application; The interception module is used to intercept the target link when the authorization instruction sent by the second terminal is not received.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the link interception method according to any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the link interception method according to any one of claims 1 to 7 is implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the link interception method according to any one of claims 1 to 7 is implemented.