Method and device for safely skipping network display page and electronic equipment

By conducting domain name security compliance inspection, cross-site scripting attack detection and link length detection on target network links, the problem of the existing technology being unable to adapt to network display page link security inspection in complex application scenarios, and the ability to automatically detect and adapt to complex scenarios when the network display page jumps is realized.

CN119652612APending Publication Date: 2025-03-18DUXIAOMAN TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411800154.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The existing browser's own Location library cannot adapt to the security check of network display page links in complex application scenarios, and cannot effectively prevent cross-site scripting attacks and super-long links from jump failures.

Method used

By obtaining the target network link of the target network display page, domain name security compliance checks, cross-site scripting attack detection and link length detection are performed. If the detection is passed, the control network display page will jump to the target network display page; if the link length is too long, the super long parameters will be parsed, the compressed link will be converted into the target short link, and the jump will be performed.

Benefits of technology

It improves the network page jump tool's ability to check links in complex application scenarios, enhances the security of the application, and can automatically perform security detection of links on network display pages, adapting to security inspections in various complex application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119652612A_ABST
    Figure CN119652612A_ABST
Patent Text Reader

Abstract

The invention provides a safe jumping method and device for a network display page and electronic equipment, and the method comprises the steps: obtaining a target network link of a target network display page to which the target network display page needs to jump, and carrying out the domain name safety compliance detection, cross-site scripting attack detection and link length detection for the target network link, and controlling the network display page to jump from the current network display page to the target network display page under the condition that all the three items of detection are passed. According to the embodiment of the invention, domain name security compliance check, cross-site scripting attack detection and link length detection are added on the basis of a network display page jumping tool of an original browser, the capability of the network display page jumping tool for being suitable for complex scenes is improved and expanded, and the effect that when the network display page jumps, the network display page can be quickly and conveniently skipped can be realized. By means of the method, security detection is automatically carried out on the link of the network display page, an intermediate process does not need to be considered, and the method can adapt to security detection of the link of the network display page in various complex application scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security technology, and in particular to a method, device and electronic device for securely redirecting a network display page. Background Art

[0002] In the process of Internet application, network display page jump is an indispensable part of Internet application. It allows users to freely change in different display pages according to their needs, thereby improving the user experience. In some existing technologies, page jump is performed by calling the page jump tool provided by the browser. The industry names the page jump tool provided by the browser as Location library.

[0003] However, the existing browser's built-in Location library only supports the security check of the network display page link that is initially set, and cannot adapt to the security check of the network display page link in complex application scenarios. Summary of the invention

[0004] In view of this, the embodiments of the present application provide a method, device and electronic device for securely redirecting a network display page, so as to improve the ability of existing network page redirection tools to adapt to network display page link security checks in various complex application scenarios.

[0005] In a first aspect, an embodiment of the present application provides a method for securely redirecting a network display page, wherein the method comprises:

[0006] Obtaining a target network link of a target network display page, and performing a domain name security compliance check, a cross-site scripting attack detection, and a link length check on the target network link, wherein the target network display page is the network display page to be jumped to from the current network display page;

[0007] If the domain name security compliance check, the cross-site scripting attack detection and the link length detection are all passed, the network display page is controlled to jump from the current network display page to the target network display page; wherein, if the target network link length is less than a preset length threshold, the link length detection passes.

[0008] In some possible embodiments, if the domain name security compliance check and the cross-site scripting attack check pass, but the link length check fails, the method further includes:

[0009] Parsing the target network link to obtain each overlong parameter in the target network link;

[0010] Based on each of the overlong parameters, compressing the target network link and converting the target network link into a target short link;

[0011] According to the target short link, the network display page is controlled to jump from the current network display page to the target network display page.

[0012] In some possible embodiments, the method further includes:

[0013] Based on each of the over-length parameters, determine whether the target network link is a valid network link. If not, refuse to jump to the target network display page. If so, execute the step of compressing the target network link based on each of the over-length parameters and converting the target network link into a target short link.

[0014] In some possible embodiments, after the step of converting the target network link into a target short link, the method further includes:

[0015] Determine whether the link length of the target short link is less than the preset length threshold, and if not, refuse to jump to the target network display page.

[0016] In some possible embodiments, compressing the target network link based on each of the overlong parameters and converting the target network link into a target short link includes:

[0017] The link addresses corresponding to other network pages nested in the target network link and the nesting relationship between the target network link and other network pages are recorded, and the link addresses corresponding to other network pages nested in the target network link are deleted to obtain the target short link.

[0018] In some possible embodiments, controlling the network display page to jump from the current network display page to the target network display page according to the target short link includes:

[0019] Control the network display page to jump to the address corresponding to the target short link, and in response to the user's instruction to exit the target network display page, control the target network display page to jump to other nested network pages according to the recorded link addresses corresponding to other network pages nested in the target network link and the nested relationship between the target network link and other network pages.

[0020] In a second aspect, an embodiment of the present application provides a device for securely redirecting a network display page, wherein the device includes:

[0021] an acquisition module, used to acquire a target network link of a target network display page, and perform a domain name security compliance check, a cross-site scripting attack detection, and a link length detection on the target network link, wherein the target network display page is the network display page to be jumped to from the current network display page;

[0022] A detection and jump module is used to control the network display page to jump from the current network display page to the target network display page if the domain name security compliance check, the cross-site scripting attack detection and the link length detection are all passed; wherein, if the target network link length is less than a preset length threshold, the link length detection passes.

[0023] In a third aspect, an embodiment of the present application provides an electronic device, wherein the electronic device includes:

[0024] Processor; and

[0025] Memory for storing programs,

[0026] The program includes instructions, which, when executed by the processor, cause the processor to execute the method for securely jumping a network display page as described in the first aspect.

[0027] In a fourth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method for securely jumping a network display page described in the first aspect.

[0028] Beneficial effects of this application:

[0029] The present application provides a method, device and electronic device for securely jumping a network display page, wherein the method obtains a target network link of a target network display page to be jumped to, and performs a domain name security compliance check, a cross-site scripting attack detection and a link length detection on the target network link. When all three tests are passed, the network display page is controlled to jump from the current network display page to the target network display page. The embodiment of the present application is selected to add a domain name security compliance check, a cross-site scripting attack detection and a link length detection on the basis of the original browser's built-in network display page jump tool, so as to expand the ability of the network display page jump tool to be applicable to complex scenarios, so as to realize that when the network display page jumps, the link of the network display page is automatically security-checked by the method, without considering the intermediate process, and can adapt to the security check of the network display page link in various complex application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Further details, features and advantages of the present application are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:

[0031] Figure 1 A schematic diagram of a flow chart of a method for securely redirecting a network display page provided in an embodiment of the present application is shown;

[0032] Figure 2Another schematic diagram of a flow chart of a method for securely redirecting a network display page provided in an embodiment of the present application is shown;

[0033] Figure 3 A schematic diagram of the structure of a device for securely jumping a network display page provided in an embodiment of the present application is shown;

[0034] Figure 4 A structural block diagram of an exemplary electronic device that can be used to implement an embodiment of the present application is shown. DETAILED DESCRIPTION

[0035] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as being limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes and are not intended to limit the scope of protection of the present application.

[0036] It should be understood that the various steps described in the method implementation of the present application can be performed in different orders and / or performed in parallel. In addition, the method implementation may include additional steps and / or omit the steps shown. The scope of the present application is not limited in this respect.

[0037] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc. mentioned in this application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0038] It should be noted that the modifications of "one" and "plurality" mentioned in the present application are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0039] Before describing in detail the method, device, and electronic device for securely jumping a network display page provided by the present application, the application scenarios of the method, device, and electronic device for securely jumping a network display page provided by the embodiments of the present application are described first:

[0040] The network display page in the embodiment of the present application is any Internet page that is redirected based on a browser, wherein the type of browser can be a traditional browser or a browser built into an application. As a preferred application scenario, the browser is a browser built into an application, and the application obtains the network link corresponding to the network display page to be redirected by scanning a code, manually inputting, etc. The network link can be a hypertext protocol network link, or a unique address identifier URL customized by the developer.

[0041] For example, when a user is using an APP, by scanning a QR code, he can obtain the HTTP link contained in the QR code, such as http / / :aaaa.com. At this time, the built-in browser of the APP can access the network address corresponding to the link based on the HTTP protocol, thereby jumping to the display page corresponding to http / / :aaaa.com. In the traditional network display page jump method, the browser's built-in Location library will only perform a domain name security check on the http / / :aaaa.com link. As long as the domain name is safe, it will directly jump to the display page corresponding to http / / :aaaa.com, and will not carefully check whether other information except the domain name is safe. Therefore, the existing browser's built-in Location library cannot support the security check of the network display page link in complex application scenarios, which is likely to increase the information security risk of the application.

[0042] In view of this, the present application provides a method, device and electronic device for securely redirecting a network display page, so as to improve the adaptability of existing network page redirection tools to link security checks in various complex application scenarios and enhance the security of applications. In the first aspect, the present application provides a method for securely redirecting a network display page, which is applicable to any electronic device with the function of securely redirecting a network display page, including but not limited to personal mobile terminals, computers or servers, etc. Figure 1 As shown, the method comprises the following steps:

[0043] S11, obtaining a target network link of a target network display page, and performing a domain name security compliance check, a cross-site scripting attack detection, and a link length detection on the target network link, wherein the target network display page is the network display page to be jumped to from the current network display page;

[0044] S12. If the domain name security compliance check, the cross-site scripting attack detection and the link length detection are all passed, the network display page is controlled to jump from the current network display page to the target network display page; wherein, if the target network link length is less than a preset length threshold, the link length detection passes.

[0045] By selecting the embodiment of the present application, on the basis of the original browser's built-in network display page jump tool, domain name security compliance check, cross-site scripting attack detection and link length detection are added, so as to expand the ability of the network display page jump tool to apply to complex scenarios, so that when the network display page jumps, the link of the network display page is automatically security checked by means of this method, without considering the intermediate process, and can adapt to the security check of the network display page link in various complex application scenarios.

[0046] The above steps S11-S12 will be described in detail below with reference to specific examples:

[0047] In an embodiment of the present application, the target network display page refers to the network display page to be jumped to. For example, if the network display page currently browsed by the user is page A, and then the user scans a QR code, the QR code carries the network link address of page B, after scanning the QR code, it will automatically jump to page B without performing a security check, and page B is the target network display page. Among them, when executing step S11, obtaining the target network link of the target network display page can be to obtain the QR code scanned by the camera module, and read the information carried by the QR code to obtain the target network link. It can also be to obtain the link of the network display page clicked, input or checked by the user on the user interaction interface, and obtain the target network link passed by the user on the interaction interface.

[0048] In the embodiment of the present application, a network link specifically refers to a network access address, including an absolute unique address identifier URL or a relative unique address identifier URL, wherein the absolute unique address identifier URL displays the full path of the file, and the relative unique address identifier URL only describes a partial path. In the embodiment of the present application, a network link can be an internal network link or an external network link. Among them, internal and external depend on the definition of the application or software program. A network connection can be a hypertext link or an image hyperlink. The specific network link type can be flexibly defined according to the actual scenario, and this application does not strictly limit it.

[0049] Then, the target network link of the acquired target network display page is subjected to domain name security compliance check, cross-site scripting attack detection, and link length detection. Specifically, the acquired target network link is parsed, parameter information in the network link is obtained, and then detection is performed based on the parameter information. Specifically, as an implementation method, for the domain name security compliance check, the domain name configuration information in each parameter of the network link can be read, and the access domain name whitelist pre-set by the application or browser can be obtained. By matching the read domain name configuration information with the domain name configuration information in the access domain name whitelist, if the match is successful, the domain name security compliance check is passed, and if the match is unsuccessful, the domain name security compliance check is not passed.

[0050] As an implementation method, cross-site scripting attack detection can be Xss (Cross Site Scripting, referred to as XSS) detection, wherein Xss is a common network application security vulnerability. By utilizing the address bar parameters, the attacker injects the malicious script into the network display page, which is then executed by the browser. This security vulnerability easily leads to information leakage and malicious attacks. In an embodiment of the present application, the address bar parameters in the various parameters of the network link are read, and according to the address bar parameters, it is identified whether the characters of special attacks are contained, or, by reading the various parameters of the network link, it is identified whether the various parameters contain unsafe characters. If unsafe characters are contained, it is determined that the cross-site scripting attack detection fails. If invisible characters are contained in the various parameters, the invisible characters can be replaced with empty characters, and then it is determined whether special attack characters or unsafe characters are contained. If contained, it is determined that the cross-site scripting attack detection fails. As another implementation method, the Xss attack detection tool can be called, and the Xss attack detection tool automatically performs cross-site scripting attack detection on the target network link.

[0051] In an embodiment of the present application, the link length detection for the target network link is to detect the length of the entire target network link, specifically to detect whether the number of characters contained in the entire link exceeds a preset character number threshold. Among them, in some possible scenarios, the Location library that comes with the browser of the application only supports the jump of network links with limited length, and the processing resources required for overly long links are extremely high, which causes the network links of some network display pages to be too long to jump normally. In order to solve this problem, when dealing with an overlong target link, the embodiment of the present application does not directly refuse to jump, but processes the length of the target network link, reduces the dimension of the length of the target network link, and shortens the length of the target network link. Based on this, in some possible embodiments, if the domain name security compliance check and the cross-site scripting attack detection pass, but the link length detection fails, the method also includes the following steps:

[0052] S12-1, parsing the target network link to obtain each overlong parameter in the target network link;

[0053] S12-2, compressing the target network link based on each of the overlong parameters, and converting the target network link into a target short link;

[0054] S12-3. According to the target short link, control the network display page to jump from the current network display page to the target network display page.

[0055] In the embodiment of the present application, the network link is a long string of characters generated according to the specified protocol, and different fields of the characters correspond to different parameter meanings. For example, taking the above-mentioned http / / :aaaa.com as an example, http / / : indicates that the link is an HTTP hypertext link, and aaaa.com refers to the domain name to be accessed by the link. More complicatedly, if the network link is http / / :aaaa.com / url:bbb.con / desk, in addition to http / / : and aaaa.com, it also includes / url:bbb.con / desk, and the / url:bbb.con / desk represents the desktop of the access address bbb.con of another page. At this time, it can be understood that the desktop address of bbb.con is nested in the network link address of aaaa.com. In the embodiment of the present application, the target network link can be parsed according to the standard provisions of the protocol to which the network link belongs, and the characters carried in the target network link can be split to obtain fields representing different contents. Taking the HTTP hypertext protocol as an example, the hypertext link can be split into each field based on the slash / , and different fields correspond to an overlong parameter.

[0056] Based on the different super-long parameters obtained in S12-1, as an implementation method, the target network link can be compressed by determining the key super-long parameters and then deleting the non-key super-long parameters to obtain a target short link with fewer super-long parameters. Among them, the key super-long parameters and the non-key super-long parameters can be set as a key super-long parameter list and a non-key super-long parameter list according to the actual application scenario, and the corresponding key super-long parameters and non-key super-long parameters can be determined by matching the super-long parameters with the corresponding lists.

[0057] In some possible embodiments, the above step S12-2 may be implemented in the following manner:

[0058] The link addresses corresponding to other network pages nested in the target network link and the nesting relationship between the target network link and other network pages are recorded, and the link addresses corresponding to other network pages nested in the target network link are deleted to obtain the target short link.

[0059] For example, take the example of the network link http: / / :aaaa.com / url:bbb.con / desk. This network link is usually generated when the user jumps from the bbb.con desktop to the aaaa.com page. At this time, the user actually needs to visit aaaa.com, and bbb.com is not the target network display page for this visit. url: bbb.con / desk It is nested in the page link of http: / / :aaaa.com, but in actual situations, because the user visits too many network display pages, there will be many link addresses of other network display pages nested in the target network link of the target network display page. This causes the target network link length of the target network display page to exceed the access length specified by the browser, and it cannot be redirected normally. In this way, by identifying the link addresses corresponding to other network pages nested in the target network link and the specific nesting relationship, it is possible to determine the link address of the network display page that the user most recently visited before the target network display page, record the link address of the most recently visited network display page, retain the address of the target network cable display page, delete the remaining other information, and obtain the target short link.

[0060] Based on this, as an implementation mode, controlling the network display page to jump from the current network display page to the target network display page according to the target short link includes:

[0061] Control the network display page to jump to the address corresponding to the target short link, and in response to the user's instruction to exit the target network display page, control the target network display page to jump to other nested network pages according to the recorded link addresses corresponding to other network pages nested in the target network link and the nested relationship between the target network link and other network pages.

[0062] For example, if the current displayed page is page A, and the target network page to be jumped to is page a, but the target network link is that page a nests pages b, c, and d level by level, and after recording the link addresses of pages b, c, and d in the above manner, only the address of page a is retained to obtain the target short link, and then the current displayed page A is controlled to jump to the address of page a. If the subsequent user triggers the exit of page a during the process of accessing page a, the previously recorded nested relationship will be called to jump the page from page a to page b. By analogy, if the user triggers the exit of page b during the process of accessing page b, the nested relationship will continue to be called to jump the page from page b to page c.

[0063] As another implementation, the target network link can be compressed by converting long and short fields. Exemplarily, a hash algorithm is used to calculate a hash value for each field corresponding to each overlong parameter, and the calculated hash value is used to represent the original overlong parameter, and each hash value constitutes the corresponding target short link. In this way, when the control page jumps, the page can be directly controlled according to the target short link to jump to the network display page corresponding to the target short link.

[0064] In some possible embodiments, the method provided by the present application further includes the following steps:

[0065] Based on each of the over-length parameters, determine whether the target network link is a valid network link. If not, refuse to jump to the target network display page. If so, execute the step of compressing the target network link based on each of the over-length parameters and converting the target network link into a target short link.

[0066] In some possible embodiments, after the above step S12-2, the method provided by the present application further includes the following steps:

[0067] Determine whether the link length of the target short link is less than the preset length threshold, and if not, refuse to jump to the target network display page.

[0068] Specifically, Figure 2As shown, first adopt the related detection methods described above regarding domain name security compliance check and cross-site scripting attack detection. After both are detected and passed, start to detect the length of the target network link. When the link length detection fails, obtain all over-length parameters in the target network link. Based on the over-length parameters, determine whether the original target network link is a valid network link. Specifically, you can check the link format, determine the link status code, try to send an HTTP request, etc. to determine whether the target network link is a valid network link.

[0069] If so, continue to compress the parameters into network link parameters. Specifically, the key over-long parameters can be retained, and non-key over-long parameters can be deleted. The parameters of the network link are compressed to obtain the target short link, and then it is determined whether the target short link is still over-long. If not, the compressed over-long parameters can be assembled and spliced, and the page jump can be controlled.

[0070] During the process, if the domain security compliance check and cross-site scripting attack detection fail, the page jump will be rejected and a reminder message will be output. Or it will jump to an error page to remind the user that the detection failed. If the domain security compliance check and cross-site scripting attack detection pass, but the link length detection fails, and during the detection of long links, all over-long parameters are not valid network links, or the compressed target short link is still over-long, the page jump will be rejected and a reminder message will be output. Or it will jump to an error page to remind the user that the detection failed.

[0071] In this way, poorly secure or invalid network links can be quickly processed, effectively reducing network attacks, shortening user waiting time and effectively protecting user experience.

[0072] In an embodiment of the present application, the execution logic code corresponding to the method provided in the present application can be packaged into the Location library in the browser to implement iterative updates of the Location library that comes with the existing browser, thereby improving the browser's ability to perform security checks on links corresponding to network display pages when executing network display page jumps, reducing malicious attacks, and improving the system security of the software program or application to which the entire browser belongs.

[0073] In a second aspect, the present application provides a device for safely redirecting a network display page, wherein: Figure 3 As shown, the device 30 comprises:

[0074] The acquisition module 301 is used to acquire a target network link of a target network display page, and perform a domain name security compliance check, a cross-site scripting attack detection, and a link length detection on the target network link, wherein the target network display page is the network display page to be jumped to from the current network display page;

[0075] The detection and jump module 302 is used to control the network display page to jump from the current network display page to the target network display page if the domain name security compliance check, the cross-site scripting attack detection and the link length detection are all passed; wherein, if the target network link length is less than a preset length threshold, the link length detection passes.

[0076] In some possible embodiments, the detection and jump module is further used to:

[0077] If the domain name security compliance check and the cross-site scripting attack detection pass, but the link length detection fails, parsing the target network link to obtain each overlength parameter in the target network link;

[0078] Based on each of the overlong parameters, compressing the target network link and converting the target network link into a target short link;

[0079] According to the target short link, the network display page is controlled to jump from the current network display page to the target network display page.

[0080] In some possible embodiments, the detection and jump module is further used to:

[0081] Based on each of the over-length parameters, determine whether the target network link is a valid network link. If not, refuse to jump to the target network display page. If so, execute the step of compressing the target network link based on each of the over-length parameters and converting the target network link into a target short link.

[0082] In some possible embodiments, the detection and jump module is further used to:

[0083] The link addresses corresponding to other network pages nested in the target network link and the nesting relationship between the target network link and other network pages are recorded, and the link addresses corresponding to other network pages nested in the target network link are deleted to obtain the target short link.

[0084] In some possible embodiments, the detection and jump module is further used to:

[0085] Control the network display page to jump to the address corresponding to the target short link, and in response to the user's instruction to exit the target network display page, control the target network display page to jump to other nested network pages according to the recorded link addresses corresponding to other network pages nested in the target network link and the nested relationship between the target network link and other network pages.

[0086] Among them, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in this application are in compliance with the relevant laws and regulations and do not violate public order and good morals.

[0087] The names of the messages or information exchanged between multiple devices in the embodiments of the present application are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0088] In a third aspect, the exemplary embodiments of the present application further provide an electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program that can be executed by the at least one processor, and the computer program is used to enable the electronic device to perform a method according to an embodiment of the present application when executed by the at least one processor.

[0089] The exemplary embodiment of the present application further provides a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to perform a method according to an embodiment of the present application.

[0090] The exemplary embodiments of the present application further provide a computer program product, including a computer program, wherein when the computer program is executed by a processor of a computer, it is used to enable the computer to execute the method according to the embodiment of the present application.

[0091] refer to Figure 4 , the structural block diagram of the electronic device 400 that can be used as the server or client of the present application will now be described, which is an example of the hardware device that can be applied to various aspects of the present application. The electronic device is intended to represent various forms of digital electronic computer equipment, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples, and are not intended to limit the implementation of the present application described and / or required herein.

[0092] like Figure 4As shown, the electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 can also be stored. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0093] A plurality of components in the electronic device 400 are connected to the I / O interface 405, including: an input unit 406, an output unit 407, a storage unit 408, and a communication unit 409. The input unit 406 may be any type of device capable of inputting information to the electronic device 400, and the input unit 406 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 407 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 408 may include, but is not limited to, a disk, an optical disk. The communication unit 409 allows the electronic device 400 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0094] The computing unit 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 401 performs the various methods and processes described above. For example, in some embodiments, the aforementioned method of network display page security jump may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 400 via ROM 402 and / or communication unit 409. In some embodiments, the computing unit 401 may be configured to perform the aforementioned network display page security jump method by any other appropriate means (e.g., by means of firmware).

[0095] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0096] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0097] As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0098] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0099] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0100] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

Claims

1. A method for safely redirecting a network display page, characterized in that: The method comprises: Obtaining a target network link of a target network display page, and performing a domain name security compliance check, a cross-site scripting attack detection, and a link length check on the target network link, wherein the target network display page is the network display page to be jumped to from the current network display page; If the domain name security compliance check, the cross-site scripting attack detection and the link length detection are all passed, the network display page is controlled to jump from the current network display page to the target network display page; wherein, if the target network link length is less than a preset length threshold, the link length detection passes.

2. The method according to claim 1, characterized in that If the domain name security compliance check and the cross-site scripting attack check pass, but the link length check fails, the method further includes: Parsing the target network link to obtain each overlong parameter in the target network link; Based on each of the overlong parameters, compressing the target network link and converting the target network link into a target short link; According to the target short link, the network display page is controlled to jump from the current network display page to the target network display page.

3. The method according to claim 2, characterized in that The method further comprises: Based on each of the over-length parameters, determine whether the target network link is a valid network link. If not, refuse to jump to the target network display page. If so, execute the step of compressing the target network link based on each of the over-length parameters and converting the target network link into a target short link.

4. The method according to claim 2, characterized in that: After the step of converting the target network link into a target short link, the method further includes: Determine whether the link length of the target short link is less than the preset length threshold, and if not, refuse to jump to the target network display page.

5. The method according to claim 2, characterized in that: The step of compressing the target network link based on each of the overlong parameters and converting the target network link into a target short link includes: The link addresses corresponding to other network pages nested in the target network link and the nesting relationship between the target network link and other network pages are recorded, and the link addresses corresponding to other network pages nested in the target network link are deleted to obtain the target short link.

6. The method according to claim 5, characterized in that According to the target short link, controlling the network display page to jump from the current network display page to the target network display page includes: Control the network display page to jump to the address corresponding to the target short link, and in response to the user's instruction to exit the target network display page, control the target network display page to jump to other nested network pages according to the recorded link addresses corresponding to other network pages nested in the target network link and the nested relationship between the target network link and other network pages.

7. A device for safely redirecting a network display page, characterized in that: The device comprises: an acquisition module, used to acquire a target network link of a target network display page, and perform a domain name security compliance check, a cross-site scripting attack detection, and a link length detection on the target network link, wherein the target network display page is the network display page to be jumped to from the current network display page; A detection and jump module is used to control the network display page to jump from the current network display page to the target network display page if the domain name security compliance check, the cross-site scripting attack detection and the link length detection are all passed; wherein, if the target network link length is less than a preset length threshold, the link length detection passes.

8. The device according to claim 7, characterized in that The detection and jump module is also used for: If the domain name security compliance check and the cross-site scripting attack detection pass, but the link length detection fails, parsing the target network link to obtain each overlength parameter in the target network link; Based on each of the overlong parameters, compressing the target network link and converting the target network link into a target short link; According to the target short link, control the network display page to jump from the current network display page to the target network display page; Based on each of the overlong parameters, determine whether the target network link is a valid network link, if not, refuse to jump to the target network display page, and if so, perform the step of compressing the target network link based on each of the overlong parameters and converting the target network link into a target short link; The step of compressing the target network link based on each of the overlong parameters and converting the target network link into a target short link includes: Recording the link addresses corresponding to other web pages nested in the target web link and the nesting relationship between the target web link and other web pages, and deleting the link addresses corresponding to other web pages nested in the target web link to obtain the target short link; According to the target short link, controlling the network display page to jump from the current network display page to the target network display page includes: Control the network display page to jump to the address corresponding to the target short link, and in response to the user's instruction to exit the target network display page, control the target network display page to jump to other nested network pages according to the recorded link addresses corresponding to other network pages nested in the target network link and the nested relationship between the target network link and other network pages.

9. An electronic device, characterized in that: The electronic device comprises: Processor; and Memory for storing programs, The program includes instructions, which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 6.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to make a computer execute the method according to any one of claims 1-6.