Specific embodiment
As shown in Figure 1, current web page includes multiple hyperlink, user there are a webpage on a mobile terminal (mobile phone)
Some hyperlink in webpage need to only be clicked, so that it may automatic jump to the target object of hyperlink, target object is displayed on
On browser, and opens or run according to the type of target object.
However in a practical situation, it is led although there are many hyperlink in webpage with the presence of part hyperlink problem
It causes user click hyperlink that may always not reacting, for a user, may be not aware that hyperlink is caused to ask at that time
The reason of topic, can only select to wait or reselect other hyperlink, influence user experience.Due to various originals
Cause, causes in existing hyperlink that there are invalid hyperlink, therefore is badly in need of a kind of technology that can determine broken hyperlink at present
Scheme makes corresponding processing for broken hyperlink so as to subsequent, improves user experience.
In view of the above technical problems, this specification embodiment provides a kind of technical solution, by determining that user is selected
The affiliated type of hyperlink generates timer corresponding with user's affiliated type of selected hyperlink, specifies in the timer
In time interval, the target object that the hyperlink is jumped to by current page is monitored whether, if it is not, can then determine selected by user
The hyperlink selected is connected in broken hyperlink.In this way, can achieve the purpose of determining broken hyperlink, so as to subsequent for invalid
Hyperlink makes corresponding processing, improves user experience.
Specifically, the technical solution that this specification embodiment provides is as follows:
Determine the affiliated type of the selected hyperlink of user;It is closed according to preset hyperlink type is corresponding with timer
System generates timer corresponding with user's affiliated type of selected hyperlink, and wherein hyperlink type and timer one are a pair of
It answers;In the time interval that the timer is specified, the target object that the hyperlink is jumped to by current page is monitored whether;
If not, it is determined that the selected hyperlink of user is connected in broken hyperlink.
In order to make those skilled in the art more fully understand the technical solution in this specification embodiment, below in conjunction with this
Attached drawing in specification embodiment is described in detail the technical solution in this specification embodiment, it is clear that described
Embodiment is only a part of the embodiment of this specification, instead of all the embodiments.The embodiment of base in this manual,
Those of ordinary skill in the art's every other embodiment obtained, all should belong to the range of protection.
It is shown in Figure 2, it is the implementation flow chart of the determination method for the broken hyperlink that this specification embodiment provides, it should
Method can specifically include following steps:
S201 determines the affiliated type of the selected hyperlink of user;
Firstly the need of the determining selected hyperlink of user.In the present specification, multiple hyperlink as shown in Figure 1, when
When the operation triggering of any hyperlink in the multiple hyperlink of user click, that is, it can determine the selected hyperlink of user, such as
When the operation of user click hyperlink 1 triggering, it is determined that the selected hyperlink of user is connected in hyperlink 1.
After determining the selected hyperlink of user, the affiliated type of the selected hyperlink of user is determined.In this explanation
In book, different hyperlink types can be obtained previously according to the different demarcation of hyperlink connection path.Generally, according to hyperlink
The difference of connection path is connect, hyperlink can be divided into such as Types Below: internal links, external linkage, anchor point link, such root
Hyperlink can be divided into different types of hyperlink, available 3 kinds of hyperlink type (examples in advance according to above-mentioned division rule
Such as internal type, external type, anchor point type), it is possible thereby to according to the difference of the connection path of the selected hyperlink of user,
It determines hyperlink type belonging to the selected hyperlink of user (such as internal type, external type, anchor point type), may belong to
In internal type, external type may be belonged to, it is also possible to belong to anchor point type etc., it is notable that institute in the present specification
The title of the hyperlink type of division can be named arbitrarily, can also be type-A, B type etc., this specification does not limit this
It is fixed.
Different hyperlink types is obtained alternatively, it is also possible to the different demarcation of the target object previously according to hyperlink.One
As, according to the target object of hyperlink, (this target object can be another webpage, be also possible in same web page not
Same position can also be a picture, an e-mail address, a file, it might even be possible to be an application program) no
Together, hyperlink can be divided into such as Types Below: text hyperlink, image hyperlink, Email hyperlink, anchor point hyperlink
It connects, multimedia hyperlink, null link etc., so can be in advance divided into hyperlink according to above-mentioned division rule different types of
Hyperlink, available a variety of hyperlink types (such as it is text type, image type, email type, anchor point type, more
Medium type, void type etc.), it is possible thereby to determine user institute according to the difference of the target object of the selected hyperlink of user
Hyperlink type belonging to the hyperlink of selection may belong to text type, may belong to image type, it is also possible to belong to anchor point
Type etc., it is notable that the title of the hyperlink type divided in the present specification can be named arbitrarily, can also be
Type-A, B type etc., this specification is not construed as limiting this.
S202 is generated and the selected hyperlink of user according to the corresponding relationship of preset hyperlink type and timer
The corresponding timer of affiliated type, wherein hyperlink type and timer correspond;
For hyperlink type identified in S201, according to the corresponding relationship of preset hyperlink type and timer,
Timer (Timer) corresponding with identified hyperlink type is generated, timer generated specified between the effective time
Every different hyperlink types can correspond to different Timer, so as to generate different Timer, it is meant that Timer refers to
Fixed effective time interval is different with the difference of hyperlink type.
For example, identified hyperlink type is internal type, it is corresponding with timer according to preset hyperlink type
Relationship, produces Timer1 corresponding with internal type, and the Timer1 specified time interval is 1S, identified hyperlink class
Type is external type, according to the corresponding relationship of preset hyperlink type and timer, is produced corresponding with external type
Timer2, the Timer2 specified time interval is 1.5S, and identified hyperlink type is anchor point type, according to preset super
The corresponding relationship of link type and timer produces Timer3 corresponding with anchor point type, between the Timer3 specified time
It is divided into 2S.
In another example identified hyperlink type is text type, it is corresponding with timer according to preset hyperlink type
Relationship, produces Timer-A corresponding with text type, and the Timer-A specified time interval is 1S, identified hyperlink
Type is image type, according to the corresponding relationship of preset hyperlink type and timer, is produced corresponding with image type
Timer-B, the Timer-B specified time interval is 1.5S, and identified hyperlink type is email type, according to pre-
If hyperlink type and timer corresponding relationship, produce Timer-C corresponding with email type, the Timer-C
Specified time interval is 2S.
Wherein, the corresponding relationship of hyperlink type and timer, a kind of corresponding timing of hyperlink type are preset
Device, it is as described above, 3 kinds of hyperlink types: internal type, outside are obtained previously according to the different demarcation of hyperlink connection path
Type, anchor point type, the corresponding timer of every kind of hyperlink type is described also as noted above, previously according to the target of hyperlink
The different demarcation of object obtains a variety of hyperlink types: text type, image type, email type, anchor point type, more matchmakers
Body type, void type etc., the corresponding timer of every kind of hyperlink type.Such available hyperlink type and timer
Corresponding relationship: hyperlink type and timer correspond.
S203 monitors whether to jump to the hyperlink by current page in the time interval that the timer is specified
Target object;
It monitors whether to be jumped by current page in the time interval that the Timer is specified for the Timer generated in S202
The target object of hyperlink is gone to, this target object can be another webpage, be also possible to the different positions in same web page
It sets, can also be a picture, an e-mail address, a file, it might even be possible to be an application program.For example, right
Target object (the target that hyperlink is jumped to by current page is monitored whether in the 2S that the Timer-B is specified in Timer-B
Image).
If jumping to the target object of the hyperlink by current page, the corresponding target pair of the hyperlink is shown
As;
In the effective time interval that the Timer is specified, the target object of hyperlink, Yong Huke are jumped to by current page
Normally to access, then the corresponding target object of hyperlink is shown.For example, for Timer-B, in the 2S that the Timer-B is specified,
The target object (target image) that hyperlink is jumped to by current page then shows the target object (target image) of hyperlink.
S204, if not, it is determined that the selected hyperlink of user is connected in broken hyperlink.
In the effective time interval that the Timer is specified, the target object of hyperlink, user are not jumped to by current page
It can not access, then it represents that the selected hyperlink of user is connected in broken hyperlink, can determine that the selected hyperlink of user is connected in nothing
Imitate hyperlink.For example, in the 2S that the Timer-B is specified, the mesh of hyperlink is not jumped to by current page for Timer-B
Object is marked, then can determine that the corresponding hyperlink 2 of Timer-B is broken hyperlink.
On the basis of above scheme, as a preferred embodiment, determining that the selected hyperlink of user is connected in
In the case where broken hyperlink, new hyperlink can be recommended according to default rule, can specifically use following implementation
Recommend new hyperlink:
In hyperlink history selection record, recommend at least one and the affiliated hyperlink type of the broken hyperlink at random
Identical new hyperlink.The hyperlink once selected in user's history wherein is record in hyperlink history selection record,
At least one new hyperlink identical with the affiliated hyperlink type of the broken hyperlink can wherein recommended at random.Example
Such as, in the case where determining the selected hyperlink 1 of user is broken hyperlink, the affiliated type of broken hyperlink is inner classes
Type recommends 3 new hyperlink, and this 3 affiliated types of new hyperlink are interior in hyperlink history selection record at random
Category type.
In hyperlink history selection record, recommend at least one related to the target object of the broken hyperlink at random
New hyperlink.Here correlation refers to that target object type is related, can also be related with feeling the pulse with the finger-tip mark contents of object.For example,
In the case where determining that the selected hyperlink 1 of user is broken hyperlink, the target object of broken hyperlink is an image,
In hyperlink history selection record, recommend 3 new hyperlink, and the target object (image) of this 3 new hyperlink at random
It is related to target object (image) of broken hyperlink.For example, determining that the selected hyperlink 2 of user is broken hyperlink
In the case of, the target object of broken hyperlink is that a text is gone through including critical field (such as hyperlink) in hyperlink
History selection record in, at random recommend 3 new hyperlink, and the target object (critical field in text) of this 3 hyperlink with
The target object (critical field in text) of broken hyperlink is related (such as being all to introduce hyperlink).
On the basis of above scheme, as a preferred embodiment, determining that the selected hyperlink of user is connected in
In the case where broken hyperlink, rule can be spliced according to preset hyperlink, judge whether the broken hyperlink is illegal
Otherwise hyperlink prompts user network to ask if so, the selected hyperlink of user can be prompted to be connected in illegal hyperlink
Topic, or the target object of the prompt selected hyperlink of user can not access.Generally, a hyperlink includes the several of fixation
A element, each member are known as respective attribute, and the element of certain designated positions usually, represents certain meaning, in determination
In the case that the selected hyperlink of user is connected in broken hyperlink, can be by the element number for determining that broken hyperlink has
It is no to meet preset requirement, can also by determine broken hyperlink header elements whether be preset element (such as
Https: //, WWW) etc., and then judge whether broken hyperlink is illegal hyperlink.
On the basis of above scheme, as a preferred embodiment, determining that the selected hyperlink of user is connected in
In the case where broken hyperlink, the selected hyperlink of user can be prompted to be connected in broken hyperlink.
By the description of the above-mentioned technical solution provided this specification embodiment, by determining the selected hyperlink of user
Affiliated type is connect, timer corresponding with user's affiliated type of selected hyperlink is generated, in the time that the timer is specified
In interval, the target object that the hyperlink is jumped to by current page is monitored whether, if it is not, can then determine that user is selected
Hyperlink is connected in broken hyperlink.In this way, can achieve by technical solution provided by this specification and determine invalid hyperlink
The purpose connect makes corresponding processing for broken hyperlink so as to subsequent, such as recommends new hyperlink, prompts selected by user
The hyperlink selected is connected in broken hyperlink etc., improves user experience.
Relative to above method embodiment, this specification embodiment also provides a kind of determining device of broken hyperlink, ginseng
As shown in Figure 3, the apparatus may include: determination type modules 310, timer generation module 320, monitoring modular 330, invalid super
Link determining module 340.
Determination type module 310, for determining the affiliated type of the selected hyperlink of user;
Timer generation module 320 is generated and is used for the corresponding relationship according to preset hyperlink type and timer
The corresponding timer of the family affiliated type of selected hyperlink, wherein hyperlink type and timer correspond;
Monitoring modular 330, for monitoring whether to be jumped to by current page in the time interval that the timer is specified
The target object of the hyperlink;
Broken hyperlink determining module 340, for if not, it is determined that the selected hyperlink of user is connected in broken hyperlink.
In a kind of specific embodiment of this specification, the hyperlink type is previously according to hyperlink connection path
Different demarcation obtain.
In a kind of specific embodiment of this specification, the hyperlink type is the target pair previously according to hyperlink
The different demarcation of elephant obtains.
In a kind of specific embodiment of this specification, the device further include:
Hyperlink referral module 350, in the case where determining that the selected hyperlink of user is connected in broken hyperlink, root
Recommend new hyperlink according to default rule.
In a kind of specific embodiment of this specification, the hyperlink referral module 350 is specifically used for:
In hyperlink history selection record, recommend at least one and the affiliated hyperlink type of the broken hyperlink at random
Identical new hyperlink.
In a kind of specific embodiment of this specification, the hyperlink referral module 350 is specifically used for:
In hyperlink history selection record, recommend at least one related to the target object of the broken hyperlink at random
New hyperlink.
In a kind of specific embodiment of this specification, the device further include:
Judgment module 360, in the case where determining that the selected hyperlink of user is connected in broken hyperlink, according to default
Hyperlink splice rule, judge whether the broken hyperlink is illegal hyperlink;
If so, the prompt selected hyperlink of user is connected in illegal hyperlink, otherwise user network is prompted to go wrong, or
The target object of the prompt selected hyperlink of user can not access.
In a kind of specific embodiment of this specification, the device further include:
Cue module 380, for prompting user in the case where determining that the selected hyperlink of user is connected in broken hyperlink
Selected hyperlink is connected in broken hyperlink.
The function of modules and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus
Realization process, details are not described herein.
By the description of the above-mentioned technical solution provided this specification embodiment, by determining the selected hyperlink of user
Affiliated type is connect, timer corresponding with user's affiliated type of selected hyperlink is generated, in the time that the timer is specified
In interval, the target object that the hyperlink is jumped to by current page is monitored whether, if it is not, can then determine that user is selected
Hyperlink is connected in broken hyperlink.In this way, can achieve by technical solution provided by this specification and determine invalid hyperlink
The purpose connect makes corresponding processing for broken hyperlink so as to subsequent, such as recommends new hyperlink, prompts selected by user
The hyperlink selected is connected in broken hyperlink etc., improves user experience.
This specification embodiment also provides a kind of computer equipment, as shown in figure 4, the equipment may include: processor
410, memory 420, input/output interface 430, communication interface 440 and bus 450.Wherein processor 410, memory 420,
Input/output interface 430 and communication interface 440 pass through the communication connection between the realization of bus 450 inside equipment.
Processor 410 can use general CPU (Central Processing Unit, central processing unit), micro process
Device, application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or one or
The modes such as multiple integrated circuits are realized, for executing relative program, to realize technical solution provided by this specification embodiment.
Memory 420 can use ROM (Read Only Memory, read-only memory), RAM (Random Access
Memory, random access memory), static storage device, the forms such as dynamic memory realize.Memory 420 can store
Operating system and other applications are realizing technical solution provided by this specification embodiment by software or firmware
When, relevant program code is stored in memory 420, and execution is called by processor 410.
Input/output interface 430 is for connecting input/output module, to realize information input and output.Input and output/
Module can be used as component Configuration (not shown) in a device, can also be external in equipment to provide corresponding function.Wherein
Input equipment may include keyboard, mouse, touch screen, microphone, various kinds of sensors etc., output equipment may include display,
Loudspeaker, vibrator, indicator light etc..
Communication interface 440 is used for connection communication module (not shown), to realize the communication of this equipment and other equipment
Interaction.Wherein communication module can be realized by wired mode (such as USB, cable etc.) and be communicated, can also be wirelessly
(such as mobile network, WIFI, bluetooth etc.) realizes communication.
Bus 450 includes an access, in various components (such as the processor 410, memory 420, input/output of equipment
Interface 430 and communication interface 440) between transmit information.
It should be noted that although above equipment illustrates only processor 410, memory 420, input/output interface
430, communication interface 440 and bus 450, but in the specific implementation process, which can also include realizing to operate normally
Necessary other assemblies.In addition, it will be appreciated by those skilled in the art that, it can also be only comprising realizing in above equipment
Component necessary to this specification example scheme, without including all components shown in figure.
This specification embodiment also provides a kind of computer readable storage medium, is stored thereon with computer program, the journey
The determination method of broken hyperlink above-mentioned is realized when sequence is executed by processor.This method includes at least:
A kind of determination method of broken hyperlink, this method comprises:
Determine the affiliated type of the selected hyperlink of user;
According to the corresponding relationship of preset hyperlink type and timer, generate and the affiliated class of the selected hyperlink of user
The corresponding timer of type, wherein hyperlink type and timer correspond;
In the time interval that the timer is specified, the target that the hyperlink is jumped to by current page is monitored whether
Object;
If not, it is determined that the selected hyperlink of user is connected in broken hyperlink.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media, can be by any side
Method or technology realize that information stores.Information can be computer readable instructions, data structure, the module of program or other numbers
According to.The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory
(SRAM), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only memory
(ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory techniques, CD-ROM are read-only
Memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or
Other magnetic storage devices or any other non-transmission medium, can be used for storage can be accessed by a computing device information.According to
Herein defines, and computer-readable medium does not include temporary computer readable media (transitory media), such as modulation
Data-signal and carrier wave.
As seen through the above description of the embodiments, those skilled in the art can be understood that this specification
Embodiment can be realized by means of software and necessary general hardware platform.Based on this understanding, this specification is implemented
Substantially the part that contributes to existing technology can be embodied in the form of software products the technical solution of example in other words,
The computer software product can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are to make
It is each to obtain computer equipment (can be personal computer, server or the network equipment etc.) execution this specification embodiment
Method described in certain parts of a embodiment or embodiment.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can
To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment
The combination of any several equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality
For applying example, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to embodiment of the method
Part explanation.The apparatus embodiments described above are merely exemplary, wherein described be used as separate part description
Module may or may not be physically separated, can be each module when implementing this specification example scheme
Function realize in the same or multiple software and or hardware.Can also select according to the actual needs part therein or
Person's whole module achieves the purpose of the solution of this embodiment.Those of ordinary skill in the art are not the case where making the creative labor
Under, it can it understands and implements.
The above is only the specific embodiment of this specification embodiment, it is noted that for the general of the art
For logical technical staff, under the premise of not departing from this specification embodiment principle, several improvements and modifications can also be made, this
A little improvements and modifications also should be regarded as the protection scope of this specification embodiment.