CN112217853A - Resource access method and device - Google Patents
Resource access method and device Download PDFInfo
- Publication number
- CN112217853A CN112217853A CN201910629326.3A CN201910629326A CN112217853A CN 112217853 A CN112217853 A CN 112217853A CN 201910629326 A CN201910629326 A CN 201910629326A CN 112217853 A CN112217853 A CN 112217853A
- Authority
- CN
- China
- Prior art keywords
- candidate
- resource
- proxy server
- quality
- region
- 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
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
- H04L67/61—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources taking into account QoS or priority requirements
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the application discloses a resource access method and a device, wherein the method comprises the following steps: when the terminal fails to access the resources of the target network, the current area of the terminal in the target network and the current resource quality parameters corresponding to the current area are obtained, the resource quality parameters corresponding to a plurality of candidate areas in the target network are obtained, the target area is selected from the candidate areas according to the current resource quality parameters and the resource quality parameters corresponding to the candidate areas, proxy server link information of a proxy server corresponding to the target area is generated, and the proxy server link information is sent to the terminal so that the terminal can access the resources according to the proxy server link information. According to the scheme, when the terminal fails to access the resources, the network resources can be accessed through the proxy server.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a resource access method and apparatus.
Background
A CDN (Content Delivery Network) is a Content Delivery Network constructed on a Network, and can depend on edge nodes deployed in various places, and through functional modules of load balancing, Content Delivery, scheduling, and the like of a central platform, a user can obtain required Content nearby, thereby reducing Network congestion and improving response speed and hit rate of user access. The content distribution network is applied to a plurality of resource playing websites and resource downloading websites, but due to cost, the content distribution network used by the websites may have the problems of unstable service provision, poor compatibility with factors such as regions and operators, and the like, so that the situation that users in some regions can normally access network resources but users in some regions cannot access the network resources in the same time period occurs.
Disclosure of Invention
The embodiment of the application provides a resource access method and device, which can access network resources through a proxy server when a terminal fails to access the resources.
An embodiment of the present application provides a resource access method, including:
when a terminal fails to access resources of a target network, acquiring a current area of the terminal in the target network and current resource quality parameters corresponding to the current area;
acquiring resource quality parameters corresponding to a plurality of candidate areas in a target network;
selecting a target area from a plurality of candidate areas according to the current resource quality parameters and the resource quality parameters corresponding to the candidate areas;
generating proxy server link information of a proxy server corresponding to the target area;
and sending the link information of the proxy server to a terminal so that the terminal can access resources according to the link information of the proxy server.
Correspondingly, an embodiment of the present application further provides a resource access apparatus, including:
the terminal comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a current area of the terminal in a target network and a current resource quality parameter corresponding to the current area when the terminal fails to access resources of the target network;
the second acquisition module is used for acquiring resource quality parameters corresponding to a plurality of candidate areas in the target network;
a selecting module, configured to select a target region from the multiple candidate regions according to the current resource quality parameter and the resource quality parameter corresponding to the candidate region;
the generating module is used for generating proxy server link information of the proxy server corresponding to the target area;
and the sending module is used for sending the proxy server link information to a terminal so that the terminal can access resources according to the proxy server link information.
Optionally, in some embodiments, the selecting module may include a first selecting submodule and a second selecting submodule, as follows:
the first selecting submodule may be configured to select a quality candidate region from a plurality of candidate regions according to the current resource quality parameter and the resource quality parameter corresponding to the candidate region;
the second selecting sub-module may be configured to select a target region from the quality candidate regions.
The first selection sub-module may be configured to obtain a parameter value relationship between a resource quality sub-parameter corresponding to the candidate region and a current resource quality sub-parameter, and select the quality candidate region from the multiple candidate regions according to the parameter value relationship.
The second selection submodule may be configured to fuse multiple resource quality quantum parameters corresponding to the quality candidate region to obtain fusion resource quality information corresponding to the quality candidate region, and select a target region from the quality candidate region according to the fusion resource quality information.
The second selecting submodule may be configured to obtain a region interval distance between a region key point of each quality candidate region and a region key point of the current region, and select a target region from the quality candidate regions according to the region interval distance.
Optionally, in some embodiments, the selecting module may further include a generating sub-module and a sending sub-module, as follows:
the generating sub-module may be configured to generate candidate proxy server link information of a proxy server corresponding to the quality candidate area;
the sending submodule may be configured to send the candidate proxy server link information to a terminal.
Optionally, in some embodiments, the resource access device may further include an area obtaining module and an area selecting module, as follows:
the region acquisition module may be configured to acquire a distance candidate region in which a region interval distance between the target network and a region key point of the current region is within a preset distance range;
the region selection module may be configured to select a target region from the multiple distance candidate regions, where the current resource quality parameter and the resource quality parameter correspond to the distance candidate region.
The generating module may be configured to obtain a mapping set of a regional proxy server, where the mapping set of the regional proxy server includes mapping relationships between a plurality of candidate regions in a target network and proxy servers, determine a proxy server corresponding to the target region according to the mapping set of the regional proxy server, obtain a region address of the target region and a server identifier of the proxy server corresponding to the target region, and generate proxy server link information of the proxy server corresponding to the target region according to the region address and the server identifier.
In addition, a storage medium is further provided, where multiple instructions are stored in the storage medium, and the instructions are suitable for being loaded by a processor to perform steps in any resource access method provided in the embodiments of the present application.
In addition, the embodiment of the present application further provides a computer device, where the computer device includes a processor and a memory, where the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps in any resource access method provided by the embodiment of the application.
According to the method and the device, when the terminal fails to access the resources of the target network, the current area of the terminal in the target network and the current resource quality parameters corresponding to the current area are obtained, the resource quality parameters corresponding to a plurality of candidate areas in the target network are obtained, the target area is selected from the candidate areas according to the current resource quality parameters and the resource quality parameters corresponding to the candidate areas, proxy server link information of a proxy server corresponding to the target area is generated, and the proxy server link information is sent to the terminal, so that the terminal can access the resources according to the proxy server link information. According to the scheme, when the terminal fails to access the resources, the network resources can be accessed through the proxy server.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of a scenario of a resource access system provided in an embodiment of the present application;
FIG. 2 is a first flowchart of a resource access method provided by an embodiment of the present application;
FIG. 3 is a second flowchart of a resource access method provided by an embodiment of the present application;
FIG. 4 is a third flowchart of a resource access method provided by an embodiment of the present application;
FIG. 5 is a flow chart of a server storage resource provided by an embodiment of the present application;
FIG. 6 is a flowchart of a user accessing a resource according to an embodiment of the present application;
FIG. 7 is a system interaction diagram of a resource access system provided by an embodiment of the application;
fig. 8 is a schematic structural diagram of a resource access device according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a network device according to an embodiment of the present application.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present application are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the application and should not be taken as limiting the application with respect to other embodiments that are not detailed herein.
In the description that follows, specific embodiments of the present application will be described with reference to steps and symbols executed by one or more computers, unless otherwise indicated. Accordingly, these steps and operations will be referred to, several times, as being performed by a computer, the computer performing operations involving a processing unit of the computer in electronic signals representing data in a structured form. This operation transforms the data or maintains it at locations in the computer's memory system, which may be reconfigured or otherwise altered in a manner well known to those skilled in the art. The data maintains a data structure that is a physical location of the memory that has particular characteristics defined by the data format. However, while the principles of the application have been described in language specific to above, it is not intended to be limited to the specific form set forth herein, and it will be recognized by those of ordinary skill in the art that various of the steps and operations described below may be implemented in hardware.
The term "module" as used herein may be considered a software object executing on the computing system. The different components, modules, engines, and services described herein may be considered as implementation objects on the computing system. The apparatus and method described herein may be implemented in software, but may also be implemented in hardware, and are within the scope of the present application.
The terms "first", "second", and "third", etc. in this application are used to distinguish between different objects and not to describe a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to only those steps or modules listed, but rather, some embodiments may include other steps or modules not listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
An execution main body of the resource access method may be the resource access device provided in the embodiment of the present application, or a network device integrated with the resource access device, where the resource access device may be implemented in a hardware or software manner. The network device may be a smart phone, a tablet computer, a palm computer, a notebook computer, or a desktop computer. Network devices include, but are not limited to, computers, network hosts, a single network server, multiple sets of network servers, or a cloud of multiple servers.
Referring to fig. 1, fig. 1 is a schematic view of an application scenario of a resource access method provided in an embodiment of the present application, taking a resource access device integrated in a network device as an example, when a terminal fails to access resources of a target network, the network device may obtain a current region of the terminal in the target network and current resource quality parameters corresponding to the current region, obtain resource quality parameters corresponding to multiple candidate regions in the target network, select a target region from the multiple candidate regions according to the current resource quality parameters and the resource quality parameters corresponding to the candidate regions, generate proxy server link information of a proxy server corresponding to the target region, and send the proxy server link information to the terminal, so that the terminal performs resource access according to the proxy server link information.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a resource access method according to an embodiment of the present application. The specific process of the resource access method provided by the embodiment of the application can be as follows:
201. when the terminal fails to access the resources of the target network, the current area of the terminal in the target network and the current resource quality parameters corresponding to the current area are obtained.
The target network may be a network deployed in a resource access system, the target network may include multiple areas, and the terminal may obtain the network resource required by the terminal by accessing the cache servers in the multiple areas in the target network. For example, the target network may be a content distribution network, the content distribution network may include a plurality of areas, and the terminal may access network resources of a cache server in an area in the target network, so as to achieve the purpose of playing a video or downloading a video.
The content distribution network can transmit network resources more quickly and more stably by avoiding the part which possibly influences the data transmission speed and stability on the internet. By arranging cache nodes in a plurality of areas in the content distribution network and forming an intelligent virtual network based on the existing Internet, the content distribution network can guide a terminal request to the cache node closest to the terminal in real time according to the acquired comprehensive information, wherein the comprehensive information can comprise network flow, connection and load conditions of each node, distance between the terminal and the comprehensive information, response time and the like. The terminal can obtain the required network resources nearby, thereby solving the phenomenon of congestion and blockage of the internet and improving the response speed when the terminal accesses the website. The content distribution network may include a source station, which may be a service server integrating the overall network resources, and several caching nodes located in multiple regions. Multiple levels of caching can be performed in several caching nodes, for example, the multiple levels of caching can further include a first level cache, a second level cache, and the like.
The resource quality parameter may be a parameter representing quality of a network resource, and the resource quality parameter may include multiple resource quality quantum parameters, for example, the resource quality parameter may include a resource download speed parameter, a resource play fluency parameter, and the like. In this embodiment, the resource quality parameter may be a parameter for measuring the quality of network resources in an area in the content distribution network, and the resource quality parameter may include a video downloading speed, an online video playing fluency, and the like.
In practical application, in order to replace the area where the terminal resource access fails to access the resource in time so that the terminal can normally access the resource, the current area of the terminal in the target network and the current resource quality parameter corresponding to the current area can be obtained when the terminal fails to access the resource of the target network. For example, when it is detected that the user cannot normally play or download a video, it may be considered that the terminal where the user is located fails to access network resources in the current area in the content distribution network, at this time, the current area where the terminal is located in the content distribution network may be obtained, and current resource quality parameters corresponding to the current area may be obtained, where the current resource quality parameters may include parameters such as a current video download speed of the current area and a current online video play fluency.
In an embodiment, the server may receive an information acquisition request from the terminal, where it may be described that an abnormality occurs when the terminal where the user is located accesses the current area of the content distribution network, and the server may acquire the current area where the terminal is located in the content distribution network and a current resource quality parameter corresponding to the current area according to the information acquisition request, so as to perform an area selection step according to the current resource quality parameter.
202. And acquiring resource quality parameters corresponding to a plurality of candidate areas in the target network.
In practical application, in order to obtain a plurality of candidate regions of a target network conveniently, resource quality parameters are better than quality candidate regions of a current region, and resource quality parameters corresponding to the plurality of candidate regions in the target network can be obtained. For example, a plurality of candidate areas included in the content distribution network and the resource quality parameter corresponding to each candidate area may be acquired, and since the content distribution network is configured by arranging node servers at various places in the network, the resource quality parameters corresponding to the plurality of candidate areas of the content distribution network are different.
203. And selecting a target area from the candidate areas according to the current resource quality parameter and the resource quality parameter corresponding to the candidate area.
In practical application, in order to meet the requirement that the terminal normally accesses network resources, a target region may be selected from a plurality of candidate regions according to the current resource quality parameter and the resource quality parameter corresponding to the candidate region. For example, because the access of the terminal to the network resource in the current area is abnormal, the server may obtain resource quality parameters corresponding to multiple candidate areas in the content distribution network, so as to compare the resource quality parameters corresponding to the candidate areas with the current resource quality parameters corresponding to the current area, and further select a resource quality parameter superior to the current resource quality parameter from the resource quality parameters corresponding to the multiple candidate areas, thereby achieving the purpose of selecting a target area from the multiple candidate areas.
In an embodiment, in order to enable the terminal to normally access network resources in a target area in a target network, a quality candidate area whose resource quality parameters meet a standard may be selected first, and then the target area selection step is performed, so as to improve the accuracy of target area selection. Specifically, the step of "selecting a target region from a plurality of candidate regions according to the current resource quality parameter and the resource quality parameter corresponding to the candidate region" may include:
selecting a quality candidate region from a plurality of candidate regions according to the current resource quality parameter and the resource quality parameter corresponding to the candidate region;
and selecting a target area from the quality candidate areas.
In practical application, a quality candidate region may be selected from the multiple candidate regions according to the current resource quality parameter and the resource quality parameter corresponding to the candidate region, and a target region may be selected from the quality candidate region. For example, a region of the multiple candidate regions in which the resource quality parameter is better than the current resource quality parameter may be used as a quality candidate region, where the quality candidate region may be a unique region, and at this time, the unique quality candidate region may be used as a target region; when there are multiple quality candidate regions, the target region may be selected from the multiple quality candidate regions according to information such as a value of the resource quality parameter or a distance between the quality candidate region and the current region.
In an embodiment, the resource quality parameters may include a plurality of resource quality sub-parameters, so that by obtaining a parameter relationship between a plurality of resource quality sub-parameters corresponding to the resource quality parameters and a plurality of original resource quality sub-parameters corresponding to the original resource quality parameters, which resource quality parameters are better solutions may be defined, and further, a quality candidate region may be selected from the candidate regions. Specifically, the step of "selecting a quality candidate region from a plurality of candidate regions according to the current resource quality parameter and the resource quality parameter corresponding to the candidate region" may include:
acquiring a parameter value relation between a resource quality sub-parameter corresponding to the candidate region and a current resource quality sub-parameter;
and selecting a quality candidate region from the plurality of candidate regions according to the parameter value relation.
In practical application, the parameter value relationship between the resource quality sub-parameter corresponding to the candidate region and the current resource quality sub-parameter can be obtained, and the quality candidate region is selected from the multiple candidate regions according to the parameter value relationship. For example, the resource quality parameter may include a plurality of resource quality sub-parameters, such as video download speed, online video playing fluency, and the like. The larger the value of the video downloading speed is, the faster the video downloading speed can be shown, and the larger the value of the online video playing fluency is, the smoother the video playing can be shown. Therefore, when the resource quality parameters comprise two resource quality sub-parameters of video downloading speed and online video playing fluency, the areas with the video downloading speed higher than the original video downloading speed and the online video playing fluency higher than the original online video playing fluency can be obtained, and the resource quality of the areas is better than that of the current area, so that the area can be used as a quality candidate area.
If the value of the video downloading speed is greater than the original video downloading speed, but the value of the online video playing fluency is not greater than the original online video playing fluency, the candidate area is not considered to be the quality candidate area; correspondingly, if the value of the video downloading speed is not greater than the original video downloading speed, but the value of the online video playing fluency is greater than the original online video playing fluency, the candidate area can also be considered as not being the quality candidate area.
In an embodiment, when a plurality of quality candidate regions are obtained, a region with the optimal quality of resources in a target network can be obtained by fusing a plurality of resource quality quantum parameters, so that a user can normally access network resources, and the accuracy of obtaining the target region is improved. Specifically, the step of "selecting a target region from the quality candidate regions" may include:
fusing a plurality of resource quality quantum parameters corresponding to the quality candidate region to obtain fused resource quality information corresponding to the quality candidate region;
and selecting a target area from the quality candidate areas according to the quality information of the fusion resources.
In practical application, a plurality of resource quality quantum parameters corresponding to the quality candidate regions can be fused to obtain fusion resource quality information corresponding to the quality candidate regions, and a target region is selected from the quality candidate regions according to the fusion resource quality information. For example, when the resource quality parameter includes a plurality of resource quality quantum parameters, each resource quality quantum parameter may be given a weight, and then the plurality of resource quality quantum parameters are fused according to the weight corresponding to each resource quality quantum parameter, so as to obtain fused resource quality information corresponding to the resource quality parameter. After acquiring the fusion resource quality information corresponding to each quality candidate region, the quality candidate region with the largest value may be selected from the multiple pieces of fusion resource quality information as the target region. Therefore, the user can acquire the area with the optimal resource quality and access the network resources.
In an embodiment, in the content distribution network, the closer the network resource to the user is, the better the resource access effect is for the user, so that after a plurality of quality candidate areas are obtained, the accuracy of target area selection can be improved by calculating the separation distance. Specifically, the step of "selecting a target region from the quality candidate regions" may include:
obtaining the region interval distance between the region key point of each quality candidate region and the region key point of the current region;
and selecting a target area from the quality candidate areas according to the area spacing distance.
The area key point may be a key point representing an area position, and there may be a plurality of methods for selecting the area key point, for example, an area center point of the area may be used as the area key point, and for example, a position point where a content distribution network is deployed in the area and a cache server is located may be used as the area key point, and the like.
In practical application, the region interval distance between the region key point of each quality candidate region and the region key point of the current region can be obtained, and the target region is selected from the quality candidate regions according to the region interval distance. For example, after a plurality of quality candidate regions are obtained, a region key point corresponding to each quality candidate region and a region key point corresponding to the current region may be obtained, then, a region interval distance between the region key point corresponding to each quality candidate region and the region key point corresponding to the current region is calculated, where the region interval distance may be a straight-line distance between two region key points, and then, the quality candidate region with the shortest region interval distance may be selected as a target region, so that a user may access network resources in a region as close as possible to the user among the quality candidate regions.
In an embodiment, to avoid the problem of poor effect of accessing network resources by a user due to too far distance between a target area and a current area, a distance candidate area may be selected from a plurality of candidate areas of a target network, and then the target area may be selected from the distance candidate areas according to a resource quality parameter. Specifically, the resource access method may further include:
obtaining a distance candidate region in a target network, wherein the region interval distance between the target network and the region key point of the current region is within a preset distance range;
and selecting a target area from the plurality of distance candidate areas according to the current resource quality parameters and the resource quality parameters corresponding to the distance candidate areas.
In practical application, a distance candidate region in which the region interval distance between the target network and the region key point of the current region is within a preset distance range can be obtained, and the target region is selected from the multiple distance candidate regions according to the current resource quality parameter and the resource quality parameter corresponding to the distance candidate region. For example, a distance candidate region having a region separation distance from a region key point of the current region within a preset distance range may be first obtained, and the distance candidate region may satisfy a requirement of the terminal for the distance. Then, each resource quality sub-parameter corresponding to the distance candidate region may be given a corresponding weight, and fusion resource quality information corresponding to the distance candidate region may be calculated, and the target region may be set as the region having the largest value of the fusion resource quality information in the distance candidate region.
In an embodiment, if at least one distance candidate region cannot be acquired within a preset distance range, the preset distance range may be adjusted to acquire the target region. When only one distance candidate region is acquired within a preset distance range, the only distance candidate region may be used as a target region. In this way, the user can be enabled to access the network resource with relatively optimized resource quality within the distance allowable range.
204. And generating proxy server link information of the proxy server corresponding to the target area.
In practical applications, in order to enable the terminal to access network resources through the proxy server, proxy server link information of the proxy server corresponding to the target area may be generated. For example, after the target area is obtained, the proxy server corresponding to the target area may be determined, the area address corresponding to the target area and the server identifier corresponding to the proxy server are obtained, and the area address and the proxy server identifier are fused to obtain the link information of the proxy server.
In an embodiment, in order to enable the terminal to access the network resource in the target area in the target network through the proxy server, the proxy server link information may include an area address corresponding to the target area and a server identifier corresponding to the proxy server, so that accuracy of resource access is improved. Specifically, the step of "generating proxy link information of a proxy server corresponding to the target area" may include:
acquiring a regional proxy server mapping set, wherein the regional proxy server mapping set comprises mapping relations between a plurality of candidate regions in a target network and a proxy server;
determining a proxy server corresponding to the target area according to the area proxy server mapping set;
acquiring the area address of the target area and the server identification of the proxy server corresponding to the target area;
and generating proxy server link information of the proxy server corresponding to the target area according to the area address and the server identifier.
In practical applications, for example, a regional proxy mapping set including relationships between a plurality of candidate regions and proxy servers in a content distribution network may be first obtained, a proxy server corresponding to a target region may be determined according to the regional proxy mapping set, a region code of the target region, a region address of the target region, and a server domain name of the proxy server corresponding to the target region may then be obtained, and proxy link information may then be generated according to the obtained region code, region address, server domain name, and the like, where the proxy link information may be expressed as https:// proxy domain name? The area code XXX & CDN address XXX.
In an embodiment, after obtaining a plurality of quality candidate areas from a plurality of candidate areas of a target network, a plurality of candidate proxy server link information may be generated respectively and sent to a terminal, so that the terminal may select the target area according to a selection operation of a user. Specifically, after the step "selecting a quality candidate region from a plurality of candidate regions according to the current resource quality parameter and the resource quality parameter corresponding to the candidate region", the method may further include:
generating candidate proxy server link information of a proxy server corresponding to the quality candidate area;
and sending the candidate proxy server link information to a terminal.
In practical application, candidate proxy server link information of the proxy server corresponding to the quality candidate area can be generated, and the candidate proxy server link information is sent to the terminal. For example, after a plurality of quality candidate areas are acquired, candidate proxy server link information of a proxy server corresponding to each quality candidate area may be generated, and the candidate proxy server link information may be sent to the terminal, so that the terminal may select a target area according to a selection operation of a user.
205. And sending the link information of the proxy server to the terminal so that the terminal can access resources according to the link information of the proxy server.
In practical application, the proxy server link information may be sent to the terminal, so that the terminal performs resource access according to the proxy server link information. For example, the server may send the proxy server link information to the terminal, and the terminal may replace the content distribution network link of the current area according to the proxy server link information, so that the terminal performs access to the network resource.
In an embodiment, as shown in fig. 7, for example, a user a located in a user area a may successfully access a network resource in a content delivery network, but a user B located in a user area B may not normally access the network resource in the content delivery network, at this time, the user B may connect to a proxy server, so that the proxy server accesses the CDN of a target area, and then the user B may normally access the network resource.
As can be seen from the above, in the embodiment of the present application, when a terminal fails to access resources of a target network, a current area of the terminal in the target network and current resource quality parameters corresponding to the current area are obtained, resource quality parameters corresponding to a plurality of candidate areas in the target network are obtained, according to the current resource quality parameters and the resource quality parameters corresponding to the candidate areas, a target area is selected from the candidate areas, proxy server link information of a proxy server corresponding to the target area is generated, and the proxy server link information is sent to the terminal, so that the terminal accesses the resources according to the proxy server link information. According to the scheme, the terminal and the target area in the target network can be automatically matched, and the terminal in the current area in the abnormal state is proxied to the target area in the normal state for resource access in a proxy mode, so that the content availability problem of the candidate area in the abnormal state in the target network can be solved without participation of a website operator, the operation quality of a website and the resource access experience of a user are improved, and meanwhile, the initiative of a browser platform for controlling the operation quality of the website can be enhanced through the resource access method.
The method described in the foregoing embodiment will be described in further detail below by way of example in which the resource access device is specifically integrated in a network device.
Referring to fig. 3, a specific process of the resource access method according to the embodiment of the present application may be as follows:
301. and when the terminal fails to access the network resources in the current area in the content distribution network, sending an information acquisition request to a background server.
In practical applications, for example, as shown in fig. 6, when a user fails to play a video or download a video, it is indicated that an abnormality occurs when a terminal where the user is located accesses a network resource in a current area in a content distribution network, at this time, the terminal may send an information acquisition request to a background server, and query the background server through the information acquisition request whether a candidate area corresponding to a resource quality parameter better than a current resource quality parameter in the current area exists.
In an embodiment, for example, as shown in fig. 5, when a user successfully plays a video or successfully downloads a video, the terminal may obtain a current resource quality parameter corresponding to a current area where the terminal is located, and information such as a current exit gateway, where the current resource quality parameter includes a video downloading speed and an online video playing fluency. When the user finishes playing the video or downloading the video, the obtained information of the current resource quality parameter, the current exit gateway and the like can be reported to the background server, and after the background server obtains the reported information, the information of the resource address, the current region, the current resource quality parameter and the like corresponding to the current resource quality parameter can be stored, and the history stored information is updated according to the newly obtained information.
302. And the background server acquires the current area of the terminal in the content distribution network and the current resource quality parameter corresponding to the current area according to the information acquisition request.
In practical applications, for example, the background server may obtain a current area where the terminal is located in the content distribution network according to an information obtaining request sent by the terminal, and obtain current resource quality parameters corresponding to the current area, where the current resource quality parameters may include parameters such as a current video downloading speed of the current area and a current online video playing fluency.
303. The background server acquires resource quality parameters corresponding to a plurality of candidate areas in the content distribution network.
In practical applications, for example, the background server may obtain a plurality of candidate areas included in the content distribution network and resource quality parameters corresponding to each candidate area according to an information obtaining request sent by the terminal, and since the content distribution network is formed by arranging node servers at various places in the network, the resource quality parameters corresponding to the plurality of candidate areas of the content distribution network are different.
304. And the background server selects a target area from the candidate areas according to the current resource quality parameters and the resource quality parameters corresponding to the candidate areas.
In practical application, the background server may select a target area with better resource quality than a current area from a plurality of candidate areas in the content distribution network. For example, the background server may select, from a plurality of candidate areas of the content distribution network, an area in which the video download speed is higher than the original video download speed and the online video play fluency is higher than the original online video play fluency as the quality candidate area. When the quality candidate region is a unique region, the unique quality candidate region may be taken as a target region; when there are a plurality of quality candidate regions, a region separation distance between each quality candidate region and the current region may be calculated, and the quality candidate region in which the region separation distance is the smallest may be taken as the target region. By the method, the terminal can access the network resources in the areas with the resource quality superior to that of the current area and with the area interval distance being the nearest, so that the effect of accessing the user resources is improved to the maximum extent, and the accuracy of acquiring the target area is improved.
In an embodiment, the background server may select, from a plurality of candidate areas of the content distribution network, an area in which the video downloading speed is greater than the original video downloading speed and the online video playing fluency is greater than the original online video playing fluency as the quality candidate area. When the quality candidate region is a unique region, the unique quality candidate region may be taken as a target region; when there are multiple quality candidate regions, weights may be respectively given to the video download speed and the online video playing fluency corresponding to each quality candidate region, and the video download speed and the online video playing fluency after the weights are given are fused to obtain the fusion resource quality information corresponding to each quality candidate region. Then, the target area with the largest value of the quality information of the fusion resource can be selected from the multiple quality candidate areas.
In an embodiment, the background server may further select a distance candidate region having a distance from the current region within a preset distance range from among a plurality of candidate regions of the content distribution network, and if the distance candidate region is a unique region, the unique distance candidate region may be used as the target region; when there are a plurality of distance candidate regions, weights may be respectively given to the video download speed and the online video playing fluency corresponding to each distance candidate region, and the video download speed and the online video playing fluency after the weights are given are fused to obtain the fusion resource quality information corresponding to each distance candidate region. Then, from the plurality of distance candidate areas, the area with the largest value of the fusion resource quality information is selected as a target area.
305. And the background server generates proxy server link information of the proxy server corresponding to the target area.
In practical application, after the background server obtains the target area, a regional proxy mapping set including relationships between a plurality of candidate areas and proxy servers in the content distribution network may be obtained first, a proxy server corresponding to the target area may be determined according to the regional proxy mapping set, then an area code of the target area, an area address of the target area, and a server domain name of the proxy server corresponding to the target area may be obtained, and then proxy server link information may be generated according to the obtained area code, area address, server domain name, and the like, for example, the proxy server link information may be expressed as https:// proxy server domain name? The area code XXX & CDN address XXX.
306. And the background server sends the link information of the proxy server to the terminal.
In practical applications, for example, as shown in fig. 6, after the background server generates the proxy server link information, the proxy server link information may be sent to the terminal, so that the terminal replaces the content distribution network link in the current area according to the proxy server link information, so that the terminal accesses the network resource.
307. The terminal connects to the proxy server to which the proxy server link information points.
In practical applications, for example, as shown in fig. 6, after the terminal receives the proxy server link information, the link of the current regional content distribution network may be replaced with the link of the proxy server, and the terminal may be connected to the proxy server of the browser according to the proxy server link.
308. And the proxy server analyzes the link information of the proxy server to obtain a server address corresponding to the cache server in the target area in the content distribution network.
In practical applications, for example, after the terminal is connected to the proxy server, the proxy server may analyze the link information of the proxy server to obtain a server address corresponding to the cache server in the target area in the content distribution network, so that the proxy server accesses the cache server in the target area in the content distribution network according to the server address to obtain the resource address of the network resource.
309. And the proxy server sends a resource acquisition request to the cache server in the target area according to the server address.
In practical applications, for example, as shown in fig. 6, the proxy server may proxy the request to the cache server in the target area according to the server address corresponding to the cache server in the target area of the content distribution network obtained through parsing, and initiate the resource obtaining request, so that the cache server in the target area queries the corresponding network resource according to the resource obtaining request.
310. The proxy server receives a resource address of a network resource from a cache server in the target area.
In practical applications, for example, after querying the corresponding network resource according to the resource acquisition request, the cache server in the target area may send the resource address of the network resource to the proxy server, and at this time, the proxy server may receive the resource address of the network resource from the cache server in the target area.
311. The proxy server sends the resource address of the network resource to the terminal.
In practical applications, for example, as shown in fig. 6, after receiving a resource address of a network resource from a cache server in a target area, a proxy server may send the resource address of the network resource to a terminal, so that a user in an abnormal condition candidate area in a content distribution network may access a normal network resource through proxy, for example, the user may download or play a video normally.
As can be seen from the above, in the embodiment of the present application, when a terminal fails to access network resources in a current area of a content distribution network, an information acquisition request is sent to a background server through the terminal, the background server acquires the current area of the terminal in the content distribution network and current resource quality parameters corresponding to the current area according to the information acquisition request, acquires resource quality parameters corresponding to a plurality of candidate areas in the content distribution network, selects a target area from the plurality of candidate areas according to the current resource quality parameters and the resource quality parameters corresponding to the candidate areas, generates proxy server link information of a proxy server corresponding to the target area, sends the proxy server link information to the terminal, the terminal is connected to the proxy server to which the proxy server link information points, and the proxy server parses the proxy server link information, the method comprises the steps of obtaining a server address corresponding to a cache server in a target area in content distribution, sending a resource obtaining request to the cache server in the target area by a proxy server according to the server address, receiving a resource address of network resources from the cache server in the target area by the proxy server, and sending the resource address of the network resources to a terminal by the proxy server. According to the scheme, the terminal and the target area in the target network can be automatically matched, and the terminal in the current area in the abnormal state is proxied to the target area in the normal state for resource access in a proxy mode, so that the content availability problem of the candidate area in the abnormal state in the target network can be solved without participation of a website operator, the operation quality of a website and the resource access experience of a user are improved, and meanwhile, the initiative of a browser platform for controlling the operation quality of the website can be enhanced through the resource access method.
The method described in the foregoing embodiment will be described in further detail below by way of example in which the resource access device is specifically integrated in a network device.
Referring to fig. 4, a specific process of the resource access method according to the embodiment of the present application may be as follows:
401. and when the terminal fails to access the network resources in the current area in the content distribution network, sending an information acquisition request to a background server.
In practical applications, for example, when a user fails to play a video or download a video, it is indicated that an abnormality occurs when a terminal where the user is located accesses a network resource in a current area in a content distribution network, at this time, the terminal may send an information acquisition request to a background server, and query the background server through the information acquisition request whether a candidate area corresponding to a resource quality parameter superior to a current resource quality parameter in the current area exists.
In an embodiment, for example, when a user successfully plays or downloads a video, the terminal may obtain information, such as a current resource quality parameter corresponding to a current area where the terminal is located, including a video downloading speed and an online video playing fluency, and a current exit gateway. When the user finishes playing the video or downloading the video, the obtained information of the current resource quality parameter, the current exit gateway and the like can be reported to the background server, and after the background server obtains the reported information, the information of the resource address, the current region, the current resource quality parameter and the like corresponding to the current resource quality parameter can be stored, and the history stored information is updated according to the newly obtained information.
402. And the background server acquires the current area of the terminal in the content distribution network and the current resource quality parameter corresponding to the current area according to the information acquisition request.
In practical applications, for example, the background server may obtain a current area where the terminal is located in the content distribution network according to an information obtaining request sent by the terminal, and obtain current resource quality parameters corresponding to the current area, where the current resource quality parameters may include parameters such as a current video downloading speed of the current area and a current online video playing fluency.
403. The background server acquires resource quality parameters corresponding to a plurality of candidate areas in the content distribution network.
In practical applications, for example, the background server may obtain a plurality of candidate areas included in the content distribution network and resource quality parameters corresponding to each candidate area according to an information obtaining request sent by the terminal, and since the content distribution network is formed by arranging node servers at various places in the network, the resource quality parameters corresponding to the plurality of candidate areas of the content distribution network are different.
404. And the background server selects a plurality of quality candidate areas from the plurality of candidate areas according to the current resource quality parameters and the resource quality parameters corresponding to the candidate areas.
In practical application, the background server may select a target area with better resource quality than a current area from a plurality of candidate areas in the content distribution network. For example, the background server may select, from a plurality of candidate areas of the content distribution network, an area in which the video download speed is higher than the original video download speed and the online video play fluency is higher than the original online video play fluency as the quality candidate area.
405. And the background server generates candidate proxy server link information of the proxy server corresponding to the quality candidate area.
In practical application, after the background server obtains a plurality of quality candidate areas, a regional proxy mapping set including relationships between the plurality of candidate areas and the proxy servers in the content distribution network may be first obtained, the proxy server corresponding to the quality candidate area may be determined according to the regional proxy mapping set, then an area code of the quality candidate area, an area address of the quality candidate area, and a server domain name of the proxy server corresponding to the quality candidate area may be obtained, and then a plurality of candidate proxy link information may be generated according to the obtained area code, area address, server domain name, and the like, for example, the candidate proxy link information may be represented as https:// proxy server domain name? The area code XXX & CDN address XXX.
406. And the background server sends the link information of the candidate proxy server to the terminal.
In practical applications, for example, after the background server generates a plurality of candidate proxy server link information, the plurality of candidate proxy server link information may be sent to the terminal, so that the terminal can select link information from the plurality of candidate proxy server link information.
407. The terminal selects proxy link information from the plurality of candidate proxy link information.
In practical applications, for example, the terminal may select proxy link information desired to be connected from the plurality of candidate proxy link information, and then the terminal may replace the content distribution network link in the current area according to the selected proxy link information, so that the terminal may access the network resource.
408. The terminal connects to the proxy server to which the proxy server link information points.
In practical applications, for example, after the terminal receives the proxy server link information, the link of the current regional content distribution network may be replaced with the link of the proxy server, and the terminal may be connected to the proxy server of the browser according to the proxy server link.
409. And the proxy server analyzes the link information of the proxy server to obtain a server address corresponding to the cache server in the target area in the content distribution network.
In practical applications, for example, after the terminal is connected to the proxy server, the proxy server may analyze the link information of the proxy server to obtain a server address corresponding to the cache server in the target area in the content distribution network, so that the proxy server accesses the cache server in the target area in the content distribution network according to the server address to obtain the resource address of the network resource.
410. And the proxy server sends a resource acquisition request to the cache server in the target area according to the server address.
In practical applications, for example, the proxy server may proxy the request to the cache server in the target area according to the server address corresponding to the cache server in the target area of the parsed content distribution network, and initiate the resource acquisition request, so that the cache server in the target area queries the corresponding network resource according to the resource acquisition request.
411. The proxy server receives a resource address of a network resource from a cache server in the target area.
In practical applications, for example, after querying the corresponding network resource according to the resource acquisition request, the cache server in the target area may send the resource address of the network resource to the proxy server, and at this time, the proxy server may receive the resource address of the network resource from the cache server in the target area.
412. The proxy server sends the resource address of the network resource to the terminal.
In practical application, for example, after receiving the resource address of the network resource from the cache server in the target area, the proxy server may send the resource address of the network resource to the terminal, so that the user in the candidate area for the abnormal condition in the content distribution network may access the normal network resource through proxy, for example, the user may download or play a video normally.
As can be seen from the above, in the embodiment of the present application, when a terminal fails to access network resources in a current area of a content distribution network, an information acquisition request is sent to a background server through the terminal, the background server acquires the current area of the terminal in the content distribution network and current resource quality parameters corresponding to the current area according to the information acquisition request, acquires resource quality parameters corresponding to a plurality of candidate areas in the content distribution network, selects a plurality of quality candidate areas from the plurality of candidate areas according to the current resource quality parameters and the resource quality parameters corresponding to the candidate areas, generates candidate proxy server link information of a proxy server corresponding to the quality candidate areas, and sends the candidate proxy server link information to the terminal, the terminal selects the proxy server link information from the candidate proxy server link information, and the terminal is connected to the proxy server to which the proxy server link information points, the proxy server analyzes the link information of the proxy server to obtain a server address corresponding to a cache server in a target area in the content distribution network, the proxy server sends a resource acquisition request to the cache server in the target area according to the server address, the proxy server receives a resource address of a network resource from the cache server in the target area, and the proxy server sends the resource address of the network resource to the terminal. According to the scheme, the terminal and the target area in the target network can be automatically matched, and the terminal in the current area in the abnormal state is proxied to the target area in the normal state for resource access in a proxy mode, so that the content availability problem of the candidate area in the abnormal state in the target network can be solved without participation of a website operator, the operation quality of a website and the resource access experience of a user are improved, and meanwhile, the initiative of a browser platform for controlling the operation quality of the website can be enhanced through the resource access method.
In order to better implement the foregoing method, an embodiment of the present application may further provide a resource access apparatus, where the resource access apparatus may be specifically integrated in a network device, and the network device may include a server, a terminal, and the like, where the terminal may include: a mobile phone, a tablet Computer, a notebook Computer, or a Personal Computer (PC).
For example, as shown in fig. 8, the resource access apparatus may include a first obtaining module 81, a second obtaining module 82, a selecting module 83, a generating module 84, and a sending module 85, as follows:
a first obtaining module 81, configured to obtain, when a terminal fails to access a resource of a target network, a current area of the terminal in the target network and a current resource quality parameter corresponding to the current area;
a second obtaining module 82, configured to obtain resource quality parameters corresponding to multiple candidate regions in the target network;
a selecting module 83, configured to select a target region from multiple candidate regions according to the current resource quality parameter and the resource quality parameter corresponding to the candidate region;
a generating module 84, configured to generate proxy server link information of a proxy server corresponding to the target area;
and the sending module 85 is configured to send the proxy server link information to a terminal, so that the terminal performs resource access according to the proxy server link information.
In one embodiment, the selecting module 83 may include a first selecting submodule 831 and a second selecting submodule 832 as follows:
a first selecting submodule 831, configured to select a quality candidate region from multiple candidate regions according to the current resource quality parameter and the resource quality parameter corresponding to the candidate region;
a second selection submodule 832, configured to select a target region from the quality candidate regions.
In an embodiment, the first selecting sub-module 831 may be specifically configured to:
acquiring a parameter value relation between a resource quality sub-parameter corresponding to the candidate region and a current resource quality sub-parameter;
and selecting a quality candidate region from the plurality of candidate regions according to the parameter value relation.
In an embodiment, the second selecting submodule 832 may be specifically configured to:
fusing a plurality of resource quality quantum parameters corresponding to the quality candidate region to obtain fused resource quality information corresponding to the quality candidate region;
and selecting a target area from the quality candidate areas according to the quality information of the fusion resources.
In an embodiment, the second selecting submodule 832 may be specifically configured to:
obtaining the region interval distance between the region key point of each quality candidate region and the region key point of the current region;
and selecting a target area from the quality candidate areas according to the area spacing distance.
In an embodiment, the selecting module 83 may further include a generating sub-module 833 and a sending sub-module 834, as follows:
a generating submodule 833 for generating candidate proxy server link information of the proxy server corresponding to the quality candidate area;
a sending sub-module 834 for sending the candidate proxy server link information to the terminal.
In an embodiment, the resource access apparatus may further include an area obtaining module 86 and an area selecting module 87, as follows:
a region obtaining module 86, configured to obtain a distance candidate region in which a region interval distance between the target network and a region key point of the current region is within a preset distance range;
and a region selection module 87, configured to select a target region from the multiple distance candidate regions, where the current resource quality parameter and the resource quality parameter correspond to the distance candidate region.
In an embodiment, the generating module 84 may be specifically configured to:
acquiring a regional proxy server mapping set, wherein the regional proxy server mapping set comprises mapping relations between a plurality of candidate regions in a target network and a proxy server;
determining a proxy server corresponding to the target area according to the area proxy server mapping set;
acquiring the area address of the target area and the server identification of the proxy server corresponding to the target area;
and generating proxy server link information of the proxy server corresponding to the target area according to the area address and the server identifier.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
As can be seen from the above, when a terminal fails to access resources of a target network, the resource access apparatus of this embodiment may obtain, by using the first obtaining module 81, a current area of the terminal in the target network and current resource quality parameters corresponding to the current area, obtain, by using the second obtaining module 82, resource quality parameters corresponding to a plurality of candidate areas in the target network, select, by using the selecting module 83, a target area from the plurality of candidate areas according to the current resource quality parameters and the resource quality parameters corresponding to the candidate areas, generate, by using the generating module 84, proxy server link information corresponding to a proxy server in the target area, and send, by using the sending module 85, the proxy server link information to the terminal, so that the terminal performs resource access according to the proxy server link information. According to the scheme, the terminal and the target area in the target network can be automatically matched, and the terminal in the current area in the abnormal state is proxied to the target area in the normal state for resource access in a proxy mode, so that the content availability problem of the candidate area in the abnormal state in the target network can be solved without participation of a website operator, the operation quality of a website and the resource access experience of a user are improved, and meanwhile, the initiative of a browser platform for controlling the operation quality of the website can be enhanced through the resource access method.
The embodiment of the present application further provides a network device, and the network device may integrate any one of the resource access apparatuses provided in the embodiment of the present application.
For example, as shown in fig. 9, it shows a schematic structural diagram of a network device according to an embodiment of the present application, specifically:
the network device may include components such as a processor 901 of one or more processing cores, memory 902 of one or more computer-readable storage media, a power supply 903, and an input unit 904. Those skilled in the art will appreciate that the network device architecture shown in fig. 9 does not constitute a limitation of network devices and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 901 is a control center of the network device, connects various parts of the entire network device by using various interfaces and lines, and performs various functions of the network device and processes data by running or executing software programs and/or modules stored in the memory 902 and calling data stored in the memory 902, thereby performing overall monitoring of the network device. Optionally, processor 901 may include one or more processing cores; preferably, the processor 901 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 901.
The memory 902 may be used to store software programs and modules, and the processor 901 executes various functional applications and data processing by operating the software programs and modules stored in the memory 902. The memory 902 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the network device, and the like. Further, the memory 902 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 902 may also include a memory controller to provide the processor 901 access to the memory 902.
The network device further comprises a power supply 903 for supplying power to each component, and preferably, the power supply 903 may be logically connected to the processor 901 through a power management system, so that functions of managing charging, discharging, power consumption, and the like are realized through the power management system. The power supply 903 may also include any component including one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The network device may also include an input unit 904, the input unit 904 operable to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the network device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 901 in the network device loads the executable file corresponding to the process of one or more application programs into the memory 902 according to the following instructions, and the processor 901 runs the application program stored in the memory 902, so as to implement various functions as follows:
when a terminal fails to access resources of a target network, a current area of the terminal in the target network and current resource quality parameters corresponding to the current area are obtained, resource quality parameters corresponding to a plurality of candidate areas in the target network are obtained, the target area is selected from the candidate areas according to the current resource quality parameters and the resource quality parameters corresponding to the candidate areas, proxy server link information of a proxy server corresponding to the target area is generated, and the proxy server link information is sent to the terminal so that the terminal can access the resources according to the proxy server link information.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
As can be seen from the above, in the embodiment of the present application, when a terminal fails to access resources of a target network, a current area of the terminal in the target network and current resource quality parameters corresponding to the current area are obtained, resource quality parameters corresponding to a plurality of candidate areas in the target network are obtained, according to the current resource quality parameters and the resource quality parameters corresponding to the candidate areas, a target area is selected from the candidate areas, proxy server link information of a proxy server corresponding to the target area is generated, and the proxy server link information is sent to the terminal, so that the terminal accesses the resources according to the proxy server link information. According to the scheme, the terminal and the target area in the target network can be automatically matched, and the terminal in the current area in the abnormal state is proxied to the target area in the normal state for resource access in a proxy mode, so that the content availability problem of the candidate area in the abnormal state in the target network can be solved without participation of a website operator, the operation quality of a website and the resource access experience of a user are improved, and meanwhile, the initiative of a browser platform for controlling the operation quality of the website can be enhanced through the resource access method.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present application provides a storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute the steps in any one of the resource access methods provided in the present application. For example, the instructions may perform the steps of:
when a terminal fails to access resources of a target network, a current area of the terminal in the target network and current resource quality parameters corresponding to the current area are obtained, resource quality parameters corresponding to a plurality of candidate areas in the target network are obtained, the target area is selected from the candidate areas according to the current resource quality parameters and the resource quality parameters corresponding to the candidate areas, proxy server link information of a proxy server corresponding to the target area is generated, and the proxy server link information is sent to the terminal so that the terminal can access the resources according to the proxy server link information.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium may execute the steps in any resource access method provided in the embodiments of the present application, beneficial effects that can be achieved by any resource access method provided in the embodiments of the present application may be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The resource access method, device, system, storage medium and computer device resource access provided by the embodiments of the present application are introduced in detail above, and a specific example is applied in the present application to explain the principle and implementation of the present application, and the description of the above embodiments is only used to help understand the method and core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Claims (10)
1. A method for accessing resources, comprising:
when a terminal fails to access resources of a target network, acquiring a current area of the terminal in the target network and current resource quality parameters corresponding to the current area;
acquiring resource quality parameters corresponding to a plurality of candidate areas in a target network;
selecting a target area from a plurality of candidate areas according to the current resource quality parameters and the resource quality parameters corresponding to the candidate areas;
generating proxy server link information of a proxy server corresponding to the target area;
and sending the link information of the proxy server to a terminal so that the terminal can access resources according to the link information of the proxy server.
2. The method according to claim 1, wherein selecting a target region from a plurality of candidate regions according to the current resource quality parameter and the resource quality parameter corresponding to the candidate region comprises:
selecting a quality candidate region from a plurality of candidate regions according to the current resource quality parameter and the resource quality parameter corresponding to the candidate region;
and selecting a target area from the quality candidate areas.
3. The method of claim 2, wherein the resource quality parameter comprises a plurality of resource quality sub-parameters, and wherein the current resource quality parameter comprises a plurality of current resource quality sub-parameters;
selecting a quality candidate region from a plurality of candidate regions according to the current resource quality parameter and the resource quality parameter corresponding to the candidate region, wherein the selecting comprises the following steps:
acquiring a parameter value relation between a resource quality sub-parameter corresponding to the candidate region and a current resource quality sub-parameter;
and selecting a quality candidate region from the plurality of candidate regions according to the parameter value relation.
4. The method of claim 3, wherein selecting a target region from the quality candidate regions comprises:
fusing a plurality of resource quality quantum parameters corresponding to the quality candidate region to obtain fused resource quality information corresponding to the quality candidate region;
and selecting a target area from the quality candidate areas according to the quality information of the fusion resources.
5. The method of claim 2, wherein selecting a target region from the quality candidate regions comprises:
obtaining the region interval distance between the region key point of each quality candidate region and the region key point of the current region;
and selecting a target area from the quality candidate areas according to the area spacing distance.
6. The method according to claim 2, wherein after selecting a quality candidate region from a plurality of candidate regions according to the current resource quality parameter and the resource quality parameter corresponding to the candidate region, the method further comprises:
generating candidate proxy server link information of a proxy server corresponding to the quality candidate area;
and sending the candidate proxy server link information to a terminal.
7. The method of claim 1, further comprising:
obtaining a distance candidate region in a target network, wherein the region interval distance between the target network and the region key point of the current region is within a preset distance range;
and selecting a target area from the plurality of distance candidate areas according to the current resource quality parameters and the resource quality parameters corresponding to the distance candidate areas.
8. The method according to claim 1, wherein generating the proxy link information of the proxy corresponding to the target area comprises:
acquiring a regional proxy server mapping set, wherein the regional proxy server mapping set comprises mapping relations between a plurality of candidate regions in a target network and a proxy server;
determining a proxy server corresponding to the target area according to the area proxy server mapping set;
acquiring the area address of the target area and the server identification of the proxy server corresponding to the target area;
and generating proxy server link information of the proxy server corresponding to the target area according to the area address and the server identifier.
9. A resource access apparatus, comprising:
the terminal comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a current area of the terminal in a target network and a current resource quality parameter corresponding to the current area when the terminal fails to access resources of the target network;
the second acquisition module is used for acquiring resource quality parameters corresponding to a plurality of candidate areas in the target network;
a selecting module, configured to select a target region from the multiple candidate regions according to the current resource quality parameter and the resource quality parameter corresponding to the candidate region;
the generating module is used for generating proxy server link information of the proxy server corresponding to the target area;
and the sending module is used for sending the proxy server link information to a terminal so that the terminal can access resources according to the proxy server link information.
10. A storage medium having stored thereon a computer program, characterized in that, when the computer program is run on a computer, it causes the computer to execute the resource access method according to any one of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910629326.3A CN112217853B (en) | 2019-07-12 | 2019-07-12 | Resource access method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910629326.3A CN112217853B (en) | 2019-07-12 | 2019-07-12 | Resource access method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112217853A true CN112217853A (en) | 2021-01-12 |
CN112217853B CN112217853B (en) | 2022-07-12 |
Family
ID=74047775
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910629326.3A Active CN112217853B (en) | 2019-07-12 | 2019-07-12 | Resource access method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112217853B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115941198A (en) * | 2022-11-10 | 2023-04-07 | 北京沃东天骏信息技术有限公司 | Interface calling method and device, terminal equipment and storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103561013A (en) * | 2013-10-29 | 2014-02-05 | 联想中望系统服务有限公司 | Streaming media data distributing system |
US20160308961A1 (en) * | 2014-01-06 | 2016-10-20 | Tencent Technology (Shenzhen) Company Limited | Methods, Devices, and Systems for Allocating Service Nodes in a Network |
CN106899681A (en) * | 2017-03-10 | 2017-06-27 | 腾讯科技(深圳)有限公司 | The method and server of a kind of information pushing |
CN106921699A (en) * | 2015-12-25 | 2017-07-04 | 北京奇虎科技有限公司 | A kind of Network Access Method, device and system |
US20170237820A1 (en) * | 2005-04-27 | 2017-08-17 | David Scarborough | Location-based task execution for enhanced data access |
CN107980239A (en) * | 2017-09-27 | 2018-05-01 | 深圳前海达闼云端智能科技有限公司 | Resource allocation method and device, the network equipment and storage medium |
CN108156210A (en) * | 2016-12-06 | 2018-06-12 | 腾讯科技(深圳)有限公司 | The acquisition methods and device of target resource |
CN108696561A (en) * | 2017-04-11 | 2018-10-23 | 中国移动通信集团河北有限公司 | The method and apparatus of resource supplying |
-
2019
- 2019-07-12 CN CN201910629326.3A patent/CN112217853B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170237820A1 (en) * | 2005-04-27 | 2017-08-17 | David Scarborough | Location-based task execution for enhanced data access |
CN103561013A (en) * | 2013-10-29 | 2014-02-05 | 联想中望系统服务有限公司 | Streaming media data distributing system |
US20160308961A1 (en) * | 2014-01-06 | 2016-10-20 | Tencent Technology (Shenzhen) Company Limited | Methods, Devices, and Systems for Allocating Service Nodes in a Network |
CN106921699A (en) * | 2015-12-25 | 2017-07-04 | 北京奇虎科技有限公司 | A kind of Network Access Method, device and system |
CN108156210A (en) * | 2016-12-06 | 2018-06-12 | 腾讯科技(深圳)有限公司 | The acquisition methods and device of target resource |
CN106899681A (en) * | 2017-03-10 | 2017-06-27 | 腾讯科技(深圳)有限公司 | The method and server of a kind of information pushing |
CN108696561A (en) * | 2017-04-11 | 2018-10-23 | 中国移动通信集团河北有限公司 | The method and apparatus of resource supplying |
CN107980239A (en) * | 2017-09-27 | 2018-05-01 | 深圳前海达闼云端智能科技有限公司 | Resource allocation method and device, the network equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
OSCAR SCHOFIELD: "Gliders as maturing technology: Using gliderpalooza as means to develop an integrated glider community", 《OCEANS 2015 - MTS/IEEE WASHINGTON》 * |
臧雪柏等: "基于代理的资源请求中间件的实现", 《吉林大学学报(工学版)》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115941198A (en) * | 2022-11-10 | 2023-04-07 | 北京沃东天骏信息技术有限公司 | Interface calling method and device, terminal equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112217853B (en) | 2022-07-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7252356B2 (en) | MOBILE EDGE COMPUTING NODE SELECTION METHOD, APPARATUS AND SYSTEM AND COMPUTER PROGRAM | |
US10257115B2 (en) | Cloud-based service resource provisioning based on network characteristics | |
US10135909B2 (en) | Network-aware structured content downloads | |
US8973005B2 (en) | Information processing apparatus, information processing method, recording medium and information processing system | |
US20130080509A1 (en) | Cloud computing access gateway and method for providing a user terminal access to a cloud provider | |
CN111491013A (en) | Server scheduling method, device, system, storage medium and computer equipment | |
CN110874227B (en) | Distribution method, system and electronic equipment for realizing gray level release of API gateway | |
CN110839049B (en) | Data scheduling method and system based on domain name system | |
CN111327647B (en) | Method and device for providing service to outside by container and electronic equipment | |
US11237888B2 (en) | Message processing method and system, storage medium and electronic device | |
CN105743945B (en) | Document down loading method and system based on switching loading source | |
US20180146072A1 (en) | Creation of a binding based on a description associated with a server | |
CN108183975A (en) | A kind of method and system of domain name mapping | |
US8346784B1 (en) | Java script reductor | |
CN110719273A (en) | Method for determining back source node, server and computer readable storage medium | |
US20200320154A1 (en) | A webpage loading method, webpage loading system and server | |
CN109428839B (en) | CDN scheduling method, device and system | |
CN111935752A (en) | Gateway access method, gateway access device, computer equipment and storage medium | |
CN113014681A (en) | Network card binding method and device of multi-network card server, electronic equipment and storage medium | |
KR101613513B1 (en) | Virtual machine placing method and system for guarantee of network bandwidth | |
CN110233904B (en) | Equipment updating method, device, system, storage medium and computer equipment | |
CN112217853B (en) | Resource access method and device | |
CN108540546B (en) | Network node access control method, electronic device, network system, and storage medium | |
CN111770170B (en) | Request processing method, device, equipment and computer storage medium | |
CN117592685A (en) | Service processing method, device, electronic equipment and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |