CN107172070A - Resource access processing method and device - Google Patents
Resource access processing method and device Download PDFInfo
- Publication number
- CN107172070A CN107172070A CN201710453581.8A CN201710453581A CN107172070A CN 107172070 A CN107172070 A CN 107172070A CN 201710453581 A CN201710453581 A CN 201710453581A CN 107172070 A CN107172070 A CN 107172070A
- Authority
- CN
- China
- Prior art keywords
- resource
- path information
- resource access
- protocol version
- access path
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/13—File access structures, e.g. distributed indices
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The present invention proposes a kind of resource access processing method and device, wherein, method includes:The resource access request that receiving terminal is sent, wherein, resource access request includes uniform resource position mark URL;URL is parsed, to obtain the storage relative path information that the protocol version in URL, type of service are identified and encoded;Storage relative path information to coding is decoded, to obtain decoded storage relative path information;Resource access path information is determined according to protocol version, type of service mark and decoded storage relative path information;Resource is read according to resource access path information, and provides the terminal with resource.The embodiment of the present invention provides method, during resource is accessed, it is to avoid the resource consumption of mapping table inquiry, reduces the time that resource is consumed that accesses, improves the efficiency for accessing resource.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of resource access processing method and device.
Background technology
It is to set up a resource identifier and resource actual storage road to the access mode of resource file in correlation technique
The mapping relations in footpath.Then, resource identification is added in URL (Uniform Resoure Locator, URL)
Symbol, server end is after resource access request is received, and the resource identifier end inquiry mapping in resource access request is closed
System, obtains the corresponding resource store path of identifier, and then obtain real resource.
However, inventor has found that correlation technique at least has problems with during the present invention is realized:1) dimension is needed
Shield and reading mapping table, reduce access speed, add system complexity;2) uploading resource file needs to write mapping table,
Add operation flow and maintenance cost;3) when actual storage path is changed, it is not easy to accomplish back compatible, it is necessary to clean
Data in mapping table, edition upgrading can also introduce the cutover flow that new system is upgraded to legacy system;If 4) resource identifier
It is regular, then it is easy to be traversed crawl, causes resource by malicious access.
The content of the invention
It is contemplated that at least solving one of technical problem in correlation technique to a certain extent.
Therefore, first purpose of the present invention is to propose a kind of resource access processing method, the process accessed in resource
In, it can directly obtain resource by protocol version, type of service mark and decoded storage relative path information and access
Routing information, it is to avoid the resource consumption of mapping table inquiry, reduces the time that resource is consumed that accesses, improves access resource
Efficiency, and coding carried out to the store path of resource ensure that storage is unreadable, it is to avoid resource path is traversed, and is reduced
The occurrence of resource malice is accessed.
Second object of the present invention is to propose a kind of resource access process device.
Third object of the present invention is to propose a kind of non-transitorycomputer readable storage medium.
For up to above-mentioned purpose, first aspect present invention embodiment proposes a kind of resource access processing method, including:Receive
The resource access request that terminal is sent, wherein, the resource access request includes uniform resource position mark URL;The URL is entered
Row parsing, to obtain the storage relative path information that the protocol version in the URL, type of service are identified and encoded;To institute
The storage relative path information for stating coding is decoded, to obtain decoded storage relative path information;According to the agreement
Version number, type of service mark and the decoded storage relative path information determine resource access path information;Root
Resource is read according to the resource access path information, and the resource is provided to the terminal.
According to one embodiment of present invention, it is described to be identified and described according to the protocol version, the type of service
Decoded storage relative path information determines resource access path information, including:Money is determined according to type of service mark
Source storage class, and obtain resource reference address prefix corresponding with the resource storage class;According to the resource access
Location prefix and decoded storage relative path information generation first resource access path information;According to the protocol version and
The first resource access path information determines the resource access path information.
According to one embodiment of present invention, it is described to be believed according to the protocol version and the first resource access path
Breath determines the resource access path information, including:Obtain the protocol version of server end;Judge the agreement in the URL
Whether version number is consistent with the protocol version of the server end;If it is judged that protocol version and institute in the URL
The protocol version for stating server end is consistent, then believes the first resource access path information as the resource access path
Breath.
According to one embodiment of present invention, methods described also includes:If it is determined that protocol version in the URL with
The protocol version of the server end is inconsistent, then determines whether whether the server end adjusts first resource and access road
Footpath information;If it is judged that the server end adjusts the first resource access path information, then the first resource is obtained
The path adjustment information of access path information;Generated according to the path adjustment information and the first resource access path information
The resource access path information.
According to one embodiment of present invention, methods described also includes:If it is judged that the server end does not adjust institute
First resource access path information is stated, then regard the first resource access path information as the resource access path information.
The resource access processing method of the embodiment of the present invention, is entered by the URL in the resource access request that is sent to terminal
Row parsing, parses protocol version, type of service mark and the storage relative path information encoded in URL, then, to compiling
The storage relative path information of code is decoded, to obtain decoded storage relative path information, afterwards, according to protocol version
Number, type of service mark and decoded storage relative path information determine resource access path information, and visited according to resource
Ask that routing information reads resource, and provide the terminal with resource, thus, during resource is accessed, pass through protocol version, industry
Service type is identified and decoded storage relative path information can directly obtain resource access path information, it is to avoid mapping table
The resource consumption of inquiry, reduces the time that resource is consumed that accesses, improves the efficiency for accessing resource, and resource is deposited
Storage path carries out coding and ensure that storage is unreadable, it is to avoid resource path is traversed, and reduces the accessed situation of resource malice
Generation.
For up to above-mentioned purpose, second aspect of the present invention embodiment proposes a kind of resource access process device, including:Receive
Module, the resource access request sent for receiving terminal, wherein, the resource access request includes URL
URL;Parsing module, for being parsed to the URL, with obtain the protocol version in the URL, type of service mark and
The storage relative path information of coding;Decoder module, is decoded for the storage relative path information to the coding, to obtain
Take decoded storage relative path information;Determining module, for according to the protocol version, the type of service mark and
The decoded storage relative path information determines resource access path information;Module is provided, for being visited according to the resource
Ask that routing information reads resource, and the resource is provided to the terminal.
According to one embodiment of present invention, the determining module, including:Processing unit, for according to the service class
Type mark determines resource storage class, and obtains resource reference address prefix corresponding with the resource storage class;Generation is single
Member, for generating first resource access path according to the resource reference address prefix and decoded storage relative path information
Information;Determining unit, for determining that the resource is visited according to the protocol version and the first resource access path information
Ask routing information.
According to one embodiment of present invention, the determining unit, including:First obtains subelement, for obtaining service
The protocol version at device end;First judgment sub-unit, for judging the protocol version in the URL and the server end
Whether protocol version is consistent;First determination subelement, for the protocol version in the URL is judged and the service
When the protocol version at device end is consistent, the first resource access path information is regard as the resource access path information.
According to one embodiment of present invention, the determining unit, in addition to:Second judgment sub-unit, for judging
When the protocol version of protocol version and the server end in the URL is inconsistent, the server is determined whether
Whether end adjusts the first resource access path information;Second obtains subelement, for judging the server end tune
During the whole first resource access path information, the path adjustment information of the first resource access path information is obtained;Generation
Subelement, for generating the resource access path according to the path adjustment information and the first resource access path information
Information.
According to one embodiment of present invention, the determining unit, in addition to:Second determination subelement, for judging
When going out the server end and not adjusting the first resource access path information, using the first resource access path information as
The resource access path information.
The resource access process device of the embodiment of the present invention, is entered by the URL in the resource access request that is sent to terminal
Row parsing, parses protocol version, type of service mark and the storage relative path information encoded in URL, then, to compiling
The storage relative path information of code is decoded, to obtain decoded storage relative path information, afterwards, according to protocol version
Number, type of service mark and decoded storage relative path information determine resource access path information, and visited according to resource
Ask that routing information reads resource, and provide the terminal with resource, thus, during resource is accessed, pass through protocol version, industry
Service type is identified and decoded storage relative path information can directly obtain resource access path information, it is to avoid mapping table
The resource consumption of inquiry, reduces the time that resource is consumed that accesses, improves the efficiency for accessing resource, and resource is deposited
Storage path carries out coding and ensure that storage is unreadable, it is to avoid resource path is traversed, and reduces the accessed situation of resource malice
Generation.
For up to above-mentioned purpose, third aspect present invention embodiment proposes a kind of non-transitory computer-readable storage medium
Matter, is stored thereon with computer program, is realized when computer program is executed by processor as described in first aspect embodiment
Resource access processing method.
The additional aspect of the present invention and advantage will be set forth in part in the description, and will partly become from the following description
Obtain substantially, or recognized by the practice of the present invention.
Brief description of the drawings
Of the invention above-mentioned and/or additional aspect and advantage will become from the following description of the accompanying drawings of embodiments
Substantially and be readily appreciated that, wherein:
Fig. 1 is the schematic flow sheet of the resource access processing method according to one embodiment of the invention;
Fig. 2 is the schematic flow sheet of the resource access processing method according to another embodiment of the present invention;
Fig. 3 is the structural representation of the resource access process device according to another embodiment of the present invention;
Fig. 4 is the structural representation of the resource access process device according to another embodiment of the invention;
Fig. 5 is the structural representation of the resource access process device according to further embodiment of the present invention;
Fig. 6 is the structural representation of the resource access process device according to another embodiment of the invention.
Embodiment
Embodiments of the invention are described below in detail, the example of embodiment is shown in the drawings, wherein identical from beginning to end
Or similar label represents same or similar element or the element with same or like function.Retouched below with reference to accompanying drawing
The embodiment stated is exemplary, it is intended to for explaining the present invention, and be not considered as limiting the invention.
Below with reference to the accompanying drawings the resource access processing method and device of the embodiment of the present invention described.
Fig. 1 is the schematic flow sheet of the resource access processing method according to one embodiment of the invention.
As shown in figure 1, the resource access processing method comprises the following steps:
S101, the resource access request that receiving terminal is sent.
Wherein, resource access request includes uniform resource position mark URL.
Specifically, the resource access processing method that the present embodiment is provided, can be with resource access process provided by the present invention
Device is performed, and the device can be configured in server end, to realize the quick access of resource.
Wherein, terminal can be that the hardware that personal computer PC, mobile phone, tablet personal computer etc. have various operating systems is set
It is standby.
S102, is parsed to URL, to obtain the storage phase that the protocol version in URL, type of service are identified and encoded
To routing information.
In one embodiment of the invention, after the URL in obtaining resource access request, using the parsing pre-set
Rule is parsed to URL, to parse the storage relative path that the protocol version in URL, type of service are identified and encoded
Information.
For example, it is assumed that the URL in the resource access request that user is provided by terminal to server is http://
Imageserver.com/v0102/Y4xvo43io450o4kiM2wio4W, enters according to the resolution rules pre-set to the URL
Row parsing, the protocol version that can be parsed in the URL is " v01 ", and type of service is designated " 02 ", and the storage of coding is relative
Routing information is " Y4xvo43io450o4kiM2wio4W ".
, wherein it is desired to understand, the storage relative path information of the coding in the embodiment in URL is by non-public
Encryption algorithm encoded, the storage relative path information irregularities of coding, therefore, it is to avoid storage relative path information quilt
The occurrence of traversal conjecture, it is ensured that securities of the URL in open transmission environment.
S103, the storage relative path information to coding is decoded, to obtain decoded storage relative path information.
As a kind of exemplary embodiment, storage of the rule to coding can be decoded according to the relative path pre-saved
Relative path information is decoded, to obtain decoded storage relative path information.
As another exemplary embodiment, protocol version that can be in URL determines correspondence protocol version
Relative path decoding rule, and solved according to the storage relative path information of identified relative path decoding rule encoding
Code, to obtain decoded storage relative path information.
S104, determines that resource is visited according to protocol version, type of service mark and decoded storage relative path information
Ask routing information.
Wherein, resource access path information refers to the actual persistent storage address information of resource in server end.
It wherein it is determined that the mode of resource access path information has a variety of, can be needed to be selected according to practical application, lifted
Example is described as follows:
As a kind of exemplary embodiment, protocol version, type of service mark and decoded storage are being obtained
After relative path information, resource storage class can be determined according to type of service mark, and obtain corresponding with resource storage class
Resource reference address prefix, then, according to resource reference address prefix and decoded storage relative path information generation first
Resource access path information, and determine that resource access path is believed according to protocol version and first resource access path information
Breath.
As another exemplary embodiment, obtaining protocol version, type of service mark and decoded depositing
Store up after relative path information, resource storage class can be determined according to protocol version and type of service mark, and obtain and resource
Storage class and the corresponding resource reference address prefix of protocol version, then, after resource reference address prefix and decoding
Storage relative path information generation resource access path information.
S105, reads resource, and provide the terminal with resource according to resource access path information.
For example, it is assumed that the URL in the resource access request that user can be provided by terminal to server is
http://imageserver.com/v0102/Y4xvo43io450o4kiM2wio4W, according to the resolution rules pair pre-set
The URL is parsed, and the protocol version that can be parsed in the URL is " v01 ", and type of service is designated " 02 ", coding
It is " Y4xvo43io450o4kiM2wio4W " to store relative path information, it is assumed that according to the corresponding relative path of protocol version
Resolution rules are decoded to the storage relative path information of coding, and the decoded storage relative path information obtained is
" icon/system/building.png ", and determine that the corresponding resource of resource storage class is accessed according to type of service mark
Address prefix is " hdfs://IP:PORT/user/resource ", it is assumed that conciliate according to protocol version, type of service mark
Storage relative path information after code determines that resource access path information is " hdfs://IP:PORT/user/resource/
Icon/system/building.png " now, can read corresponding picture resource from the resource access path information, and to end
End provides the picture resource, to facilitate user to check accessed picture resource by terminal.
The resource access processing method of the embodiment of the present invention, is entered by the URL in the resource access request that is sent to terminal
Row parsing, parses protocol version, type of service mark and the storage relative path information encoded in URL, then, to compiling
The storage relative path information of code is decoded, to obtain decoded storage relative path information, afterwards, according to protocol version
Number, type of service mark and decoded storage relative path information determine resource access path information, and visited according to resource
Ask that routing information reads resource, and provide the terminal with resource, thus, during resource is accessed, pass through protocol version, industry
Service type is identified and decoded storage relative path information can directly obtain resource access path information, it is to avoid mapping table
The resource consumption of inquiry, reduces the time that resource is consumed that accesses, improves the efficiency for accessing resource, and resource is deposited
Storage path carries out coding and ensure that storage is unreadable, it is to avoid resource path is traversed, and reduces the accessed situation of resource malice
Generation.
Fig. 2 is the schematic flow sheet of the resource access processing method according to another embodiment of the present invention.
As shown in Fig. 2 the resource access processing method comprises the following steps:
S201, the resource access request that receiving terminal is sent.
Wherein, resource access request includes uniform resource position mark URL.
S202, is parsed to URL, to obtain the storage phase that the protocol version in URL, type of service are identified and encoded
To routing information.
S203, the storage relative path information to coding is decoded, to obtain decoded storage relative path information.
, wherein it is desired to explanation, the step of abovementioned steps S101-S103 explanation is also applied for the embodiment
S201-S203, here is omitted.
S204, determines resource storage class, and obtain resource corresponding with resource storage class according to type of service mark
Reference address prefix.
Wherein, type of service mark is the unique mark of type of service.
, wherein it is desired to explanation, type of service mark can be indicated in the form of numeral or character, the reality
Example is applied to be not construed as limiting this.
As a kind of example, it can represent that type of service is identified using 16 binary values, the maximum of type of service mark is
Ff, that is to say, that can represent 256 types of service by 16 binary values.
Wherein, storage class can include but is not limited in local disk, HDFS (Hadoop Distributed File
System, Hadoop distributed file system), NFS (Network File System, NFS), proxy server
Proxy etc..
, wherein it is desired to understand, can be according to business side's needs during storage system storage resource, setting pair
Answer the storage class of resource.That is, resource can be stored in into local disk, HDFS (Hadoop according to business side's needs
Distributed File System, Hadoop distributed file system), NFS (Network File System, network text
Part system), in any storage system such as proxy server proxy, thus, the flexible storage of resource can be achieved.
In one embodiment of the invention, can be according to the type of service pre-saved after type of service mark is obtained
The corresponding relation of mark and resource storage class, obtains and identifies corresponding resource storage class with corresponding type of service.
, can be according to the resource storage class pre-saved and resource reference address prefix pair after resource storage class is obtained
It should be related to, it is determined that the resource reference address prefix of correspondence resource storage class.
For example, it is assumed that the corresponding relation pre-saved is:Type of service mark 01 represents local disk, local disk
Corresponding resource reference address prefix is /home/user/resource;Type of service mark 02 represents HDFS, then HDFS is local
The corresponding resource reference address prefix of disk is hdfs://IP:PORT/user/resource;Type of service mark 03 is represented
NFS systems, the corresponding resource reference address prefix of NFS systems is nfs://IP:PORT/user/resource.If parsed
Type of service in URL is designated 02, then acquired resource reference address prefix is hdfs://IP:PORT/user/
resource。
S205, road is accessed according to resource reference address prefix and decoded storage relative path information generation first resource
Footpath information.
For example, it is hdfs to identify acquired resource reference address prefix according to the type of service parsed in URL://
IP:PORT/user/resource, after the storage relative path information decoding of the coding in URL, acquired is decoded
It is icon/system/building.png to store relative path information, now, can be by after resource reference address prefix and decoding
Storage relative path information spliced, the first resource access path information obtained after splicing be hdfs://IP:
PORT/user/resource/icon/system/building.png。
S206, obtains the protocol version of server end.
, wherein it is desired to which explanation, the protocol version of server end is greater than the protocol version in URL.
S207, judges whether the protocol version of protocol version in URL and server end is consistent, if it is, holding
Row step S208, otherwise performs step S209.
S208, regard first resource access path information as resource access path information.
S209, judges whether server end adjusts first resource access path information, if it is, performing step S300-
S301, otherwise performs S208.
S300, obtains the path adjustment information of first resource access path information.
, wherein it is desired to understand, in actual applications, can be in first resource access path letter letter in service end
Relative path information is adjusted, and the path access address prefix in first resource access path letter can also be adjusted
It is whole.
S301, resource access path information is generated according to path adjustment information and first resource access path information.
In order that obtaining after protocol version upgrading, user can be remained unchanged by the URL comprising old protocol version and can be had access to
Corresponding resource, the embodiment is during more redaction, and the path adjustment information to resource is preserved, and in URL
Protocol version and server end in protocol version it is inconsistent when, i.e. user is accessed by the URL of old protocol version
During resource, the money of resource is preserved by the new protocol version of the path adjustment information and first resource access path acquisition of information of preservation
Source access path information.Hereby it is achieved that compatible before and after protocol version upgrading so that user can be by including old protocol version
URL, which remains unchanged, can have access to corresponding resource, improve the Consumer's Experience of user access resources.
For example, the protocol version of server end is that the protocol version in " v03 ", URL is " v01 ", and root
The first resource access path information generated according to resource reference address prefix and decoded storage relative path information is:
hdfs://IP:PORT/user/resource/icon/system/building.png..Assuming that in " v03 " version, service
Device end is adjusted to first resource access path information, the road of the first resource access path information preserved in server end
Footpath adjustment information is that Resource TOC has been moved to " newpath " from " icon ".Now, server end can be according to path adjustment information
By newpath after the icon adjustment in first resource access path information, to generate final resource access path information, give birth to
Into resource access path information hdfs://IP:PORT/user/resource/newpath/system/building.png.
After final resource access path information is obtained, corresponding picture resource can be read from the resource access path information, and
Provide the terminal with picture resource.
In another example, the protocol version of server end is that the protocol version in " v03 ", URL is " v01 ", and according to
Resource reference address prefix and the first resource access path information of decoded storage relative path information generation are:
hdfs://IP:PORT/user/resource/icon/system/building.png.Assuming that in " v03 " version, service
Device end adjusts first resource access path information, and the storage class of resource is adjusted into storage class 3 from storage class 2, it is assumed that
The corresponding resource reference address prefix of storage class 3 is:nfs://IP:PORT/user/resource, now, server end can
First resource access path information is adjusted according to path adjustment information, to generate final resource access path information, generated
Resource access path information nfs://IP:PORT/user/resource/newpath/system/building.png.
Obtain after final resource access path information, can read corresponding picture resource from the resource access path information, and to
Terminal provides picture resource.
The resource access processing method of the embodiment of the present invention, is entered by the URL in the resource access request that is sent to terminal
Row parsing, parses protocol version, type of service mark and the storage relative path information encoded in URL, then, to compiling
The storage relative path information of code is decoded, to obtain decoded storage relative path information, and according to type of service mark
The resource reference address prefix for obtaining correspondence resource storage class is known, then, according to resource reference address prefix and decoded
Store relative path information generation first resource access path information, and it is determined that protocol version and server end in URL
Protocol version it is consistent when, using first resource access path information as resource access path information, and accessed according to resource
Routing information reads resource, and provides the terminal with resource, thus, during resource is accessed, passes through protocol version, business
Type identification and decoded storage relative path information can directly obtain resource access path information, it is to avoid mapping table is looked into
The resource consumption of inquiry, reduces the time that resource is consumed that accesses, improves the efficiency for accessing resource, and to the storage of resource
Path carries out coding and ensure that storage is unreadable, it is to avoid resource path is traversed, and reduces the accessed situation of resource malice
Occur.
In order to realize above-described embodiment, the present invention also proposes a kind of resource access process device.
Fig. 3 is to be intended to according to the structure of the resource access process device of one embodiment of the invention.
As shown in figure 3, the resource access process device can include receiving module 110, parsing module 120, decoder module
130th, determining module 140 and offer module 150, wherein:
Receiving module 110 is used for the resource access request that receiving terminal is sent.
Wherein, resource access request includes uniform resource position mark URL.
Parsing module 120 is used to parse URL, identifies and compiles to obtain the protocol version in URL, type of service
The storage relative path information of code.
Decoder module 130 is used to decode the storage relative path information of coding, to obtain decoded storage phase
To routing information.
Determining module 140 is used for according to protocol version, type of service mark and decoded storage relative path information
Determine resource access path information.
There is provided module 150 is used to read resource according to resource access path information, and provides the terminal with resource.
In one embodiment of the invention, on the basis of the embodiment shown in Fig. 3, as shown in figure 4, determining module
140 can include processing unit 141, generation unit 142 and determining unit 143, wherein:
Processing unit 141 is used to determine resource storage class according to type of service mark, and obtains and resource storage class
Corresponding resource reference address prefix.
Generation unit 142 is used for according to resource reference address prefix and decoded storage relative path information generation first
Resource access path information.
Determining unit 143 is used to determine that resource access path is believed according to protocol version and first resource access path information
Breath.
In one embodiment of the invention, on the basis of the embodiment shown in Fig. 4, as shown in figure 5, determining unit
143, which can include first, obtains subelement 1431, the first judgment sub-unit 1432 and the first determination subelement 1433, wherein:
First acquisition subelement 1431 is used for the protocol version for obtaining server end.
First judgment sub-unit 1432 be used to judging protocol version in URL and server end protocol version whether
Unanimously.
Protocol version and the protocol version of server end that first determination subelement 1433 is used in URL is judged
When consistent, first resource access path information is regard as resource access path information.
On the basis of the embodiment shown in Fig. 5, as shown in fig. 6, determining unit 143 also includes the second judgment sub-unit
1434th, second subelement 1435 and generation subelement 1436 are obtained, wherein:
The protocol version and the protocol version of server end that second judgment sub-unit 1434 is used in URL is judged are not
When consistent, determine whether whether server end adjusts first resource access path information.
Second acquisition subelement 1435 is used to, when judging that server end adjusts first resource access path information, obtain
The path adjustment information of first resource access path information.
Generating subelement 1436 is used to be accessed according to path adjustment information and first resource access path information generation resource
Routing information.
As shown in fig. 6, determining unit 143 also includes the second determination subelement 1437, second determination subelement 1437 is used
When judging that server end does not adjust first resource access path information, first resource access path information is regard as resource
Access path information.
, wherein it is desired to which explanation, the foregoing explanation to resource access processing method embodiment is also applied for the reality
The resource access process device embodiment of example is applied, here is omitted.
The resource access process device of the embodiment of the present invention, is entered by the URL in the resource access request that is sent to terminal
Row parsing, parses protocol version, type of service mark and the storage relative path information encoded in URL, then, to compiling
The storage relative path information of code is decoded, to obtain decoded storage relative path information, afterwards, according to protocol version
Number, type of service mark and decoded storage relative path information determine resource access path information, and visited according to resource
Ask that routing information reads resource, and provide the terminal with resource, thus, during resource is accessed, pass through protocol version, industry
Service type is identified and decoded storage relative path information can directly obtain resource access path information, it is to avoid mapping table
The resource consumption of inquiry, reduces the time that resource is consumed that accesses, improves the efficiency for accessing resource, and resource is deposited
Storage path carries out coding and ensure that storage is unreadable, it is to avoid resource path is traversed, and reduces the accessed situation of resource malice
Generation.
In order to realize above-described embodiment, the present invention also proposes a kind of non-transitorycomputer readable storage medium, deposited thereon
Computer program is contained, the resource access process such as previous embodiment can be realized when the computer program is executed by processor
Method.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means to combine specific features, structure, material or the spy that the embodiment or example are described
Point is contained at least one embodiment of the present invention or example.In this manual, to the schematic representation of above-mentioned term not
Identical embodiment or example must be directed to.Moreover, specific features, structure, material or the feature of description can be with office
Combined in an appropriate manner in one or more embodiments or example.In addition, in the case of not conflicting, the skill of this area
Art personnel can be tied the not be the same as Example or the feature of example and non-be the same as Example or example described in this specification
Close and combine.
In addition, term " first ", " second " are only used for describing purpose, and it is not intended that indicating or implying relative importance
Or the implicit quantity for indicating indicated technical characteristic.Thus, define " first ", the feature of " second " can express or
Implicitly include at least one this feature.In the description of the invention, " multiple " are meant that at least two, such as two, three
It is individual etc., unless otherwise specifically defined.
Any process described otherwise above or method description are construed as in flow chart or herein, represent to include
Module, fragment or the portion of the code of one or more executable instructions for the step of realizing custom logic function or process
Point, and the scope of the preferred embodiment of the present invention includes other realization, wherein can not be by shown or discussion suitable
Sequence, including according to involved function by it is basic simultaneously in the way of or in the opposite order, carry out perform function, this should be of the invention
Embodiment person of ordinary skill in the field understood.
Represent in flow charts or logic and/or step described otherwise above herein, for example, being considered use
In the order list for the executable instruction for realizing logic function, it may be embodied in any computer-readable medium, for
Instruction execution system, device or equipment (such as computer based system including the system of processor or other can be held from instruction
The system of row system, device or equipment instruction fetch and execute instruction) use, or combine these instruction execution systems, device or set
It is standby and use.For the purpose of this specification, " computer-readable medium " can any can be included, store, communicate, propagate or pass
Defeated program is for instruction execution system, device or equipment or the dress for combining these instruction execution systems, device or equipment and using
Put.The more specifically example (non-exhaustive list) of computer-readable medium includes following:Electricity with one or more wirings
Connecting portion (electronic installation), portable computer diskette box (magnetic device), random access memory (RAM), read-only storage
(ROM), erasable edit read-only storage (EPROM or flash memory), fiber device, and portable optic disk is read-only deposits
Reservoir (CDROM).In addition, can even is that can be in the paper of printing described program thereon or other are suitable for computer-readable medium
Medium, because can then enter edlin, interpretation or if necessary with it for example by carrying out optical scanner to paper or other media
His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each several part of the present invention can be realized with hardware, software, firmware or combinations thereof.Above-mentioned
In embodiment, the software that multiple steps or method can in memory and by suitable instruction execution system be performed with storage
Or firmware is realized.Such as, if realized with hardware with another embodiment, following skill well known in the art can be used
Any one of art or their combination are realized:With the logic gates for realizing logic function to data-signal from
Scattered logic circuit, the application specific integrated circuit with suitable combinational logic gate circuit, programmable gate array (PGA), scene can be compiled
Journey gate array (FPGA) etc..
Those skilled in the art are appreciated that to realize all or part of step that above-described embodiment method is carried
Rapid to can be by program to instruct the hardware of correlation to complete, described program can be stored in a kind of computer-readable storage medium
In matter, the program upon execution, including one or a combination set of the step of embodiment of the method.
In addition, each functional unit in each embodiment of the invention can be integrated in a processing module, can also
That unit is individually physically present, can also two or more units be integrated in a module.Above-mentioned integrated mould
Block can both be realized in the form of hardware, it would however also be possible to employ the form of software function module is realized.The integrated module is such as
Fruit is realized using in the form of software function module and as independent production marketing or in use, can also be stored in a computer
In read/write memory medium.
Storage medium mentioned above can be read-only storage, disk or CD etc..Although having been shown and retouching above
Embodiments of the invention are stated, it is to be understood that above-described embodiment is exemplary, it is impossible to be interpreted as the limit to the present invention
System, one of ordinary skill in the art can be changed to above-described embodiment, change, replace and become within the scope of the invention
Type.
Claims (11)
1. a kind of resource access processing method, it is characterised in that comprise the following steps:
The resource access request that receiving terminal is sent, wherein, the resource access request includes uniform resource position mark URL;
The URL is parsed, to obtain the storage phase that the protocol version in the URL, type of service are identified and encoded
To routing information;
Storage relative path information to the coding is decoded, to obtain decoded storage relative path information;
Resource is determined according to the protocol version, type of service mark and the decoded storage relative path information
Access path information;
Resource is read according to the resource access path information, and the resource is provided to the terminal.
2. the method as described in claim 1, it is characterised in that described according to the protocol version, the type of service mark
Know and the decoded storage relative path information determines resource access path information, including:
Resource storage class is determined according to type of service mark, and obtains resource visit corresponding with the resource storage class
Ask address prefix;
According to the resource reference address prefix and decoded storage relative path information generation first resource access path letter
Breath;
The resource access path information is determined according to the protocol version and the first resource access path information.
3. method as claimed in claim 2, it is characterised in that described to be visited according to the protocol version and the first resource
Ask that routing information determines the resource access path information, including:
Obtain the protocol version of server end;
Judge whether the protocol version in the URL is consistent with the protocol version of the server end;
If it is judged that the protocol version in the URL is consistent with the protocol version of the server end, then by described
One resource access path information is used as the resource access path information.
4. method as claimed in claim 3, it is characterised in that methods described also includes:
If it is determined that the protocol version of the protocol version and the server end in the URL is inconsistent, then further sentence
Whether the server end that breaks adjusts first resource access path information;
If it is judged that the server end adjusts the first resource access path information, then obtain the first resource and access
The path adjustment information of routing information;
The resource access path information is generated according to the path adjustment information and the first resource access path information.
5. method as claimed in claim 4, it is characterised in that methods described also includes:
If it is judged that the server end does not adjust the first resource access path information, then the first resource is accessed
Routing information is used as the resource access path information.
6. a kind of resource access process device, it is characterised in that including:
Receiving module, the resource access request sent for receiving terminal, wherein, the resource access request includes unified resource
Finger URL URL;
Parsing module, for being parsed to the URL, with obtain the protocol version in the URL, type of service mark and
The storage relative path information of coding;
Decoder module, is decoded for the storage relative path information to the coding, relative to obtain decoded storage
Routing information;
Determining module, for according to the protocol version, type of service mark and the relative road of the decoded storage
Footpath information determines resource access path information;
Module is provided, for reading resource according to the resource access path information, and the resource is provided to the terminal.
7. device as claimed in claim 6, it is characterised in that the determining module, including:
Processing unit, class is stored for determining resource storage class according to type of service mark, and obtaining with the resource
The corresponding resource reference address prefix of type;
Generation unit, for being provided according to the resource reference address prefix and decoded storage relative path information generation first
Source access path information;
Determining unit, for determining that the resource is accessed according to the protocol version and the first resource access path information
Routing information.
8. device as claimed in claim 7, it is characterised in that the determining unit, including:
First obtains subelement, the protocol version for obtaining server end;
First judgment sub-unit, for judging that the protocol version of the protocol version in the URL and the server end is
It is no consistent;
First determination subelement, for the protocol version in the URL is judged and the protocol version of the server end
When number consistent, the first resource access path information is regard as the resource access path information.
9. device as claimed in claim 8, it is characterised in that the determining unit, in addition to:
Second judgment sub-unit, for the protocol version in the URL is judged and the protocol version of the server end
When inconsistent, determine whether whether the server end adjusts the first resource access path information;
Second obtains subelement, for when judging that the server end adjusts the first resource access path information, obtaining
Take the path adjustment information of the first resource access path information;
Subelement is generated, for generating the resource according to the path adjustment information and the first resource access path information
Access path information.
10. device as claimed in claim 9, it is characterised in that the determining unit, in addition to:
Second determination subelement, for when judging that the server end does not adjust the first resource access path information,
It regard the first resource access path information as the resource access path information.
11. a kind of non-transitorycomputer readable storage medium, is stored thereon with computer program, it is characterised in that the calculating
The resource access processing method as any one of claim 1-5 is realized when machine program is executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710453581.8A CN107172070B (en) | 2017-06-15 | 2017-06-15 | Resource access processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710453581.8A CN107172070B (en) | 2017-06-15 | 2017-06-15 | Resource access processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107172070A true CN107172070A (en) | 2017-09-15 |
CN107172070B CN107172070B (en) | 2020-02-18 |
Family
ID=59819716
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710453581.8A Active CN107172070B (en) | 2017-06-15 | 2017-06-15 | Resource access processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107172070B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110311983A (en) * | 2019-07-09 | 2019-10-08 | 北京字节跳动网络技术有限公司 | Processing method, device, system, electronic equipment and the storage medium of service request |
CN110321498A (en) * | 2018-03-30 | 2019-10-11 | 上海连尚网络科技有限公司 | A kind of two dimensional code generates and analyzing method and device |
CN111124539A (en) * | 2019-12-20 | 2020-05-08 | 腾讯科技(深圳)有限公司 | Initial scene resource file searching method, device, equipment and storage medium |
CN111190591A (en) * | 2019-09-06 | 2020-05-22 | 腾讯科技(深圳)有限公司 | Interface display method, data processing method, device, terminal and server |
CN111988298A (en) * | 2020-08-13 | 2020-11-24 | 山东伏羲智库互联网研究院 | Data processing method, device and equipment |
CN112235403A (en) * | 2020-10-14 | 2021-01-15 | 北京思特奇信息技术股份有限公司 | Method, device and system for gray level control in cutover process of new and old systems |
CN113535462A (en) * | 2021-07-14 | 2021-10-22 | 湖南快乐阳光互动娱乐传媒有限公司 | Resource verification method and device for content distribution network |
CN113904962A (en) * | 2021-12-08 | 2022-01-07 | 统信软件技术有限公司 | Resource access method and device and computing equipment |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101364979A (en) * | 2007-08-10 | 2009-02-11 | 鸿富锦精密工业(深圳)有限公司 | Downloaded material parsing and processing system and method |
CN101510210A (en) * | 2009-03-30 | 2009-08-19 | 腾讯科技(深圳)有限公司 | Method and apparatus for controlling display popup web page |
CN101924758A (en) * | 2010-07-28 | 2010-12-22 | 中兴通讯股份有限公司 | Media server and method thereof for providing services |
CN101989909A (en) * | 2009-08-04 | 2011-03-23 | 西安交大捷普网络科技有限公司 | Access link overwriting method of SSL VPN |
US8365271B2 (en) * | 2008-02-27 | 2013-01-29 | International Business Machines Corporation | Controlling access of a client system to access protected remote resources supporting relative URLs |
CN104079583A (en) * | 2014-07-17 | 2014-10-01 | 南京铱迅信息技术有限公司 | Website protection method based on character conversion from server side to client side |
US20150334080A1 (en) * | 2014-05-15 | 2015-11-19 | Reinaldo Tamayo | Systems and methods for a keyword/key phrase url and path replacement and management |
US20170068600A1 (en) * | 2014-08-27 | 2017-03-09 | Hitachi, Ltd. | Storage system, control method of storage system, server apparatus, and control method of server apparatus |
-
2017
- 2017-06-15 CN CN201710453581.8A patent/CN107172070B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101364979A (en) * | 2007-08-10 | 2009-02-11 | 鸿富锦精密工业(深圳)有限公司 | Downloaded material parsing and processing system and method |
US8365271B2 (en) * | 2008-02-27 | 2013-01-29 | International Business Machines Corporation | Controlling access of a client system to access protected remote resources supporting relative URLs |
CN101510210A (en) * | 2009-03-30 | 2009-08-19 | 腾讯科技(深圳)有限公司 | Method and apparatus for controlling display popup web page |
CN101989909A (en) * | 2009-08-04 | 2011-03-23 | 西安交大捷普网络科技有限公司 | Access link overwriting method of SSL VPN |
CN101924758A (en) * | 2010-07-28 | 2010-12-22 | 中兴通讯股份有限公司 | Media server and method thereof for providing services |
US20150334080A1 (en) * | 2014-05-15 | 2015-11-19 | Reinaldo Tamayo | Systems and methods for a keyword/key phrase url and path replacement and management |
CN104079583A (en) * | 2014-07-17 | 2014-10-01 | 南京铱迅信息技术有限公司 | Website protection method based on character conversion from server side to client side |
US20170068600A1 (en) * | 2014-08-27 | 2017-03-09 | Hitachi, Ltd. | Storage system, control method of storage system, server apparatus, and control method of server apparatus |
Non-Patent Citations (1)
Title |
---|
张如云: "基于内容组的网站访问者路径分析", 《计算机时代》 * |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110321498A (en) * | 2018-03-30 | 2019-10-11 | 上海连尚网络科技有限公司 | A kind of two dimensional code generates and analyzing method and device |
CN110311983A (en) * | 2019-07-09 | 2019-10-08 | 北京字节跳动网络技术有限公司 | Processing method, device, system, electronic equipment and the storage medium of service request |
CN111190591A (en) * | 2019-09-06 | 2020-05-22 | 腾讯科技(深圳)有限公司 | Interface display method, data processing method, device, terminal and server |
CN111190591B (en) * | 2019-09-06 | 2022-02-01 | 腾讯科技(深圳)有限公司 | Interface display method, data processing method, device, terminal and server |
CN111124539A (en) * | 2019-12-20 | 2020-05-08 | 腾讯科技(深圳)有限公司 | Initial scene resource file searching method, device, equipment and storage medium |
CN111124539B (en) * | 2019-12-20 | 2023-08-15 | 腾讯科技(深圳)有限公司 | Initial scene resource file searching method, device, equipment and storage medium |
CN111988298B (en) * | 2020-08-13 | 2023-05-30 | 山东伏羲智库互联网研究院 | Data processing method, device and equipment |
CN111988298A (en) * | 2020-08-13 | 2020-11-24 | 山东伏羲智库互联网研究院 | Data processing method, device and equipment |
CN112235403A (en) * | 2020-10-14 | 2021-01-15 | 北京思特奇信息技术股份有限公司 | Method, device and system for gray level control in cutover process of new and old systems |
CN112235403B (en) * | 2020-10-14 | 2023-06-16 | 北京思特奇信息技术股份有限公司 | Gray level control method, device and system for new and old system cutting process |
CN113535462A (en) * | 2021-07-14 | 2021-10-22 | 湖南快乐阳光互动娱乐传媒有限公司 | Resource verification method and device for content distribution network |
CN114448842A (en) * | 2021-12-08 | 2022-05-06 | 统信软件技术有限公司 | Resource access method and device and computing equipment |
CN114448842B (en) * | 2021-12-08 | 2023-06-16 | 统信软件技术有限公司 | Resource access method and device and computing equipment |
CN113904962B (en) * | 2021-12-08 | 2022-03-18 | 统信软件技术有限公司 | Resource access method and device and computing equipment |
CN113904962A (en) * | 2021-12-08 | 2022-01-07 | 统信软件技术有限公司 | Resource access method and device and computing equipment |
Also Published As
Publication number | Publication date |
---|---|
CN107172070B (en) | 2020-02-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107172070A (en) | Resource access processing method and device | |
US10509850B2 (en) | Third party application communication API | |
CN105934923B (en) | Anti-malware mobile content data management apparatus and method | |
US20200285462A1 (en) | Collaborative software development tool for resolving potential code-change conflicts in real time | |
US20170187818A1 (en) | Data translation using a proxy service | |
CN110249307A (en) | System and method for executing primary contract on block chain | |
CN111427766A (en) | Request processing method and device and proxy server | |
CN105574049A (en) | Page processing method, device and system of mobile applications | |
US10810176B2 (en) | Unsolicited bulk email detection using URL tree hashes | |
CN105160269A (en) | Method and apparatus for accessing data in Docker container | |
US11048885B2 (en) | Cognitive translation service integrated with context-sensitive derivations for determining program-integrated information relationships | |
CN105718276A (en) | Method and device for providing APK download and NGINX server | |
US9043343B2 (en) | Identifier assigning method, identifier parsing method, and multimedia reading | |
CN107113337A (en) | The network address translation | |
CN101208690B (en) | Translating expressions in computing environment | |
JP2018519575A (en) | Page jump based on text hiding | |
US20180165073A1 (en) | Context information based on type of routine being called | |
CN115225707A (en) | Resource access method and device | |
US20200302350A1 (en) | Natural language processing based business domain modeling | |
US10116726B2 (en) | Methods for bundling images and devices thereof | |
US20220321626A1 (en) | Method and apparatus for cascaded multi-input content preparation templates for 5g networks | |
CN103023704B (en) | Virtual network service equipment access method and system | |
US9483623B2 (en) | Displaying targeted website content based on social user profile data | |
CN107623662B (en) | Access control method, device and system | |
US9734160B1 (en) | Virtual file system for hosted network sites |
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 | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20190830 Address after: 100192 Dongsheng Science Park, Zhongguancun, 66 Xixiaokou Road, Haidian District, Beijing Applicant after: Green Bay Network Technology Co., Ltd. Address before: 100089 Beijing Haidian District Xixiaokou Road 66 Zhongguancun Dongsheng Science Park B-6 Building B 5 floors Applicant before: Grass count language (Beijing) Technology Co., Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |