CN112560399A - Page link replacement method and device - Google Patents

Page link replacement method and device Download PDF

Info

Publication number
CN112560399A
CN112560399A CN202011502380.0A CN202011502380A CN112560399A CN 112560399 A CN112560399 A CN 112560399A CN 202011502380 A CN202011502380 A CN 202011502380A CN 112560399 A CN112560399 A CN 112560399A
Authority
CN
China
Prior art keywords
link
replaced
character string
page
replacing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011502380.0A
Other languages
Chinese (zh)
Inventor
刘远洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wireless Life Hangzhou Information Technology Co ltd
Original Assignee
Wireless Life Hangzhou Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wireless Life Hangzhou Information Technology Co ltd filed Critical Wireless Life Hangzhou Information Technology Co ltd
Priority to CN202011502380.0A priority Critical patent/CN112560399A/en
Publication of CN112560399A publication Critical patent/CN112560399A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/126Character encoding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure relates to a method and a device for replacing page links. The method comprises the following steps: acquiring and storing a link replacement rule; the link replacement rule includes: a replacement relationship of the link string; when detecting that a link button in a page is clicked, acquiring a link character string to be replaced in a link corresponding to the link button; replacing the link character string to be replaced with a target link character string according to the link replacement rule; and jumping to the replaced link. After the page is on line, once the link in the page needs to be replaced, the old link can be replaced by the new link by using the replacement rule quickly, so that a developer does not need to re-encode and release the page on line, and the development efficiency and the operation efficiency are greatly improved.

Description

