CN108763404A - A kind of access address fault-tolerance approach and fault tolerance facility - Google Patents

A kind of access address fault-tolerance approach and fault tolerance facility Download PDF

Info

Publication number
CN108763404A
CN108763404A CN201810497582.7A CN201810497582A CN108763404A CN 108763404 A CN108763404 A CN 108763404A CN 201810497582 A CN201810497582 A CN 201810497582A CN 108763404 A CN108763404 A CN 108763404A
Authority
CN
China
Prior art keywords
file
extension
name
access address
criteria
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
CN201810497582.7A
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.)
Shenzhen Ipanel TV Inc
Original Assignee
Shenzhen Ipanel TV Inc
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 Shenzhen Ipanel TV Inc filed Critical Shenzhen Ipanel TV Inc
Priority to CN201810497582.7A priority Critical patent/CN108763404A/en
Publication of CN108763404A publication Critical patent/CN108763404A/en
Pending legal-status Critical Current

Links

Abstract

The present invention relates to file address fault-toleranr technique field, more particularly to a kind of access address fault-tolerance approach and fault tolerance facility.Wherein, the method includes:Obtain access address;Judge whether the file destination extension name in the access address obtained is correct;It is incorrect in response to the file destination extension name, determine the criteria file extension to match with the file destination extension name;The file destination extension name is replaced with into the criteria file extension determined, obtains the access address after error correction.The present invention can carry out fault-tolerant processing to the access address of file, judge whether the file destination extension name in access address is correct, and the file destination extension name of mistake is replaced with into criteria file extension, rather than as in the prior art, it is directly interrupted after the file extension mistake in judging access address and accesses file, it solves the problems, such as to cause file that can not open because of the wrong file extension of record, improves the enforceability of the code in the address access process to file.

Description

A kind of access address fault-tolerance approach and fault tolerance facility
Technical field
The present invention relates to file address fault-toleranr technique field, more particularly to a kind of access address fault-tolerance approach and fault-tolerant dress It sets.
Background technology
In internet, technical staff on backstage by access address typing internet system, so that client passes through visit Ask that address accesses corresponding file, such as in the business of order video, client is after program request, and set-top box is by accessing video Corresponding broadcast address (one kind of access address) opens video.
In the access address of typing file, technical staff may be wrong by the file extent register in access address, leads Cause terminal that can not access corresponding file.Still by taking order video as an example, if technical staff is by the extension in certain video playing address Register is wrong, will cause the set-top box in on-demand process that can not open the video.
As it can be seen that in the prior art, if the file extension mistake in access address, client can not be to mistake File corresponding to access address accesses.
Invention content
In view of this, a kind of access address fault-tolerance approach of present invention offer and fault tolerance facility, solve because of the wrong access of record File extension in location and the problem of corresponding file can not be accessed.
In order to achieve the above-mentioned object of the invention, the present invention provides following technical scheme:
A kind of access address fault-tolerance approach, the method includes:
Obtain access address;
Judge whether the file destination extension name in the access address obtained is correct;
It is incorrect in response to the file destination extension name, determine the standard text to match with the file destination extension name Part extension name;
The file destination extension name is replaced with into the criteria file extension determined, obtains the access after error correction Location.
Optionally, whether the file destination extension name in the access address for judging to obtain is correct, including:
Judge in preset at least one criteria file extension with the presence or absence of identical with the file destination extension name Criteria file extension, if not, judging that the file destination extension name is incorrect;If so, judging that the file destination expands It is correct to open up name.
Optionally, the criteria file extension that the determination matches with the file destination extension name, including:
From at least one criteria file extension, criteria file extension alternative collection is determined;Wherein, the mark Quasi- file extension alternative collection includes:Matching degree between the file destination extension name is more than or not less than matching degree threshold value Criteria file extension;
According to the sequence that the matching degree is descending, the normative document in the criteria file extension alternative collection is expanded Exhibition name is ranked up, and obtains file extension sequence;
Primary criteria file extension will be located in the file extension sequence, is determined as and the file destination The criteria file extension that extension name matches.
Optionally, the criteria file extension that the determination matches with the file destination extension name, including:
According to the sequence that the matching degree between the file destination extension name is descending, at least one standard File extension is ranked up, and obtains file extension sequence;
Primary criteria file extension will be located in the file extension sequence, is determined as and the file destination The criteria file extension that extension name matches.
Optionally,
After the access address after obtaining error correction, the method further includes:Execution accesses fault tolerant operation at least once, until Meet stop condition.
Optionally, the access fault tolerant operation includes:
Access the access address after error correction;
If accessing failure, the file destination extension name is replaced with into the text of next standard in the file extension sequence Part extension name retrieves the access address after error correction;
The stop condition includes:The file destination extension name is located at last in the file extension sequence Position, alternatively, accessing successfully.
Optionally, the access fault tolerant operation includes:
It removes and is located at primary criteria file extension in the file extension sequence;
Access the access address after error correction;
If accessing failure, the file destination extension name is replaced in the file extension sequence positioned at primary Criteria file extension retrieves the access address after error correction;
The stop condition includes:The file extension sequence is sky, alternatively, accessing successfully.
A kind of access address fault tolerance facility, the access address fault tolerance facility include:Access address acquisition module, file expand Open up name judgment module, file extension determining module and file extension replacement module;
The access address acquisition module is for obtaining access address;
Just whether the file destination extension name in the access address that the file extension judgment module is used to judge to obtain Really;
The file extension determining module is used to judge that the file destination expands in the file extension judgment module After exhibition name is incorrect, the criteria file extension to match with the file destination extension name is determined;
The file extension replacement module is used to the file destination extension name replacing with the normative document determined Extension name obtains the access address after error correction.
Optionally, the file extension determining module includes:Sequence determination sub-module and extension name determination sub-module;
The sequence determination sub-module is used to, according to the descending sequence of the matching degree, extend the normative document Criteria file extension in name alternative collection is ranked up, and obtains file extension sequence;Alternatively, for according to the target The descending sequence of matching degree between file extension, is ranked up at least one criteria file extension, obtains To file extension sequence;
The extension name determination sub-module, which is used to that primary normative document will to be located in the file extension sequence, to expand Name is opened up, the criteria file extension to match with the file destination extension name is determined as.
Optionally, the access fault tolerance facility further includes accessing fault tolerant operation execution module;
The access fault tolerant operation execution module is used for after the access address after obtaining error correction, and the method further includes: Execution accesses fault tolerant operation at least once, until meeting stop condition.
The present invention can carry out fault-tolerant processing to the access address of file, that is, judge the file destination extension in access address Whether name is correct, and the file destination extension name of mistake is replaced with criteria file extension, rather than as in the prior art, Access file is directly interrupted after judging the file extension mistake in access address, is solved because the wrong file extension of record leads to text The problem of part can not be opened improves the enforceability of the code in the address access process to file.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technology description to be briefly described.
Fig. 1 is a kind of flow chart of access address fault-tolerance approach provided in an embodiment of the present invention;
Fig. 2 is a kind of stream of the one of which specific implementation mode of access address fault-tolerance approach provided in an embodiment of the present invention Cheng Tu;
Fig. 3 is the one of which specific implementation mode of another access address fault-tolerance approach provided in an embodiment of the present invention Flow chart;
Fig. 4 is the flow chart of another access address fault-tolerance approach provided in an embodiment of the present invention;
Fig. 5 is the flow chart of another access address fault-tolerance approach provided in an embodiment of the present invention;
Fig. 6 is a kind of structural schematic diagram of access address fault tolerance facility provided in an embodiment of the present invention;
Fig. 7 A are the structural schematic diagram of another access address fault tolerance facility provided in an embodiment of the present invention;
Fig. 7 B are the structural schematic diagram of another access address fault tolerance facility provided in an embodiment of the present invention;
Fig. 8 A are the structural schematic diagram of another access address fault tolerance facility provided in an embodiment of the present invention;
Fig. 8 B are the structural schematic diagram of another access address fault tolerance facility provided in an embodiment of the present invention;
Fig. 9 is a kind of structural schematic diagram of access address fault tolerance facility provided in an embodiment of the present invention.
Specific implementation mode
The invention discloses a kind of access address fault-tolerance approach and fault tolerance facility, those skilled in the art can use for reference herein Content is suitably modified technological parameter realization.In particular, it should be pointed out that all similar substitutions and modifications are to people in the art It is it will be apparent that they are considered as being included in the present invention for member.The method of the present invention and application are by preferably real Example is applied to be described, related personnel obviously can not depart from the content of present invention, in spirit and scope to method described herein It is modified or suitably changes and combine with application, to realize and apply the technology of the present invention.
In Internet technology, client can the access address of input file in a browser file visited It asks, wherein file can may include having text in above-mentioned access address there are many type, such as video file, audio file etc. Part extension name, to distinguish the type of different files.
In the prior art, if the access address mistake of file, browser can not access to the access address.
And in practice, in the access address of typing file, technical staff may be by the file extent in access address Register is wrong, and corresponding file can not be accessed so as to cause front end.
For example, in the business of order video, it is assumed that the access address of some video is:
http://10.191.85.205:88/baojianyangsheng/zyys/01.mp4, and technical staff is in typing Extension name " * .mp4 " may be accidentally written as " * .mp4 " when address, i.e., one space of more typings after " * .mp4 ", then subsequently Set-top box can not open the broadcast address of mistake.
Respective file can not be just opened to solve the problems, such as that file extension is wrong in the prior art, the present invention provides one Kind access address fault-tolerance approach and fault tolerance facility.
In practical applications, can the fault-tolerant side of a kind of access address that the embodiment of the present invention is provided be executed by browser Method, wherein above-mentioned access address fault tolerance facility can be the device in browser, can be adapted for a variety of browsers, such as regarding Frequency browser, audio browser etc..
With reference to embodiment, the present invention is further explained:
As shown in Figure 1, an embodiment of the present invention provides a kind of access address fault-tolerance approach, this method may include:
S100, access address is obtained;
Wherein, above-mentioned access address is so exemplary that may include the broadcast address of video, the broadcast address of audio and file road At least one of diameter etc..
May include filename and file destination extension name, in one example, above-mentioned target in above-mentioned access address File extension can be the suffix name of above-mentioned file.
S200, judge whether the file destination extension name in the access address obtained is correct;If it is, accessing above-mentioned visit Ask address;Otherwise S210 is executed;
Preferably, whether the file destination extension name in the above-mentioned access address for judging to obtain is correct, may include:Judge It is extended with the presence or absence of normative document identical with above-mentioned file destination extension name in preset at least one criteria file extension Name, if not, judging that above-mentioned file destination extension name is incorrect;If so, judging that above-mentioned file destination extension name is correct.
Wherein, above-mentioned preset at least one criteria file extension can be pre-stored existing file extension Or common file extension, for example, in the business of order video, common video file extension name (such as * .mp4, * .rmvb, * .mpg, * .mpeg and * .mpe etc.) web of terminal applies for playing video can be stored in advance in In the page.
Continue to use precedent, it is assumed that the extension name of certain access address is accidentally written as " * .mp4 " (before mp4 more skies Lattice), above-mentioned access address fault tolerance facility can compare " * .mp4 " at least one criteria file extension, due to standard File extension " * .mp4 " and " * .mp4 " are different, and " * .mp4 " is also differed with other criteria file extensions, then can determine that Extension name " * .mp4 " is incorrect.
It is of course also possible to be correct there are file destination extension name, but the corresponding access of file destination extension name The case where location still cannot open, reason may be that browser used is not supported to open the file or access of the type The problems such as location is not present.
It is S210, incorrect in response to above-mentioned file destination extension name, it determines and matches with above-mentioned file destination extension name Criteria file extension;
In one example, above-mentioned file destination extension name and above-mentioned standard file extension can be carried out to fuzzy Match, to find the criteria file extension to match with above-mentioned file destination extension name.
Specifically, above-mentioned fuzzy matching at least may include:Expand with normative document by the character in file destination extension name When character in exhibition name is compared, the capital and small letter of character is not differentiated between.
Wherein, above-mentioned " matching with above-mentioned file destination extension name " may include at least one mode, will be in the present invention It is described in detail in the other embodiment provided.
S300, above-mentioned file destination extension name is replaced with into the criteria file extension determined, obtains the visit after error correction Ask address.
The embodiment of the present invention can be by by file destination extension name and the preset at least one standard in access address File extension comparison is replaced to judge whether above-mentioned file destination extension name is correct using the criteria file extension determined It changes and states file destination extension name, solve the problems, such as that because of file extension mistake file can not be opened, improve to text The enforceability of code in the address access process of part.
It below will be made of how to determine that the criteria file extension to match with above-mentioned file destination extension name carries out specifically It is bright.
Determining mode is at least just like two kinds:
Mode one:Refer to Fig. 2, " determining and extending famous prime minister with the file destination in S210 in embodiment illustrated in fig. 1 The criteria file extension matched " can specifically include:
S211, from above-mentioned at least one criteria file extension, determine criteria file extension alternative collection;
Wherein, above-mentioned standard file extension alternative collection includes:Matching degree between above-mentioned file destination extension name is big In the criteria file extension of matching degree threshold value.
Preferably, the embodiment of the present invention can extend above-mentioned at least one criteria file extension and above-mentioned file destination Name is compared, to obtain the matching degree between each criteria file extension and above-mentioned file destination extension name, i.e., at least one Similarity degree between criteria file extension and above-mentioned file destination extension name is more than or not less than default in above-mentioned matching degree The criteria file extension of matching degree threshold value be just put into criteria file extension alternative collection.
Above-mentioned matching degree threshold value can carry out flexible design according to actual needs.In one example, above-mentioned matching degree threshold value It includes percentage that exemplary can obtain, such as 80%.
By taking matching degree threshold value is 80% as an example, it is assumed that share 5 criteria file extension A-E, wherein normative document extends Name A-C and the matching degree of file destination extension name are more than 80%, then criteria file extension alternative collection includes above-mentioned standard file Extension name A-C.
In another example, above-mentioned matching degree threshold value may include that the identical number N of character in file extension, N are just Integer.
Preferably, the embodiment of the present invention can be extended in above-mentioned at least one criteria file extension and above-mentioned file destination Name determines the matching degree between above-mentioned at least one criteria file extension and above-mentioned file destination extension name when being compared, i.e., Similarity degree between above-mentioned at least one criteria file extension and above-mentioned file destination extension name is more than in above-mentioned matching degree Just can be determined that when preset matching degree threshold value can replace the criteria file extension of above-mentioned file destination extension name.
Wherein, the embodiment of the present invention can be configured above-mentioned matching degree threshold value, for example, above-mentioned matching degree threshold value can be with Character is identical there are two being set as.It is exemplified below.
Still by taking order video as an example, it is assumed that the file destination of the access address of staff's typing extends entitled " * .M4 ", It is then identical there are two character between criteria file extension " * .mp4 " and " * .M4 ", then " * .mp4 " can be determined as above-mentioned standard One in file extension alternative collection, and then determination obtains criteria file extension alternative collection from criteria file extension.
S212, according to the descending sequence of above-mentioned matching degree, to the standard in above-mentioned standard file extension alternative collection File extension is ranked up, and obtains file extension sequence;
Continue to use precedent, it is assumed that common video file extension name is in the web page of the terminal applies for playing video Middle storage, such as * .mp4, * .rmvb, * .mpg, * .mpeg, * .mpe, * .avi, * .asf, * .rm, * wmv, * .mkv, * .vob And * .divx.The file destination of the access address of technical staff's typing extends entitled " * .me ", can be by file destination extension name " * .me " is compared to obtain matching degree with common video file extension name, and obtains criteria file extension according to matching degree Alternative collection, at least there are two characters and target text in each criteria file extension in the criteria file extension alternative collection Character in part extension name is identical.For example, may include " * .mpeg and * .mpe " in above-mentioned standard file extension alternative collection, so Afterwards, each criteria file extension in criteria file extension alternative collection is sorted according to matching degree size, obtains file extent Name sequence { * .mpeg, * .mpe }.
S213, primary criteria file extension will be located in above-mentioned file extension sequence, be determined as and above-mentioned mesh The criteria file extension that mark file extension matches.
In other embodiments of the present invention, criteria file extension alternative collection can also be skipped, directly chooses matching degree most High criteria file extension is as the criteria file extension to match with above-mentioned file destination extension name.
As it can be seen that the embodiment of the present invention can determine above-mentioned at least one criteria file extension and file destination extension name it Between matching degree, matching degree is determined the criteria file extension more than matching degree threshold value, and to be determined as criteria file extension alternative Collection, and determine to extend with the normative document that file destination extension name matches in above-mentioned standard file extension alternative collection Name.That is, in the present embodiment, criteria file extension alternative collection is filtered out in advance, it, may be multiple in subsequent embodiment Access fault tolerant operation, and accessing fault tolerant operation every time can be based on the criteria file extension in criteria file extension alternative collection File destination extension name is replaced, the subsequent replacement time can be saved in this way.
Mode two:Refer to Fig. 3, it is above-mentioned in S210 in embodiment illustrated in fig. 1 " to determine and extend famous prime minister with the file destination Matched criteria file extension " can specifically include:
S214, matching degree between above-mentioned at least one criteria file extension and above-mentioned file destination extension name is determined;
The embodiment of the present invention carries out above-mentioned at least one criteria file extension with above-mentioned file destination extension name respectively Comparison is to obtain matching degree.
S215, according to the descending sequence of the matching degree between above-mentioned file destination extension name, to above-mentioned at least one A criteria file extension is ranked up, and obtains file extension sequence;
It is assumed that common video file extension name includes * .mp4, * .rmvb, * .mpg, * .mpeg, * .mpe, * .avi, * .asf, * .rm, * wmv, * .mkv, * .vob and * .divx.File destination extension name in the access address of technical staff's typing " * .mp " and common video file extension name can be compared to obtain matching degree, and press in the present embodiment for " * .mp " Each criteria file extension sorted according to matching degree to obtain file extension sequence { * .mp4, * .mpg, * .mpeg, * .mpe, * .rmvb, * .rm, * wmv, * .mkv, * .avi, * .asf, * .vob, * .divx }.
S216, primary criteria file extension will be located in above-mentioned file extension sequence, be determined as and above-mentioned mesh The criteria file extension that mark file extension matches.
The embodiment of the present invention can determine the matching degree between each criteria file extension and above-mentioned file destination extension name, And each criteria file extension is ranked up according to above-mentioned matching degree, existing criteria file extension is ranked up, Preferential selection and the above-mentioned highest criteria file extension of file destination extension name matching degree, can have and open above-mentioned text more times The chance of part, to improve the enforceability of the code in the address access process to file.
The above-mentioned error correction to access address can only carry out it is primary, also in combination with to access address access result (success or Failure) and repeatedly corrected.
After the access address after obtaining error correction, above-mentioned access address fault-tolerance approach can also include:It executes at least once Fault tolerant operation is accessed, until meeting stop condition.
Wherein, above-mentioned access fault tolerant operation can be there are many specific implementation mode, and corresponding above-mentioned stop condition is also not to the utmost It is identical.In the following, two of which specific embodiment is described in detail.
First way:
Fig. 4 is referred to, above-mentioned " execution accesses fault tolerant operation at least once, until meeting stop condition " can include at least:
S400, the access address after error correction is accessed;
S410, judge whether to access successfully, if accessing failure, execute S420;If accessing successfully, end processing.
S420, judge last position whether above-mentioned file destination extension name is located in above-mentioned file extension sequence, such as Fruit is no, then executes S430, if it is, ending processing;
S430, above-mentioned file destination extension name is replaced with to the extension of next normative document in above-mentioned file extension sequence Name retrieves the access address after error correction and returns to execution S400.
As it can be seen that in the first way, above-mentioned access fault tolerant operation specifically includes:
Access the access address after error correction;
If accessing failure, above-mentioned file destination extension name is replaced with into the text of next standard in above-mentioned file extension sequence Part extension name retrieves the access address after error correction;
And above-mentioned stop condition may particularly include:Above-mentioned file destination extension name is located in above-mentioned file extension sequence Last position, alternatively, accessing successfully.
Specifically, if accessing failure, it is considered herein that above-mentioned file destination extension name is incorrect, the standard is being judged After file extension is not last position in file extension sequence, reuses above-mentioned standard file extension and replace mesh File extension is marked, and continues to access the access address after error correction.If accessed successfully, it is considered herein that obtaining correctly Access address no longer executes other operations.If last in the entitled above-mentioned file extension sequence of above-mentioned standard file extent One, then the present invention can not replace file destination extension name again, also no longer execute other operations.
The embodiment of the present invention is able to carry out accesses fault tolerant operation at least once, can improve and be accessed in the address to file The enforceability of code in journey, reduces the maintenance work of technical staff.
The second way:
Fig. 5 is referred to, above-mentioned " execution accesses fault tolerant operation at least once, until meeting stop condition " can include at least:
S500, it removes in above-mentioned file extension sequence positioned at primary criteria file extension;
S400, the access address after error correction is accessed;
S410, judge whether to access successfully, if accessing failure, execute S440;If accessing successfully, end processing.
S440, judge whether above-mentioned file extension sequence is empty, if it is not, then executing S450;If it is, at end Reason;
S450, above-mentioned file destination extension name is replaced in above-mentioned file extension sequence positioned at primary standard text Part extension name retrieves the access address after error correction and returns to execution S500.
As it can be seen that in the second way, above-mentioned access fault tolerant operation specifically includes:
It removes and is located at primary criteria file extension in above-mentioned file extension sequence;
Access the access address after error correction;
If accessing failure, above-mentioned file destination extension name is replaced in above-mentioned file extension sequence positioned at primary Criteria file extension retrieves the access address after error correction;
And above-mentioned stop condition can specifically include:Above-mentioned file extension sequence is sky, alternatively, accessing successfully.
Wherein, above-mentioned file extension sequence includes above-mentioned at least one criteria file extension.
Optionally, in precedent, last position in the entitled above-mentioned file extension sequence of above-mentioned standard file extent, Alternatively, after above-mentioned file extension sequence is empty, above-mentioned access address fault tolerance facility can also be sent out to set-top box running log Send 404 message.
The embodiment of the present invention can be in above-mentioned file extension sequence include multiple above-mentioned standard file extensions it is more Secondary execution accesses fault tolerant operation, improves the enforceability of the code in the address access process to file, reduces technology people The maintenance work of member.
Corresponding to a kind of access address fault-tolerance approach shown in fig. 5 with above-mentioned Fig. 1, the present invention also provides a kind of access Address fault tolerance facility, above-mentioned access address fault tolerance facility can be the part in browser, and can be adapted for a variety of clear Look at device, such as video browser, audio browser etc..
With reference to embodiment, above-mentioned access address fault tolerance facility is expanded on further.
It is corresponding with embodiment shown in FIG. 1, Fig. 6 is referred to, it is above-mentioned the present invention provides a kind of access address fault tolerance facility Access address fault tolerance facility may include:Access address acquisition module 01, file extension judgment module 02, file extension are true Cover half block 03 and file extension replacement module 04;
Above-mentioned access address acquisition module 01 is for obtaining access address;
Wherein, it in above-mentioned access address may include filename and file destination extension name.
Whether the file destination extension name in the access address that above-mentioned file extension judgment module 02 is used to judge to obtain Correctly;
Above-mentioned file extension determining module 03 is used to judge above-mentioned target text in above-mentioned file extension judgment module 02 After part extension name is incorrect, the criteria file extension to match with above-mentioned file destination extension name is determined;
Above-mentioned file extension replacement module 04 is used to replace with above-mentioned file destination extension name the standard text determined Part extension name obtains the access address after error correction.
Above-mentioned file extension judgment module 02, file extension determining module 03 and file extension replacement module 04 Specific act on is described in detail in the access address fault-tolerance approach described in Fig. 1, repeats no more.
The embodiment of the present invention can be by by file destination extension name and the preset at least one standard in access address File extension comparison is replaced to judge whether above-mentioned file destination extension name is correct using the criteria file extension determined It changes and states file destination extension name, solve the problems, such as that because of file extension mistake file can not be opened, improve to text The enforceability of code in the address access process of part.
Fig. 7 A are referred to, can also include in access address fault tolerance facility provided in an embodiment of the present invention:Alternative collection determines Module 05, above-mentioned alternative collection determining module 05, for from above-mentioned at least one criteria file extension, determining normative document Extension name alternative collection;Wherein, above-mentioned standard file extension alternative collection includes:With the matching between the file destination extension name Criteria file extension of the degree more than or not less than matching degree threshold value.
File extension determining module 03 in access address fault tolerance facility provided in an embodiment of the present invention may include:Sequence Row determination sub-module 031 and extension name determination sub-module 032;
Above-mentioned sequence determination sub-module 031 is used for according to the descending sequence of the matching degree, to above-mentioned standard file Criteria file extension in extension name alternative collection is ranked up, and obtains file extension sequence;Alternatively, for according to it is above-mentioned The descending sequence of matching degree between file destination extension name, arranges above-mentioned at least one criteria file extension Sequence obtains file extension sequence;
Above-mentioned extension name determination sub-module 032 is used to that primary normative document will to be located in above-mentioned file extension sequence Extension name is determined as the criteria file extension to match with above-mentioned file destination extension name.
Optionally, Fig. 7 B are referred to, can not include above-mentioned alternative collection determining module in other embodiments of the present invention 05, i.e. the file destination extension name in the access address that the judgement of above-mentioned file extension judgment module 02 obtains is incorrect rear straight Contact is sent out sequence determination sub-module 031 above-mentioned and is ranked up to above-mentioned standard file extension to obtain file extension sequence.
It is understood that above-mentioned sequence determination sub-module 031 in practical applications can be there are many application mode, example Such as, above-mentioned sequence determination sub-module 031 can determine criteria file extension alternative collection in above-mentioned alternative collection determining module 05 The criteria file extension in above-mentioned standard file extension alternative collection is ranked up afterwards, it can also be directly according to above-mentioned With descending sequence is spent, the criteria file extension in above-mentioned standard file extension alternative collection is ranked up, is obtained File extension sequence.
It refers to Fig. 8 A, can also include in a kind of access address fault tolerance facility provided in an embodiment of the present invention:Address is visited It asks module 06 and accesses fault tolerant operation execution module 07;
Address above mentioned access modules 06 are for accessing the access address after error correction;
Above-mentioned access fault tolerant operation execution module 07 is used for after the access address after obtaining error correction, and execution is visited at least once Fault tolerant operation is asked, until meeting stop condition.
Wherein, Fig. 8 B are referred to, above-mentioned access fault tolerant operation execution module 07 may further include:First judges submodule Block 071 and second judgment submodule 072, wherein:
Above-mentioned first judging submodule 071 is for judging whether to access successfully;If accessing failure, triggers above-mentioned second and sentence Disconnected submodule 072;
Above-mentioned second judgment submodule 072 is for judging whether above-mentioned file extension sequence is empty, if it is not, then triggering Above-mentioned file extension replacement module 04, which replaces with above-mentioned file destination extension name, is located at the in above-mentioned file extension sequence One criteria file extension retrieves the access address after error correction.Specifically, above-mentioned access fault tolerant operation and above-mentioned stopping It has only been described in detail, has repeated no more in a kind of condition access address fault-tolerance approach shown in Fig. 4.
Preferably, Fig. 9 is referred to, can also be wrapped in a kind of access address fault tolerance facility that the embodiment of the present invention is provided It includes;File extension remove module 08;
Above-mentioned file extension remove module 08 is located at primary standard for removing in above-mentioned file extension sequence File extension.
Specifically, above-mentioned file extension remove module 08 is applied to second in specific embodiment shown in Fig. 4 Kind mode.
The embodiment of the present invention can be in above-mentioned file extension sequence include multiple above-mentioned standard file extensions it is more Secondary execution accesses fault tolerant operation, improves the enforceability of the code in the address access process to file, reduces technology people The maintenance work of member.
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also include other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, identical similar portion between each embodiment Point just to refer each other, and each embodiment focuses on the differences from other embodiments.Especially for method reality For applying example, since it is substantially similar to system embodiment, so description is fairly simple, related place is referring to embodiment of the method Part explanation.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered It is considered as protection scope of the present invention.

Claims (10)

1. a kind of access address fault-tolerance approach, which is characterized in that the method includes:
Obtain access address;
Judge whether the file destination extension name in the access address obtained is correct;
It is incorrect in response to the file destination extension name, determine that the normative document to match with the file destination extension name expands Open up name;
The file destination extension name is replaced with into the criteria file extension determined, obtains the access address after error correction.
2. according to the method described in claim 1, it is characterized in that, the file destination in the access address for judging to obtain expands Whether correct open up name, including:
Judge to whether there is standard identical with the file destination extension name in preset at least one criteria file extension File extension, if not, judging that the file destination extension name is incorrect;If so, judging the file destination extension name Correctly.
3. according to the method described in claim 2, it is characterized in that, what the determination matched with the file destination extension name Criteria file extension, including:
From at least one criteria file extension, criteria file extension alternative collection is determined;Wherein, the standard text Part extension name alternative collection includes:Matching degree between the file destination extension name is more than or not less than the mark of matching degree threshold value Quasi- file extension;
According to the sequence that the matching degree is descending, to the criteria file extension in the criteria file extension alternative collection It is ranked up, obtains file extension sequence;
Primary criteria file extension will be located in the file extension sequence, is determined as extending with the file destination The matched criteria file extension of famous prime minister.
4. according to the method described in claim 2, it is characterized in that, what the determination matched with the file destination extension name Criteria file extension, including:
According to the sequence that the matching degree between the file destination extension name is descending, at least one normative document Extension name is ranked up, and obtains file extension sequence;
Primary criteria file extension will be located in the file extension sequence, is determined as extending with the file destination The matched criteria file extension of famous prime minister.
5. method according to claim 3 or 4, which is characterized in that
After the access address after obtaining error correction, the method further includes:Execution accesses fault tolerant operation at least once, until meeting Stop condition.
6. according to the method described in claim 5, it is characterized in that, the access fault tolerant operation includes:
Access the access address after error correction;
If accessing failure, the file destination extension name is replaced with into next normative document in the file extension sequence and is expanded Name is opened up, the access address after error correction is retrieved;
The stop condition includes:The file destination extension name is located at last position in the file extension sequence, or Person accesses successfully.
7. according to the method described in claim 5, it is characterized in that, the access fault tolerant operation includes:
It removes and is located at primary criteria file extension in the file extension sequence;
Access the access address after error correction;
If accessing failure, the file destination extension name is replaced with and is located at primary standard in the file extension sequence File extension retrieves the access address after error correction;
The stop condition includes:The file extension sequence is sky, alternatively, accessing successfully.
8. a kind of access address fault tolerance facility, which is characterized in that the access address fault tolerance facility includes:Access address obtains mould Block, file extension judgment module, file extension determining module and file extension replacement module;
The access address acquisition module is for obtaining access address;
Whether the file destination extension name in the access address that the file extension judgment module is used to judge to obtain is correct;
The file extension determining module is used to judge the file destination extension name in the file extension judgment module After incorrect, the criteria file extension to match with the file destination extension name is determined;
The file extension replacement module is used to replace with the file destination extension name normative document extension determined Name, obtains the access address after error correction.
9. access address fault tolerance facility according to claim 8, which is characterized in that the file extension determining module packet It includes:Sequence determination sub-module and extension name determination sub-module;
The sequence determination sub-module is used for according to the descending sequence of the matching degree, standby to the criteria file extension Criteria file extension in selected works is ranked up, and obtains file extension sequence;Alternatively, for according to the file destination The descending sequence of matching degree between extension name, is ranked up at least one criteria file extension, obtains text Part extension name sequence;
The extension name determination sub-module is used to that primary criteria file extension will to be located in the file extension sequence, It is determined as the criteria file extension to match with the file destination extension name.
10. access address fault tolerance facility according to claim 9, which is characterized in that the access fault tolerance facility further includes Access fault tolerant operation execution module;
The access fault tolerant operation execution module is used for after the access address after obtaining error correction, and the method further includes:It executes Fault tolerant operation is accessed at least once, until meeting stop condition.
CN201810497582.7A 2018-05-22 2018-05-22 A kind of access address fault-tolerance approach and fault tolerance facility Pending CN108763404A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810497582.7A CN108763404A (en) 2018-05-22 2018-05-22 A kind of access address fault-tolerance approach and fault tolerance facility

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810497582.7A CN108763404A (en) 2018-05-22 2018-05-22 A kind of access address fault-tolerance approach and fault tolerance facility

Publications (1)

Publication Number Publication Date
CN108763404A true CN108763404A (en) 2018-11-06

Family

ID=64004778

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810497582.7A Pending CN108763404A (en) 2018-05-22 2018-05-22 A kind of access address fault-tolerance approach and fault tolerance facility

Country Status (1)

Country Link
CN (1) CN108763404A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050039100A1 (en) * 2003-08-14 2005-02-17 International Business Machines Corporation Method and system for automatic error recovery in an electronic mail system
CN102566768A (en) * 2010-12-13 2012-07-11 腾讯科技(深圳)有限公司 Method and system for automatic character judgment and correction
CN102609473A (en) * 2012-01-17 2012-07-25 钟进发 Method and system for website accessing
CN103812906A (en) * 2012-11-14 2014-05-21 腾讯科技(深圳)有限公司 Website recommendation method and device and communication system
CN105760538A (en) * 2016-03-14 2016-07-13 广州神马移动信息科技有限公司 URL (Uniform Resource Locator) input method based on browser address bar and browser

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050039100A1 (en) * 2003-08-14 2005-02-17 International Business Machines Corporation Method and system for automatic error recovery in an electronic mail system
CN102566768A (en) * 2010-12-13 2012-07-11 腾讯科技(深圳)有限公司 Method and system for automatic character judgment and correction
CN102609473A (en) * 2012-01-17 2012-07-25 钟进发 Method and system for website accessing
CN103812906A (en) * 2012-11-14 2014-05-21 腾讯科技(深圳)有限公司 Website recommendation method and device and communication system
CN105760538A (en) * 2016-03-14 2016-07-13 广州神马移动信息科技有限公司 URL (Uniform Resource Locator) input method based on browser address bar and browser

Similar Documents

Publication Publication Date Title
US5892919A (en) Spell checking universal resource locator (URL) by comparing the URL against a cache containing entries relating incorrect URLs submitted by users to corresponding correct URLs
US8768920B1 (en) Posting questions from search queries
CN102110132A (en) Uniform resource locator matching and searching method, device and network equipment
JP2005346166A (en) Language discrimination device, translation device, translation server, language discriminating method, and translation processing method
CN112000355A (en) Method and device for firmware upgrading and household appliance
CN105205080A (en) Redundant file clearing method, device and system
CN102185830B (en) A kind of method and system of security filtration of network television browser
CN105653563A (en) Control method for grabbing webpage, dynamical updating method for black list and white list and related apparatus
CN110516124B (en) File analysis method and device and computer readable storage medium
CN105260469A (en) Sitemap processing method, apparatus and device
CN101257461A (en) Method and apparatus for filtering content based on classification
CN107483238A (en) A kind of blog management method, cluster management node and system
CN108763404A (en) A kind of access address fault-tolerance approach and fault tolerance facility
CN108876314B (en) Career professional ability traceable method and platform
US20020178407A1 (en) Method for system obstacle correspondence support
CN106897297B (en) Method and device for determining access path between website columns
CN115689391B (en) Data disaster recovery method and system based on electronic commerce and cloud platform
CN105959779A (en) Method and device for updating satellite frequency points in set top box
CN108108381B (en) Page monitoring method and device
CN104899320A (en) Webpage repair method, terminal, server and system
US20100205191A1 (en) User access time based content filtering
CN113032363A (en) Chaos test optimization method and system based on k-means algorithm
CN113010794A (en) Method and device for information recommendation, electronic equipment and storage medium
CN112800311A (en) Browser page data acquisition method, terminal device and storage medium
CN111698330A (en) Data recovery method and device of storage cluster and server

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20181106

RJ01 Rejection of invention patent application after publication