Page link replacement method and device

By obtaining and saving link replacement rules and dynamically replacing page links, the problem of difficult link fixation in the existing technology is solved, and rapid replacement and efficiency improvement is achieved.

CN112560399BActive Publication Date: 2025-01-14WIRELESS LIFE (HANGZHOU) INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011502380.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-18
Publication Date
2025-01-14
Estimated Expiration
2040-12-18

AI Technical Summary

Technical Problem

In the prior art, once the page link is fixed, it is difficult to control dynamically, resulting in the developer re-encoding and publishing of the page when the link fails, resulting in a long repair time and cannot be repaired in time.

Method used

By obtaining and saving the link replacement rule, when the link button is detected to be clicked, replace the link string to be replaced according to the replacement rule, jump to the new link, and realize dynamic link replacement.

Benefits of technology

There is no need for developers to recode and publish pages, and quickly replace old links with new links, improving development and operational efficiency and timely repairing link problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112560399B_ABST
    Figure CN112560399B_ABST
Patent Text Reader

Abstract

The present disclosure is about a method and device for replacing page links. The method includes: obtaining and saving link replacement rules; the link replacement rules include: a replacement relationship of link strings; when detecting that a link button in a page is clicked, obtaining a link string to be replaced in a link corresponding to the link button; replacing the link string to be replaced with a target link string according to the link replacement rules; and jumping to the replaced link. After a page is online, once it is found that a link in it needs to be replaced, the replacement rules can be used to quickly replace the old link with a new link, thereby eliminating the need for developers to recode and publish the page online, greatly improving development efficiency and operational efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method and device for replacing a page link. Background Art

[0002] In the Internet field, after a developed page is published, the links on the page are generally fixed. For example, after an active page is loaded, the link pointed to by a button on the page is fixed and difficult to control dynamically.

[0003] When the link on a button becomes invalid or inaccessible for some reason and needs to be replaced, the current common practice is: the developer recodes and replaces the old link with a new link; the developer republishes the page online.

[0004] However, this solution will cause the entire process of switching to a new link to take a long time to complete, and problems that occur online are difficult to fix in a timely manner. Summary of the invention

[0005] In order to overcome the problems existing in the related art, the embodiments of the present disclosure provide a method and device for replacing a page link. The technical solution is as follows:

[0006] According to a first aspect of an embodiment of the present disclosure, a method for replacing a page link is provided, comprising:

[0007] Obtaining and saving link replacement rules; the link replacement rules include: a replacement relationship of a link string;

[0008] When detecting that a link button in a page is clicked, obtaining a link string to be replaced in a link corresponding to the link button;

[0009] Replacing the link string to be replaced with a target link string according to the link replacement rule;

[0010] Jump to the replaced link.

[0011] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: The present disclosure provides a method for replacing a page link, including: obtaining and saving a link replacement rule; the link replacement rule includes: a replacement relationship of a link string; when detecting that a link button in a page is clicked, obtaining a link string to be replaced in a link corresponding to the link button; replacing the link string to be replaced with a target link string according to the link replacement rule; and jumping to the replaced link. After a page is launched, once it is found that a link in the page needs to be replaced, the replacement rule can be used to quickly replace the old link with a new link, thereby eliminating the need for developers to recode and publish the page online, greatly improving development efficiency and operational efficiency.

[0012] In one embodiment, the obtaining and saving of link replacement rules includes:

[0013] Obtaining the link replacement rule from the rule interface of the background configuration center at a preset time interval;

[0014] The saved link replacement rule is replaced by the most recently acquired link replacement rule.

[0015] In one embodiment, when detecting that a link button in a page is clicked, obtaining a link string to be replaced in a link corresponding to the link button includes:

[0016] When detecting that a link button in a page is clicked, detecting whether the link includes the link string to be replaced according to the link replacement rule;

[0017] If it is detected that the link includes the link string to be replaced, the link string to be replaced is obtained.

[0018] In one embodiment, if it is detected that the link includes the link string to be replaced, obtaining the link string to be replaced includes:

[0019] If it is detected that the link includes the link string to be replaced, the interception page jumps to the link;

[0020] Get the link string to be replaced.

[0021] According to a second aspect of an embodiment of the present disclosure, a device for replacing a page link is provided, including:

[0022] The first acquisition module is used to acquire and save link replacement rules; the link replacement rules include: a replacement relationship of a link string;

[0023] A second acquisition module is used to acquire the link string to be replaced in the link corresponding to the link button when detecting that the link button in the page is clicked;

[0024] A replacement module, used to replace the link string to be replaced with a target link string according to the link replacement rule;

[0025] Jump module, used to jump to the replaced link.

[0026] In one embodiment, the first acquisition module includes:

[0027] A first acquisition submodule, configured to acquire the link replacement rule from a rule interface of a background configuration center at a preset time interval;

[0028] The replacement submodule is used to replace the saved link replacement rule with the latest acquired link replacement rule.

[0029] In one embodiment, the second acquisition module includes:

[0030] A detection submodule, configured to detect whether the link includes the link string to be replaced according to the link replacement rule when detecting that a link button in the page is clicked;

[0031] The second acquisition submodule is configured to acquire the link string to be replaced if it is detected that the link includes the link string to be replaced.

[0032] In one embodiment, the second acquisition submodule includes:

[0033] An interception submodule, configured to intercept a page from jumping to the link if it is detected that the link includes the link string to be replaced;

[0034] The third acquisition submodule is used to acquire the link string to be replaced.

[0035] According to a third aspect of an embodiment of the present disclosure, a device for replacing a page link is provided, including:

[0036] processor;

[0037] a memory for storing processor-executable instructions;

[0038] Wherein, the processor is configured to:

[0039] Obtaining and saving link replacement rules; the link replacement rules include: a replacement relationship of a link string;

[0040] When detecting that a link button in a page is clicked, obtaining a link string to be replaced in a link corresponding to the link button;

[0041] Replacing the link string to be replaced with a target link string according to the link replacement rule;

[0042] Jump to the replaced link.

[0043] According to a fourth aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed by a processor, the steps of any one of the methods described in the first aspect are implemented.

[0044] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0046] Figure 1 It is a schematic diagram of a page according to an exemplary embodiment.

[0047] Figure 2 The figure is a flow chart of a method for replacing a page link according to an exemplary embodiment.

[0048] Figure 3 The figure is a flow chart of a method for replacing a page link according to an exemplary embodiment.

[0049] Figure 4 The figure is a flow chart of a method for replacing a page link according to an exemplary embodiment.

[0050] Figure 5 The figure is a flow chart of a method for replacing a page link according to an exemplary embodiment.

[0051] Figure 6 The figure is a flow chart of a method for replacing a page link according to an exemplary embodiment.

[0052] Figure 7 The invention is a block diagram of a device for replacing a page link according to an exemplary embodiment.

[0053] Figure 8 It is a block diagram of a first acquisition module in a device for replacing a page link according to an exemplary embodiment.

[0054] Fig. 9 It is a block diagram of a second acquisition module in a device for replacing a page link according to an exemplary embodiment.

[0055] Fig.10 It is a block diagram of a second acquisition submodule in a device for replacing a page link according to an exemplary embodiment.

[0056] Fig.11 It is a block diagram of a device 80 for replacing a page link according to an exemplary embodiment. DETAILED DESCRIPTION

[0057] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0058] In the Internet field, after the developed page is published, the links on the page are generally fixed. For example, after an activity page is loaded, the link pointed to by a button on the page is fixed and difficult to control dynamically. Figure 1 As shown, the "Go to Home Page" button link of this page has been determined when the page is loaded.

[0059] However, when the link on the button is invalid or inaccessible for some reason and needs to be replaced, the current common practice is:

[0060] 1. The developer recodes and replaces the old link with the new link;

[0061] 2. The developer republishes the page online;

[0062] 3. The user refreshes the page and clicks the button to jump to the new link.

[0063] However, the above existing technical solutions still have some inconveniences for users and poor user experience:

[0064] 1. If the link on the page is invalid or inaccessible, a new link needs to be switched, and the developer needs to redevelop and publish it;

[0065] 2. The entire process of switching to a new link takes a long time to complete, and problems that occur online are difficult to fix in a timely manner;

[0066] 3. Users of online pages need to refresh the page and click a button to access the new link.

[0067] In order to solve the above technical problem, the present disclosure provides a method for replacing a page link.

[0068] Figure 2 is a flow chart of a method for replacing a page link according to an exemplary embodiment. Figure 2 As shown, the method includes the following steps S101-S104:

[0069] In step S101, a link replacement rule is obtained and saved; the link replacement rule includes: a replacement relationship of a link character string.

[0070] After a page is launched, if you find that a link in it needs to be replaced, you can first set a link replacement rule and then issue the link replacement rule.

[0071] The link replacement rule includes: a replacement relationship of a link string;

[0072] The replacement rule may indicate that a specific string in the link is to be replaced, for example: replacing the link string A in the link with the link string B, and the link string at this time is the link string A and the link string B; or, the replacement rule may indicate that the entire link is to be replaced, for example: replacing https: / / www.weidian.com / shop-detail.html with https: / / www.weidian.com / new-shop-detail.html, and the link string at this time is the entire link.

[0073] In step S102, when it is detected that a link button in the page is clicked, a link string to be replaced in the link corresponding to the link button is obtained.

[0074] When a link button in a page is clicked, the link string to be replaced in the link corresponding to the link button will be obtained first, because the link string to be replaced is to be replaced by the target string.

[0075] In step S103, the link string to be replaced is replaced with the target link string according to the link replacement rule.

[0076] The target string to be replaced by the link string to be replaced is obtained according to the link replacement rule, and then the target string is used to replace the link string to be replaced in the link to form a new link.

[0077] In step S104, jump to the replaced link.

[0078] After the target string is used to replace the link string to be replaced in the link, the page starts to execute the jump action and jumps to the replaced new link.

[0079] At present, the widely used technical implementation method in the industry is that when developers or business operators find that some links in online pages need to be replaced, they usually need to recode and modify the links, publish the pages online, and the users refresh the pages. Then the links in the online pages become new links. In the present disclosure, after the page is online, once it is found that some links in the page need to be replaced, new replacement rules can be directly set in the developer's backend configuration center, and they will take effect online in real time, so that page developers do not need to recode and publish pages, which greatly improves the efficiency of development and business operations.

[0080] The present disclosure provides a method for replacing a page link, including: obtaining and saving a link replacement rule; the link replacement rule includes: a replacement relationship of a link string; when detecting that a link button in a page is clicked, obtaining a link string to be replaced in a link corresponding to the link button; replacing the link string to be replaced with a target link string according to the link replacement rule; and jumping to the replaced link. After a page is launched, once it is found that a link in the page needs to be replaced, the replacement rule can be used to quickly replace the old link with a new link, thereby eliminating the need for developers to recode and publish the page online, greatly improving development efficiency and operational efficiency.

[0081] In one embodiment, Figure 3 As shown, obtaining and saving link replacement rules includes the following sub-steps:

[0082] In step S1011, link replacement rules are obtained from the rule interface of the background configuration center at preset time intervals.

[0083] In step S1012, the saved link replacement rule is replaced with the latest acquired link replacement rule.

[0084] When the online page is loaded, it can request the rule interface of the background configuration center to obtain the link replacement rule and temporarily store the rule; the page will periodically request the rule interface of the background configuration center to obtain the latest replacement rule and temporarily store the rule.

[0085] Among them, the background configuration center is a management background, which can configure a series of link replacement rules. For example, it can be configured to change https: / / www.weidian.com / shop-detail.html to https: / / www.weidian.com / new-shop-detail.html; the rule interface is an interface, and the page can request the interface to obtain the link replacement rules from the background configuration center.

[0086] By regularly updating the saved replacement rules, users can jump to the latest link when they click the link button on the page, which effectively improves the user experience.

[0087] In one embodiment, Figure 4 As shown, when it is detected that a link button in a page is clicked, obtaining a link string to be replaced in a link corresponding to the link button includes the following sub-steps:

[0088] In step S1021, when it is detected that a link button in the page is clicked, it is detected according to the link replacement rule whether the link includes a link string to be replaced.

[0089] In step S1022, if it is detected that the link includes a link string to be replaced, the link string to be replaced is obtained.

[0090] When a link button in a page is clicked, it will first detect whether the link includes the link string to be replaced based on the link replacement rule. If it is detected that the link includes the link string to be replaced, the link string to be replaced will be obtained and the target link string will be used to replace the link string to be replaced. If it is not detected that the link includes the link string to be replaced, it will jump directly to the link corresponding to the link button.

[0091] In one embodiment, Figure 5 As shown, if it is detected that the link includes a link string to be replaced, obtaining the link string to be replaced includes the following sub-steps:

[0092] In step S10221, if it is detected that the link includes the link string to be replaced, the page is intercepted and jumped to the link;

[0093] In step S10222, the link string to be replaced is obtained.

[0094] If it is detected that the link includes the link string to be replaced, indicating that the link needs to be replaced with a new link, the program will first intercept the action of the page jumping to the link, and instead first obtain the link string to be replaced, and use the target link string to replace the link string to be replaced, and then jump to the replaced link.

[0095] In another embodiment, when a link button in a page is clicked, the program may firstly execute an action of intercepting the jump, and then execute a step of detecting whether the link includes the link string to be replaced.

[0096] By intercepting link jumps, we avoid jumping to invalid links and effectively improve the user experience.

[0097] The implementation process is described in detail below through several embodiments.

[0098] Figure 6 is a flow chart of a method for replacing a page link according to an exemplary embodiment. Figure 6 As shown, the method includes the following steps S201-S204:

[0099] In step 201, when the online page is loaded, a rule interface of the background configuration center is requested to obtain link replacement rules, and the rules are temporarily stored.

[0100] In step 202, the page will periodically request the rule interface of the background configuration center to obtain the latest replacement rules and temporarily store the rules.

[0101] In step 203, when the link button in the page is clicked, the program intercepts the jump action, and the program first obtains the link string A, and then replaces the link string A with a new link string B according to the defined rule through the link replacement rule obtained in 201.

[0102] In step 204, after 203 is completed, the page starts to execute the jump and jumps to the replaced new link.

[0103] Specifically, the present invention adopts a method of dynamically controlling page links. After a page is launched, once it is found that a link therein needs to be replaced, the old link can be replaced with a new link very quickly, without the need for the developer to recode and publish the page online, thereby greatly improving development efficiency and operational efficiency.

[0104] The method provided by the embodiment of the present invention can greatly improve the efficiency of web page developers in developing pages and the efficiency of page operators in operating services.

[0105] Furthermore, the technical solution provided by the present invention, by adopting the method of the present invention, page developers and page operators can quickly replace invalid links in online pages with new valid links through the same background configuration center, thereby greatly improving the efficiency of web page development and business operations.

[0106] The technical implementation method currently widely used in the industry is that when developers or business operations personnel find that certain links in online pages need to be replaced, they usually need to recode and modify the links, publish the pages online, and the users refresh the pages, and then the links in the online pages become new links.

[0107] Compared with the above scheme, the present invention has the following advantages:

[0108] 1. After the page is launched, if you find that some links on the page need to be replaced, you can directly set new replacement rules in the developer's backend configuration center, and they will take effect online in real time;

[0109] 2. Page developers do not need to recode or publish pages, which greatly improves development efficiency and business operation efficiency.

[0110] Web page developers can use the background configuration center and rule interface provided by the present disclosure to easily and quickly control the links that users jump to when they click buttons in the configuration center, thereby avoiding long-term losses caused by the failure of certain links due to various reasons.

[0111] Among them, page developers refer to technical personnel who develop web pages; business operations personnel refer to personnel who maintain the business, such as personnel who publish activities.

[0112] The following are embodiments of the apparatus of the present disclosure, which can be used to execute embodiments of the method of the present disclosure.

[0113] Figure 7 FIG. 1 is a block diagram of a device for replacing a page link according to an exemplary embodiment. Figure 7 As shown, the replacement devices linked to this page include:

[0114] The first acquisition module 11 is used to acquire and save link replacement rules; the link replacement rules include: a replacement relationship of a link string;

[0115] The second acquisition module 12 is used to acquire the link string to be replaced in the link corresponding to the link button when detecting that the link button in the page is clicked;

[0116] A replacement module 13, configured to replace the link string to be replaced with a target link string according to the link replacement rule;

[0117] The jump module 14 is used to jump to the replaced link.

[0118] In one embodiment, Figure 8 As shown, the first acquisition module 11 includes:

[0119] A first acquisition submodule 111 is used to acquire the link replacement rule from a rule interface of a background configuration center at a preset time interval;

[0120] The replacement submodule 112 is configured to replace the stored link replacement rule with the most recently acquired link replacement rule.

[0121] In one embodiment, Fig. 9 As shown, the second acquisition module 12 includes:

[0122] The detection submodule 121 is used to detect whether the link includes the link string to be replaced according to the link replacement rule when detecting that the link button in the page is clicked;

[0123] The second acquisition submodule 122 is configured to acquire the link string to be replaced if it is detected that the link includes the link string to be replaced.

[0124] In one embodiment, Fig.10 As shown, the second acquisition submodule 122 includes:

[0125] The interception submodule 1221 is used for intercepting the page jump to the link if it is detected that the link includes the link string to be replaced;

[0126] The third acquisition submodule 1222 is used to acquire the link string to be replaced.

[0127] According to a third aspect of an embodiment of the present disclosure, a device for replacing a page link is provided, including:

[0128] processor;

[0129] a memory for storing processor-executable instructions;

[0130] The processor is configured as follows:

[0131] Obtaining and saving link replacement rules; the link replacement rules include: a replacement relationship of a link string;

[0132] When detecting that a link button in a page is clicked, obtaining a link string to be replaced in a link corresponding to the link button;

[0133] Replacing the link string to be replaced with a target link string according to the link replacement rule;

[0134] Jump to the replaced link.

[0135] The above processor may also be configured to:

[0136] In one embodiment, the obtaining and saving of link replacement rules includes:

[0137] Obtaining the link replacement rule from the rule interface of the background configuration center at a preset time interval;

[0138] The saved link replacement rule is replaced by the most recently acquired link replacement rule.

[0139] In one embodiment, when detecting that a link button in a page is clicked, obtaining a link string to be replaced in a link corresponding to the link button includes:

[0140] When detecting that a link button in a page is clicked, detecting whether the link includes the link string to be replaced according to the link replacement rule;

[0141] If it is detected that the link includes the link string to be replaced, the link string to be replaced is obtained.

[0142] In one embodiment, if it is detected that the link includes the link string to be replaced, obtaining the link string to be replaced includes:

[0143] If it is detected that the link includes the link string to be replaced, the interception page jumps to the link;

[0144] Get the link string to be replaced.

[0145] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0146] Fig.11 1 is a block diagram of a device 80 for replacing a page link according to an exemplary embodiment, and the device is suitable for a terminal device. For example, the device 80 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0147] The device 80 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0148] The processing component 802 generally controls the overall operation of the device 80, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0149] The memory 804 is configured to store various types of data to support operations on the device 80. Examples of such data include instructions for any application or method operating on the device 80, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0150] The power supply component 806 provides power to the various components of the device 80. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 80.

[0151] The multimedia component 808 includes a screen that provides an output interface between the device 80 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 80 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0152] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 80 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0153] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0154] The sensor assembly 814 includes one or more sensors for providing various aspects of the status assessment of the device 80. For example, the sensor assembly 814 can detect the open / closed state of the device 80, the relative positioning of components, such as the display and keypad of the device 80, and the sensor assembly 814 can also detect the position change of the device 80 or a component of the device 80, the presence or absence of user contact with the device 80, the orientation or acceleration / deceleration of the device 80, and the temperature change of the device 80. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0155] The communication component 816 is configured to facilitate wired or wireless communication between the device 80 and other devices. The device 80 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0156] In an exemplary embodiment, the device 80 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above methods.

[0157] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 80 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0158] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the device 80, enables the device 80 to perform the above-mentioned page link replacement method, the method comprising:

[0159] Obtaining and saving link replacement rules; the link replacement rules include: a replacement relationship of a link string;

[0160] When detecting that a link button in a page is clicked, obtaining a link string to be replaced in a link corresponding to the link button;

[0161] Replacing the link string to be replaced with a target link string according to the link replacement rule;

[0162] Jump to the replaced link.

[0163] In one embodiment, the obtaining and saving of link replacement rules includes:

[0164] Obtaining the link replacement rule from the rule interface of the background configuration center at a preset time interval;

[0165] The saved link replacement rule is replaced by the most recently acquired link replacement rule.

[0166] In one embodiment, when detecting that a link button in a page is clicked, obtaining a link string to be replaced in a link corresponding to the link button includes:

[0167] When detecting that a link button in a page is clicked, detecting whether the link includes the link string to be replaced according to the link replacement rule;

[0168] If it is detected that the link includes the link string to be replaced, the link string to be replaced is obtained.

[0169] In one embodiment, if it is detected that the link includes the link string to be replaced, obtaining the link string to be replaced includes:

[0170] If it is detected that the link includes the link string to be replaced, the interception page jumps to the link;

[0171] Get the link string to be replaced.

[0172] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0173] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for replacing a page link, characterized in that: include: Get link replacement rules and save them; The link replacement rule includes: a replacement relationship of a link string; When detecting that a link button in a page is clicked, obtaining a link string to be replaced in a link corresponding to the link button; Replacing the link string to be replaced with a target link string according to the link replacement rule; Jump to the replaced link; Wherein, when detecting that a link button in a page is clicked, obtaining a link string to be replaced in a link corresponding to the link button includes: When detecting that a link button in a page is clicked, detecting whether the link includes the link string to be replaced according to the link replacement rule; If it is detected that the link includes the link string to be replaced, the page is intercepted and jumped to the link; Obtain the link string to be replaced; Alternatively, when it is detected that a link button in a page is clicked, a program is first executed to intercept the jump action, and then a detection is performed to determine whether the link includes the link string to be replaced; Obtaining the link replacement rule from the rule interface of the background configuration center at a preset time interval; Use the most recently acquired link replacement rule to replace the saved link replacement rule, wherein when the online page is loaded, request the rule interface of the background configuration center to obtain the link replacement rule, and temporarily store the link replacement rule, the page periodically requests the rule interface of the background configuration center to obtain the latest replacement rule, and temporarily stores the latest replacement rule.

2. A device for replacing a page link, characterized in that: include: A first acquisition module is used to acquire and save link replacement rules; The link replacement rule includes: a replacement relationship of a link string; A second acquisition module is used to acquire the link string to be replaced in the link corresponding to the link button when detecting that the link button in the page is clicked; A replacement module, used to replace the link string to be replaced with a target link string according to the link replacement rule; Jump module, used to jump to the replaced link; A detection submodule, configured to detect whether the link includes the link string to be replaced according to the link replacement rule when detecting that a link button in the page is clicked; An interception submodule, configured to intercept a page from jumping to the link if it is detected that the link includes the link string to be replaced; A third acquisition submodule is used to acquire the link string to be replaced; Alternatively, when it is detected that a link button in a page is clicked, a program is first executed to intercept the jump action, and then a detection is performed to determine whether the link includes the link string to be replaced; The first acquisition module includes: A first acquisition submodule, configured to acquire the link replacement rule from a rule interface of a background configuration center at a preset time interval; The replacement submodule is used to replace the saved link replacement rules with the most recently acquired link replacement rules, wherein when the online page is loaded, the rule interface of the background configuration center is requested to obtain the link replacement rules, and the link replacement rules are temporarily stored, and the page periodically requests the rule interface of the background configuration center to obtain the latest replacement rules, and temporarily stores the latest replacement rules.

3. A device for replacing a page link, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Obtaining and saving link replacement rules; the link replacement rules include: a replacement relationship of a link string; When detecting that a link button in a page is clicked, obtaining a link string to be replaced in a link corresponding to the link button; Replacing the link string to be replaced with a target link string according to the link replacement rule; Jump to the replaced link; Wherein, when detecting that a link button in a page is clicked, obtaining a link string to be replaced in a link corresponding to the link button includes: When detecting that a link button in a page is clicked, detecting whether the link includes the link string to be replaced according to the link replacement rule; If it is detected that the link includes the link string to be replaced, the page is intercepted and jumped to the link; Obtain the link string to be replaced; Alternatively, when it is detected that a link button in a page is clicked, a program is first executed to intercept the jump action, and then a detection is performed to determine whether the link includes the link string to be replaced; Obtaining the link replacement rule from the rule interface of the background configuration center at a preset time interval; The saved link replacement rule is replaced with the latest acquired link replacement rule, wherein: When the online page is loaded, request the rule interface of the background configuration center to obtain the link replacement rules. The link replacement rule is temporarily stored, and the page periodically requests the rule interface of the background configuration center. The latest replacement rule is obtained and temporarily stored.

4. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to claim 1 are implemented.

Citation Information

Patent Citations

  • Webpage skipping method and device

    CN110020237A

  • Webpage link skip processing method, computer device and storage medium

    CN110750741A