Page link replacement method and device
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for replacing a page link.
Background
In the internet field, after a developed page is published, links on the page are generally fixed, for example, after an active page is loaded, a chain pointed to by a certain button in the page is fixed, and is difficult to dynamically control.
When a link on a button fails or is inaccessible for some reason and needs to be replaced, it is currently common practice to: the developer recodes and changes the old link into a new link; the developer re-publishes the page onto the line.
However, the scheme can cause that the time consumption for completing the whole process of switching the new link is long, and the problems on the line are difficult to repair in time.
Disclosure of Invention
In order to overcome the problems in the related art, the embodiments of the present disclosure provide a method and an apparatus for replacing a page link. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a method for replacing a page link, including:
acquiring and storing a link replacement rule; the link replacement rule includes: a replacement relationship of the link string;
when detecting that a link button in a page is clicked, acquiring a link character string to be replaced in a link corresponding to the link button;
replacing the link character string to be replaced with a target link character string according to the link replacement rule;
and jumping to the replaced link.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the present disclosure provides a method for replacing a page link, including: acquiring and storing a link replacement rule; the link replacement rule includes: a replacement relationship of the link string; when detecting that a link button in a page is clicked, acquiring a link character string to be replaced in a link corresponding to the link button; replacing the link character string to be replaced with a target link character string according to the link replacement rule; and jumping to the replaced link. After the page is on line, once the link in the page needs to be replaced, the old link can be replaced by the new link by using the replacement rule quickly, so that a developer does not need to re-encode and release the page on line, and the development efficiency and the operation efficiency are greatly improved.
In one embodiment, the obtaining and storing the link replacement rule includes:
acquiring the link replacement rule from a rule interface of a background configuration center according to a preset time interval;
and replacing the saved link replacement rule with the newly acquired link replacement rule.
In an embodiment, the acquiring a link character string to be replaced in a link corresponding to a link button when the link button in a page is detected to be clicked includes:
when detecting that a link button in a page is clicked, detecting whether the link comprises the link character string to be replaced according to the link replacement rule;
and if the link is detected to comprise the link character string to be replaced, acquiring the link character string to be replaced.
In an embodiment, the obtaining the link character string to be replaced if it is detected that the link includes the link character string to be replaced includes:
if the link is detected to comprise the link character string to be replaced, intercepting a page to jump to the link;
and acquiring the link character string to be replaced.
According to a second aspect of the embodiments of the present disclosure, there is provided a page link replacing apparatus, including:
the first acquisition module is used for acquiring and storing the link replacement rule; the link replacement rule includes: a replacement relationship of the link string;
the second acquisition module is used for acquiring a link character string to be replaced in a link corresponding to a link button when the link button in the page is detected to be clicked;
the replacing module is used for replacing the link character string to be replaced with a target link character string according to the link replacing rule;
and the skipping module is used for skipping to the replaced link.
In one embodiment, the first obtaining module comprises:
the first obtaining submodule is used for obtaining the link replacement rule from a rule interface of a background configuration center according to a preset time interval;
and the replacing submodule is used for replacing the saved link replacing rule with the link replacing rule which is obtained latest.
In one embodiment, the second obtaining module includes:
the detection submodule is used for detecting whether the link comprises the link character string to be replaced according to the link replacement rule when detecting that a link button in a page is clicked;
and the second obtaining submodule is used for obtaining the link character string to be replaced if the link is detected to comprise the link character string to be replaced.
In one embodiment, the second obtaining sub-module includes:
the intercepting submodule is used for intercepting a page to jump to the link if the link is detected to comprise the link character string to be replaced;
and the third obtaining submodule is used for obtaining the link character string to be replaced.
According to a third aspect of the embodiments of the present disclosure, there is provided a replacement apparatus for a page link, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring and storing a link replacement rule; the link replacement rule includes: a replacement relationship of the link string;
when detecting that a link button in a page is clicked, acquiring a link character string to be replaced in a link corresponding to the link button;
replacing the link character string to be replaced with a target link character string according to the link replacement rule;
and jumping to the replaced link.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the steps of the method of any one of the first aspects.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
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 disclosure.
FIG. 1 is a schematic diagram of a page shown in accordance with an exemplary embodiment.
FIG. 2 is a flowchart illustrating an alternative method of page linking according to an exemplary embodiment.
FIG. 3 is a flowchart illustrating an alternative method of page linking according to an exemplary embodiment.
FIG. 4 is a flowchart illustrating an alternative method of page linking according to an exemplary embodiment.
FIG. 5 is a flowchart illustrating an alternative method of page linking according to an exemplary embodiment.
FIG. 6 is a flowchart illustrating an alternative method of page linking according to an exemplary embodiment.
FIG. 7 is a block diagram illustrating an alternative means of page linking according to an exemplary embodiment.
FIG. 8 is a block diagram illustrating a first acquisition module in an alternative apparatus for page linking according to an example embodiment.
FIG. 9 is a block diagram illustrating a second acquisition module in an alternative apparatus for page linking according to an example embodiment.
Fig. 10 is a block diagram illustrating a second acquisition sub-module in the alternative apparatus of page linking according to an example embodiment.
FIG. 11 is a block diagram illustrating an alternative apparatus 80 for page linking according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In the internet field, after a developed page is published, links on the page are generally fixed, for example, after an active page is loaded, a link pointed by a certain button in the page is fixed and is difficult to be dynamically controlled, as shown in fig. 1, a link of a button of the page, which is "calling out and strolling through the first page", is determined when the page is loaded.
However, when a link on a button fails or is inaccessible for some reason and needs to be replaced, it is currently common practice to:
1. the developer recodes and changes the old link into a new link;
2. the developer re-publishes the page to the line;
3. the user refreshes the page and clicks a button to jump to a new link.
However, the above prior art solution still has a place that is not convenient and has a poor experience for the user:
1. if the link in the page is invalid or cannot be accessed, a new link needs to be switched, and a developer needs to develop and release the new link again;
2. the whole process of switching the new link is long in time consumption, and the problems on the line are difficult to repair in time;
3. the user of the online page needs to refresh the page and click a button to access the new link.
In order to solve the technical problem, the present disclosure provides a method for replacing a page link.
FIG. 2 is a flowchart illustrating an alternative method of page linking according to an exemplary embodiment, as shown in FIG. 2, including the following steps S101-S104:
in step S101, a link replacement rule is acquired and saved; the link replacement rule includes: alternate relationships of the link strings.
After the page is on line, once the link in the page needs to be replaced, a link replacement rule can be set first, and then the link replacement rule is issued.
The link replacement rule includes: a replacement relationship of the link string;
the replacement rule may indicate that a particular string in the link is to be replaced, for example: replacing the link character string A in the link with a link character string B, wherein the link character string at the moment is the link character string A and the link character string B; alternatively, the replacement rule may indicate that the entire link is replaced, for example: html is replaced by https:// www.weidian.com/new-shop-detail.html, and the link character string at the moment is the whole link.
In step S102, when it is detected that a link button in a page is clicked, a link character string to be replaced in a link corresponding to the link button is acquired.
When a link button in a page is clicked, a link character string to be replaced in a link corresponding to the link button is acquired first, because the link character string to be replaced is to be replaced by a target character string.
In step S103, the link character string to be replaced is replaced with the target link character string according to the link replacement rule.
And acquiring a target character string to be replaced of the link character string to be replaced according to the link replacement rule, and replacing the link character string to be replaced in the link by using the target character string to form a new link.
In step S104, a jump is made to the replaced link.
After replacing the link string to be replaced in the link with the target string, the page starts to execute the jump action and jumps to the replaced new link.
In the technical implementation mode widely used in the industry at present, when a developer or a service operator finds that some links in an online page need to be replaced, the links are generally recoded and modified, the page is published to the online, a user refreshes the page, and then the links in the online page become new links
The present disclosure provides a method for replacing a page link, including: acquiring and storing a link replacement rule; the link replacement rule includes: a replacement relationship of the link string; when detecting that a link button in a page is clicked, acquiring a link character string to be replaced in a link corresponding to the link button; replacing the link character string to be replaced with a target link character string according to the link replacement rule; and jumping to the replaced link. After the page is on line, once the link in the page needs to be replaced, the old link can be replaced by the new link by using the replacement rule quickly, so that a developer does not need to re-encode and release the page on line, and the development efficiency and the operation efficiency are greatly improved.
In one embodiment, as shown in FIG. 3, obtaining and saving the link replacement rule includes the following sub-steps:
in step S1011, a link replacement rule is obtained from a rule interface of the background configuration center at preset time intervals.
In step S1012, the link replacement rule that has been saved is replaced with the newly acquired link replacement rule.
When the online page is loaded, a rule interface of a background configuration center can be requested, a link replacement rule is obtained, and the rule is temporarily stored; the page regularly requests a rule interface of the background configuration center, acquires the latest replacement rule and temporarily stores the rule.
The background configuration center is a management background, the background can be configured with a series of link replacement rules, for example, https:// www.weidian.com/shop-detail.html can be configured to be modified into https:// www.weidian.com/new-shop-detail.html; the rule interface is an interface, and the page can request the interface to acquire the linked replacement rule from the background configuration center.
By regularly updating the stored replacement rule, the user can jump the page to the latest link when clicking the link button in the page, and the user experience is effectively improved.
In one embodiment, as shown in fig. 4, when it is detected that a link button in a page is clicked, a link character string to be replaced in a link corresponding to the link button is obtained, including the following sub-steps:
in step S1021, upon detecting that the link button in the page is clicked, it is detected whether a link character string to be replaced is included in the link according to the link replacement rule.
In step S1022, if it is detected that the link includes the link character string to be replaced, the link character string to be replaced is acquired.
When a link button in a page is clicked, whether a link character string to be replaced is included in a link is detected based on a link replacement rule, if the link character string to be replaced is detected to be included in the link, the link character string to be replaced is obtained, the link character string to be replaced is replaced by a target link character string, and if the link character string to be replaced is not detected to be included in the link, a link corresponding to the link button is directly jumped to.
In an embodiment, as shown in fig. 5, if it is detected that the link includes the link character string to be replaced, the method obtains the link character string to be replaced, and includes the following sub-steps:
in step S10221, if it is detected that the link includes a link string to be replaced, intercepting the page to jump to the link;
in step S10222, a link character string to be replaced is acquired.
If the link is detected to include the link character string to be replaced, which indicates that the link needs to be replaced by a new link, the program intercepts the action of page jump to the link, but acquires the link character string to be replaced first, replaces the link character string to be replaced by the target link character string, and jumps to the replaced link.
In another embodiment, when the link button in the page is clicked, the action of intercepting the jump by the program can be executed first, and then the step of detecting whether the link character string to be replaced is included in the link is executed.
By intercepting the link jump, the jump to the invalid link is avoided, and the user experience is effectively improved.
The implementation is described in detail below by way of several embodiments.
FIG. 6 is a flowchart illustrating an alternative method of page linking, as shown in FIG. 6, according to an exemplary embodiment, including the following steps S201-S204:
in step 201, when the online page is loaded, a rule interface of the background configuration center is requested, a link replacement rule is acquired, and the rule is temporarily stored.
In step 202, the page will periodically request the rule interface of the background configuration center, obtain the latest replacement rule, and temporarily store the rule.
In step 203, when the link button in the page is clicked, the program intercepts the jump action, the program will first obtain the link character string a, and then replace the link character string a with a new link character string B according to the defined rule through the link replacement rule obtained in step 201.
The page does not start executing the jump until 203 is completed in step 204 and jumps to the new link that was replaced.
Specifically, according to the method for dynamically controlling the page link, after the page is on line, once the link in the page needs to be replaced, the old link can be replaced by the new link quickly without recoding and releasing the page to the line by a developer, and therefore development efficiency and operation efficiency are greatly improved.
The method provided by the embodiment of the invention can greatly improve the efficiency of developing the page by the webpage developer and the efficiency of operating the business by the page operator.
Furthermore, according to the technical scheme provided by the invention, by adopting the method provided by the invention, a page developer and a page operator can quickly replace an invalid link in an online page with a new effective link through the same background configuration center, so that the webpage development efficiency and the service operation efficiency are greatly improved.
The technical implementation method widely used in the industry at present is that when a developer or a service operator finds that some links in an online page need to be replaced, the developer or the service operator generally re-encodes and modifies the links, publishes the page to the online, refreshes the page by a user, and then the links in the online page become new links.
Compared with the scheme, the invention has the following advantages:
1. after the page is online, once some links in the page need to be replaced, a new replacement rule can be directly set in a background configuration center of a developer and takes effect on line in real time;
2. the page developer does not need to re-encode and release the page, and the development efficiency and the service operation efficiency are greatly improved.
The webpage developer can use the background configuration center and the rule interface provided by the disclosure, can easily and quickly control the links where the user clicks the button to jump to in the configuration center, and avoids long-time loss of some links caused by invalidation of various reasons.
Wherein, the page developer refers to a technician who develops the web page; service operators refer to personnel who maintain services, such as personnel who issue activities.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods.
FIG. 7 is a block diagram illustrating an alternative apparatus for page linking according to an example embodiment. As shown in fig. 7, the page link replacing means includes:
the first obtaining module 11 is configured to obtain and store a link replacement rule; the link replacement rule includes: a replacement relationship of the link string;
the second obtaining module 12 is configured to, when it is detected that a link button in a page is clicked, obtain a link character string to be replaced in a link corresponding to the link button;
a replacing module 13, configured to replace the link character string to be replaced with a target link character string according to the link replacement rule;
and a skipping module 14 for skipping to the replaced link.
In one embodiment, as shown in fig. 8, the first obtaining module 11 includes:
the first obtaining submodule 111 is configured to obtain the link replacement rule from a rule interface of a background configuration center according to a preset time interval;
a replacement submodule 112, configured to replace the saved link replacement rule with the link replacement rule obtained most recently.
In one embodiment, as shown in fig. 9, the second obtaining module 12 includes:
the detection submodule 121 is configured to detect, when it is detected that a link button in a page is clicked, whether the link includes the link character string to be replaced according to the link replacement rule;
the second obtaining sub-module 122 is configured to obtain the link character string to be replaced if it is detected that the link includes the link character string to be replaced.
In one embodiment, as shown in fig. 10, the second obtaining sub-module 122 includes:
the intercepting submodule 1221, configured to intercept that a page jumps to the link if it is detected that the link includes the link character string to be replaced;
a third obtaining submodule 1222, configured to obtain the link string to be replaced.
According to a third aspect of the embodiments of the present disclosure, there is provided a replacement apparatus for a page link, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring and storing a link replacement rule; the link replacement rule includes: a replacement relationship of the link string;
when detecting that a link button in a page is clicked, acquiring a link character string to be replaced in a link corresponding to the link button;
replacing the link character string to be replaced with a target link character string according to the link replacement rule;
and jumping to the replaced link.
The processor may be further configured to:
in one embodiment, the obtaining and storing the link replacement rule includes:
acquiring the link replacement rule from a rule interface of a background configuration center according to a preset time interval;
and replacing the saved link replacement rule with the newly acquired link replacement rule.
In an embodiment, the acquiring a link character string to be replaced in a link corresponding to a link button when the link button in a page is detected to be clicked includes:
when detecting that a link button in a page is clicked, detecting whether the link comprises the link character string to be replaced according to the link replacement rule;
and if the link is detected to comprise the link character string to be replaced, acquiring the link character string to be replaced.
In an embodiment, the obtaining the link character string to be replaced if it is detected that the link includes the link character string to be replaced includes:
if the link is detected to comprise the link character string to be replaced, intercepting a page to jump to the link;
and acquiring the link character string to be replaced.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 11 is a block diagram illustrating an alternative apparatus 80 for page linking, which is suitable for a terminal device, according to an exemplary embodiment. For example, the apparatus 80 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
The apparatus 80 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the device 80, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 80. Examples of such data include instructions for any application or method operating on the device 80, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices 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 or optical disks.
The power supply component 806 provides power to the various components of the device 80. The power components 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.
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 an input signal from a 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 boundary of a 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 facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 80 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 80 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 80. For example, the sensor assembly 814 may detect the open/closed status of the device 80, the relative positioning of the components, such as a display and keypad of the device 80, the change in position 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 change in temperature of the device 80. 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 a light 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 acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the apparatus 80 and other devices. The device 80 may 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 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 80 may 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, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the apparatus 80 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium, wherein instructions, when executed by a processor of an apparatus 80, enable the apparatus 80 to perform the above-described page link replacement method, the method comprising:
acquiring and storing a link replacement rule; the link replacement rule includes: a replacement relationship of the link string;
when detecting that a link button in a page is clicked, acquiring a link character string to be replaced in a link corresponding to the link button;
replacing the link character string to be replaced with a target link character string according to the link replacement rule;
and jumping to the replaced link.
In one embodiment, the obtaining and storing the link replacement rule includes:
acquiring the link replacement rule from a rule interface of a background configuration center according to a preset time interval;
and replacing the saved link replacement rule with the newly acquired link replacement rule.
In an embodiment, the acquiring a link character string to be replaced in a link corresponding to a link button when the link button in a page is detected to be clicked includes:
when detecting that a link button in a page is clicked, detecting whether the link comprises the link character string to be replaced according to the link replacement rule;
and if the link is detected to comprise the link character string to be replaced, acquiring the link character string to be replaced.
In an embodiment, the obtaining the link character string to be replaced if it is detected that the link includes the link character string to be replaced includes:
if the link is detected to comprise the link character string to be replaced, intercepting a page to jump to the link;
and acquiring the link character string to be replaced.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements 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 (10)

1. A method for replacing a page link, comprising:
acquiring and storing a link replacement rule; the link replacement rule includes: a replacement relationship of the link string;
when detecting that a link button in a page is clicked, acquiring a link character string to be replaced in a link corresponding to the link button;
replacing the link character string to be replaced with a target link character string according to the link replacement rule;
and jumping to the replaced link.
2. The method of claim 1, wherein obtaining and saving the link replacement rule comprises:
acquiring the link replacement rule from a rule interface of a background configuration center according to a preset time interval;
and replacing the saved link replacement rule with the newly acquired link replacement rule.
3. The method according to claim 1, wherein when it is detected that a link button in a page is clicked, acquiring a link character 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 comprises the link character string to be replaced according to the link replacement rule;
and if the link is detected to comprise the link character string to be replaced, acquiring the link character string to be replaced.
4. The method according to claim 3, wherein the obtaining the link character string to be replaced if it is detected that the link includes the link character string to be replaced comprises:
if the link is detected to comprise the link character string to be replaced, intercepting a page to jump to the link;
and acquiring the link character string to be replaced.
5. An apparatus for replacing a page link, comprising:
the first acquisition module is used for acquiring and storing the link replacement rule; the link replacement rule includes: a replacement relationship of the link string;
the second acquisition module is used for acquiring a link character string to be replaced in a link corresponding to a link button when the link button in the page is detected to be clicked;
the replacing module is used for replacing the link character string to be replaced with a target link character string according to the link replacing rule;
and the skipping module is used for skipping to the replaced link.
6. The apparatus of claim 5, wherein the first obtaining module comprises:
the first obtaining submodule is used for obtaining the link replacement rule from a rule interface of a background configuration center according to a preset time interval;
and the replacing submodule is used for replacing the saved link replacing rule with the link replacing rule which is obtained latest.
7. The apparatus of claim 5, wherein the second obtaining module comprises:
the detection submodule is used for detecting whether the link comprises the link character string to be replaced according to the link replacement rule when detecting that a link button in a page is clicked;
and the second obtaining submodule is used for obtaining the link character string to be replaced if the link is detected to comprise the link character string to be replaced.
8. The apparatus of claim 7, wherein the second acquisition submodule comprises:
the intercepting submodule is used for intercepting a page to jump to the link if the link is detected to comprise the link character string to be replaced;
and the third obtaining submodule is used for obtaining the link character string to be replaced.
9. An apparatus for replacing a page link, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring and storing a link replacement rule; the link replacement rule includes: a replacement relationship of the link string;
when detecting that a link button in a page is clicked, acquiring a link character string to be replaced in a link corresponding to the link button;
replacing the link character string to be replaced with a target link character string according to the link replacement rule;
and jumping to the replaced link.
10. A computer-readable storage medium having stored thereon computer instructions, which when executed by a processor, carry out the steps of the method according to any one of claims 1 to 4.
CN202011502380.0A 2020-12-18 2020-12-18 Page link replacement method and device Pending CN112560399A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011502380.0A CN112560399A (en) 2020-12-18 2020-12-18 Page link replacement method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011502380.0A CN112560399A (en) 2020-12-18 2020-12-18 Page link replacement method and device

Publications (1)

Publication Number Publication Date
CN112560399A true CN112560399A (en) 2021-03-26

Family

ID=75063387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011502380.0A Pending CN112560399A (en) 2020-12-18 2020-12-18 Page link replacement method and device

Country Status (1)

Country Link
CN (1) CN112560399A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110020237A (en) * 2017-09-18 2019-07-16 北京国双科技有限公司 Webpage jump method and device
CN110489324A (en) * 2019-07-09 2019-11-22 深圳壹账通智能科技有限公司 Method, apparatus that test page jumps, storage medium, electronic device
CN110750741A (en) * 2019-10-18 2020-02-04 深圳市比量科技传媒有限公司 Webpage link skipping processing method, computer device and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110020237A (en) * 2017-09-18 2019-07-16 北京国双科技有限公司 Webpage jump method and device
CN110489324A (en) * 2019-07-09 2019-11-22 深圳壹账通智能科技有限公司 Method, apparatus that test page jumps, storage medium, electronic device
CN110750741A (en) * 2019-10-18 2020-02-04 深圳市比量科技传媒有限公司 Webpage link skipping processing method, computer device and storage medium

Similar Documents

Publication Publication Date Title
CN109032606B (en) Native application compiling method and device and terminal
EP2998899A1 (en) Method and apparatus for running application program
US9870239B2 (en) Method and device for running application program
CN105808305B (en) Static resource loading method and device
JP2017510223A (en) Short message content display method, apparatus, and system, and short message display determination method and apparatus
CN107229711B (en) Webpage display method and device
US20190332232A1 (en) Method and device for displaying web page content
CN109669730B (en) Process keep-alive method, device, electronic equipment and medium
CN112905089B (en) Equipment control method and device
CN109347916B (en) Game interaction method and device and computer readable storage medium
CN110704054A (en) Method and device for accessing target application program through applet, electronic equipment and storage medium
US20190012299A1 (en) Displaying page
CN107463372B (en) Data-driven page updating method and device
CN106708967B (en) Page display method and device
CN104572230B (en) Script file loading method and device and script file generating method and device
CN109901886B (en) Page language switching method, system, device and computer readable storage medium
CN108012258B (en) Data traffic management method and device for virtual SIM card, terminal and server
CN112560399A (en) Page link replacement method and device
CN111274590B (en) Request processing method and device, electronic equipment and storage medium
CN107257384B (en) Service state monitoring method and device
CN109246322B (en) Information processing method and system
CN112102009A (en) Advertisement display method, device, equipment and storage medium
CN111597106A (en) Point burying management method and device
CN110311968B (en) Method and device for loading file in streaming mode and intelligent equipment
CN111767063A (en) Resource updating method, device and equipment for application program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination